fix four audit bugs - offline playback, audio passthrough, notification dedup, dashboard fixes
This commit is contained in:
@@ -291,6 +291,12 @@ export default function PlayerPage() {
|
||||
// native audioTracks switch isn't possible (transcoded streams, or
|
||||
// single-audio sources where the alternate track isn't in the file).
|
||||
// maxBitrate threads the user-picked quality cap into the same call.
|
||||
// Offline fallback: if this item was downloaded, use the Blob URL
|
||||
// instead of hitting the server. PlaybackInfo and reporting gracefully
|
||||
// no-op when there's no connection.
|
||||
const downloaded = useDownloads(s => s.getByItemId(id || ''))
|
||||
const offlineUrl = downloaded?.status === 'done' ? downloaded.localPath : undefined
|
||||
|
||||
const { data: playbackInfo } = usePlaybackInfo(
|
||||
id,
|
||||
startTimeTicks,
|
||||
@@ -299,6 +305,7 @@ export default function PlayerPage() {
|
||||
)
|
||||
const resolvedSource = playbackInfo?.MediaSources?.[0]
|
||||
const streamUrl = (() => {
|
||||
if (offlineUrl) return offlineUrl
|
||||
if (!resolvedSource || !serverUrl) return ''
|
||||
// Direct play: server-confirmed the browser can decode the source as-is
|
||||
if (resolvedSource.SupportsDirectPlay) {
|
||||
|
||||
Reference in New Issue
Block a user