-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio tracks switching on Chromecast #544
Comments
@wipawan, please try to use the issue template we provide. There is much more information we need to investigate this:
|
@joeyparrish thanks for quick reply! please see my response below:
Audio tracks switching works perfectly with the player on Chrome browser. The issue seems to appear only when casting on Chromecast. |
I can reproduce using "Angel One" and the manual track controls in the "Info" panel of the demo app in uncompiled mode.
You can make the track switching behavior more obvious by reducing the buffering goals. Run this in the JS console just after clicking "Load": shakaDemo.player_.configure({streaming: {bufferingGoal: 5, bufferBehind: 5}}); So probably the bug is in clearing the buffer. |
So far, this appears to be a Chromecast bug. Shaka Player is calling remove(0, 60) on the audio SourceBuffer, and I will reach out to the Chromecast team for further assistance. |
Quickest repro:
The effect should be immediate because we clear the buffer. We even stop to buffer the new audio, but it doesn't take effect until after the previous data is rendered. If you've buffered the whole 60-second clip, you'll never hear the new audio. |
We will need some kind of workaround for Chromecast since clearing the buffer does not flush the pipeline. Chromecast team recommends seeking to flush. |
To work around a bug in Chromecast, seek after clearing the buffer. This forces the device to flush the pipeline and remove any decoded data from the old representation. Closes #544 Change-Id: I3c34d344bfd856b429a360fc41ce7288791716bb
A workaround has been committed, but will not show up in our receiver demo until we deploy a new release to appspot. v2.0.1 is coming soon, though. |
thanks @joeyparrish! sorry for the late reply. I managed to get to work by force seeking backward by one second (currentTime -= 1) . i'll keep a look out for the new version! 👍 |
JFYI, this fix was released as part of v2.0.1. |
This caused regression #569 |
I encountered an issue while casting Shaka Player Demo on the Chromecast. The active audio track is not immediately changed after it is selected. It is only changed after I pause the video for a few seconds. I played "Angel One (multicodec, multilingual)". The same behaviour happens in my implementation.
Here's my code:
this.mediaPlayer.selectTrack(selectedAudioTrack, true); this.mediaPlayer.getConfiguration().abr.enabled = true;
The text was updated successfully, but these errors were encountered: