Infinite buffering on audio track switch on Xfinity
FAQ
- I have read the FAQ and checked for duplicate open issues
If the problem is related to FairPlay, have you read the tutorial?
Not applicable
What version of Shaka Player are you using?
5.2.9
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from main?
Yes
Are you using the demo app or your own custom app?
Custom app
What browser and OS are you using?
Xfinity STB
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Xi6, XiOne
What are the manifest and license server URIs?
Will be sent by email if required.
What configuration are you using? What is the output of player.getNonDefaultConfiguration()?
{
"drm": {
"servers": {
"com.widevine.alpha": "",
"com.microsoft.playready": "",
"com.apple.fps.1_0": ""
},
"preferredKeySystems": [
"com.widevine.alpha"
]
},
"streaming": {
"retryParameters": {
"maxAttempts": 5
},
"stallSkip": 0
},
"abr": {
"useNetworkInformation": false,
"defaultBandwidthEstimate": 900000,
"minTimeToSwitch": 3
},
"preferredAudio": [
{
"language": "EN",
"role": ""
}
],
"preferredVideo": [
{
"label": "",
"role": "",
"language": "",
"codec": "hvc",
"hdrLevel": "",
"layout": ""
},
{
"label": "",
"role": "",
"language": "",
"codec": "avc",
"hdrLevel": "",
"layout": ""
}
]
}
What did you do?
Start a multi language playback and switch to another language.
What did you expect to happen?
The playback should continue with the newly selected language.
What actually happened?
Since #10428, switching audio tracks on Xfinity causes playback to get stuck in an infinite loading state.
The root cause appears to be the seek performed in flush_, which ends up clearing the entire media pipeline, including decryption. Removing the currentTime -= 0.001 line resolves the issue, confirming this is the trigger.
I'm not certain what the best long-term fix is, but calling mediaState.segmentPrefetch.clearAll(true) also resolves the issue. I guess that a platform-specific condition could be a viable workaround.
Are you planning to send a PR to add it?
Yes
Source: shaka-project/shaka-player