Skip to content
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

'trackschanged' event not fired correctly for multi-Period content #680

Closed
TheModMaker opened this issue Feb 2, 2017 · 0 comments
Closed
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@TheModMaker
Copy link
Contributor

The trackschanged event from the Player doesn't fire at the correct time WRT player.getTracks(). Currently, it fires when StreamingEngine handles a Period transition and starts buffering content from that Period. However, player.getTracks will return tracks based on the current playhead position. This means that when the event fires, the tracks returned haven't actually changed and will change once the playhead moves. This also means that if you seek backwards into a different buffered Period, the event will not fire.

Another side effect of this is that while the playhead is in the old Period and StreamingEngine is buffering from the new Period, the tracks.active field is not correct. The active field is determined from the current streams in StreamingEngine; this means that while the playhead is in a different Period, there will be no active tracks. The demo app currently throws errors because of this.

@TheModMaker TheModMaker added the type: bug Something isn't working correctly label Feb 2, 2017
@joeyparrish joeyparrish added this to the v2.1.0 milestone Feb 2, 2017
@TheModMaker TheModMaker self-assigned this Feb 3, 2017
shaka-bot pushed a commit that referenced this issue Feb 6, 2017
Before, we would fire a 'trackschanged' event when StreamingEngine
asked us to select streams for a new Period.  However, this is not
when the tracks change, they change when the playhead moves into a
different Period.

This adds code to Playhead to track where the current Period is and
raise an event when it changes.  This also reduces any extra events so
a 'trackschanged' event is only fired when the tracks actually change.

Issue #680

Change-Id: I85aedaed737f9324d5871201d952066886ea290c
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants