shaka-player
shaka-player copied to clipboard
Switching audio track in Safari stops and stalls playback for DASH streams
Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
v2.5.8
in production, v3.0.9
while checking if the issue was resolved in a later version
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from master
?
Yes
Are you using the demo app or your own custom app?
Custom.
If custom app, can you reproduce the issue using our demo app?
Yes
What browser and OS are you using?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15
We see the same behavior on Safari on iPad.
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
What are the manifest and license server URIs?
https://www.dropbox.com/s/148qbja0yy43x1r/180124b4c8175216ae0e3bdc.zip?dl=0 https://shakadebug.s3.eu-central-1.amazonaws.com/dash/stream.mpd
What configuration are you using? What is the output of player.getConfiguration()
?
{
"drm": {
"retryParameters": {
"maxAttempts": 2,
"baseDelay": 1000,
"backoffFactor": 2,
"fuzzFactor": 0.5,
"timeout": 0
},
"servers": {},
"clearKeys": {},
"advanced": {},
"delayLicenseRequestUntilPlayed": false,
"logLicenseExchange": false,
"updateExpirationTime": 1
},
"manifest": {
"retryParameters": {
"maxAttempts": 2,
"baseDelay": 1000,
"backoffFactor": 2,
"fuzzFactor": 0.5,
"timeout": 0
},
"availabilityWindowOverride": null,
"disableAudio": false,
"disableVideo": false,
"disableText": false,
"defaultPresentationDelay": 0,
"dash": {
"clockSyncUri": "",
"ignoreDrmInfo": false,
"xlinkFailGracefully": false,
"ignoreMinBufferTime": false,
"autoCorrectDrift": true,
"initialSegmentLimit": 1000,
"ignoreSuggestedPresentationDelay": false,
"ignoreEmptyAdaptationSet": false
},
"hls": {
"ignoreTextStreamFailures": false,
"useFullSegmentsForStartTime": false
}
},
"streaming": {
"retryParameters": {
"maxAttempts": 2,
"baseDelay": 1000,
"backoffFactor": 2,
"fuzzFactor": 0.5,
"timeout": 0
},
"rebufferingGoal": 2,
"bufferingGoal": 10,
"bufferBehind": 30,
"ignoreTextStreamFailures": false,
"alwaysStreamText": false,
"startAtSegmentBoundary": false,
"smallGapLimit": 0.5,
"jumpLargeGaps": false,
"durationBackoff": 1,
"forceTransmuxTS": false,
"safeSeekOffset": 5,
"stallEnabled": true,
"stallThreshold": 1,
"stallSkip": 0.1,
"useNativeHlsOnSafari": true,
"inaccurateManifestTolerance": 2
},
"offline": {
"usePersistentLicense": true
},
"abr": {
"enabled": true,
"defaultBandwidthEstimate": 10000000,
"switchInterval": 8,
"bandwidthUpgradeTarget": 0.85,
"bandwidthDowngradeTarget": 0.95,
"restrictions": {
"minWidth": 0,
"maxWidth": null,
"minHeight": 0,
"maxHeight": null,
"minPixels": 0,
"maxPixels": null,
"minFrameRate": 0,
"maxFrameRate": null,
"minBandwidth": 0,
"maxBandwidth": null
}
},
"preferredAudioLanguage": "en",
"preferredTextLanguage": "",
"preferredVariantRole": "",
"preferredTextRole": "",
"preferredAudioChannelCount": 2,
"restrictions": {
"minWidth": 0,
"maxWidth": null,
"minHeight": 0,
"maxHeight": null,
"minPixels": 0,
"maxPixels": null,
"minFrameRate": 0,
"maxFrameRate": null,
"minBandwidth": 0,
"maxBandwidth": null
},
"playRangeStart": 0,
"playRangeEnd": null
}
What did you do?
Playback the stream, then switch to a different audio track.
What did you expect to happen?
The playback to continue. The same manifest and player configuration works on Chrome and Firefox.
What actually happened?
The playback stopped and is stuck buffering/seeking:
[Log] Found variant with audio and video content, so filtering out audio-only content. (application.js, line 105795)
[Log] codecs – "avc1-mp4a" – "avg bandwidth" – 2200054.4 (application.js, line 105479)
[Log] init: completed initial Stream setup (application.js, line 105608)
[Log] Calling switch_(), bandwidth=324140 kbps (application.js, line 105505)
[Log] switch_ (application.js, line 105864)
[Log] (audio:11) – "buffered to end of presentation" (application.js, line 105637)
[Log] (video:1) – "buffered to end of presentation" (application.js, line 105637)
[Log] switch: Stream (video:1) already active (application.js, line 105618)
[Log] switch: switching to Stream (audio:5) (application.js, line 105617)
[Log] (audio:5) – "clearing buffer" (application.js, line 105665)
[Log] (audio:5) – "cleared buffer" (application.js, line 105666)
[Log] (all): seeked: buffered seek: presentationTime=26.070636705 (application.js, line 105624)
[Log] (audio:5) – "buffered to end of presentation" (application.js, line 105637)
[Log] Stall detected at 26.0706367 for 1.003999948501587 seconds. (application.js, line 105577)
[Log] Seeking forward 0.1 seconds to break stall. (application.js, line 105577)
[Log] (all): seeked: buffered seek: presentationTime=26.170636700000003 (application.js, line 105624)
[Log] Stall detected at 26.1706367 for 1.001000165939331 seconds. (application.js, line 105577)
[Log] Seeking forward 0.1 seconds to break stall. (application.js, line 105577)
[Log] (all): seeked: buffered seek: presentationTime=26.2706367 (application.js, line 105624)
We are getting the same results when using a HLS stream. Playback works until you switch to a different audio track. https://www.dropbox.com/s/f604y1rer3dussn/hls.zip?dl=0
Hi @dsander Ideally, we require a hosted manifest link and media content for a repro. Do you think you can provide that? If you have privacy concerns, you can send the info to [email protected]
You can check if the issue reproduces with the latest master by trying it on our nightly demo page (under the "CUSTOM CONTENT" tab).
Hi @ismena,
sharing wasn't the problem CORS is the annoying part 😄
DASH: https://shakadebug.s3.eu-central-1.amazonaws.com/dash/stream.mpd HLS: https://shakadebug.s3.eu-central-1.amazonaws.com/hls/master.m3u8 (we don't normally work with HLS, I am also getting errors on Chrome, but even without audio playback Safari has the same behavior of stopping playback when switching the audio track)
I didn't see any difference with the nightly player.
Confirmed. It also seems to take a long time to start, which we should look into. It may be a platform bug since we have content buffered, but the video refuses to move.
I reproduced the same problem on some models of WebOS 3.5, but not all ...
I ran into this issue also. I was hunting around to find a duplicate before I created a new bug, and it appears I have found one. In my particular test I tested on safari and switching audio tracks fails, but tried in edge on win10 and it works. I chose these two browsers because the video is HEVC and won't work anywhere else, but if you want another test asset that duplicates the issue (and one with lots of test audio tracks): https://content.uplynk.com/2e881c1059bd47cfbd2844c40ec9931b.mpd?sstart=5