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

All segments from time zero are reloaded when switching track #1369

Closed
davemevans opened this issue Apr 29, 2016 · 9 comments
Closed

All segments from time zero are reloaded when switching track #1369

davemevans opened this issue Apr 29, 2016 · 9 comments
Assignees
Milestone

Comments

@davemevans
Copy link
Contributor

#1242 seems to have caused a regression when switching tracks while fixing multiperiod.

This is because when a new StreamProcessor is created, its currentTime is no longer set which causes the scheduler to start from zero.

This was reported on another ticket - I've copied and pasted the detail below:

@esteban-dosztal wrote:

having an issue that seems related to this. I wrote an audio language selector, ad it works fine, but when I select a different language, I see in Chrome Dev Tools network panel that Dash.js starts to load all the previous audio fragments fragments, i.e., let's say I have to audio languages, english and spanish, and I have advanced in the reproduction, so my current english audio fragment is 250; then I select to change to spanish audio, and Dash starts to load spanish audio fragments from fragment 1. I'm calling this.mediaPlayer_.setTrackSwitchModeFor('audio', 'neverReplace'); before MediaPlayer.attachSource, but it didn't change anything. ¿Am I doing something wrong, or it is a bug in Dash.js? I'm using version 2.1.1.

@davemevans davemevans added this to the 2.2.0 milestone Apr 29, 2016
@dsparacio
Copy link
Contributor

@bbcrddave you happen to have a good multi-track test stream i am work this one out with?

@davemevans
Copy link
Contributor Author

@dsparacio dsparacio self-assigned this Apr 29, 2016
@dsparacio
Copy link
Contributor

Oh that is wonderful! OK I am able to reproduce this and will fix.

@dsparacio
Copy link
Contributor

Easy to fix but need to make sure i do not break the original PR so it will take me some time to validate the fix. Thanks for catching this one guys.

@dsparacio
Copy link
Contributor

OK I am pretty happy with fix so far and MP works just as well post change. Current time was already passed on track change to create stream processor but not set on index handler in the optional settings , with this line it picks up at the playhead not at id 1.

streamProcessor.getIndexHandler().setCurrentTime(optionalSettings.currentTime);

I want to make sure I am not fixing one thing and breaking something else so i need do a bit more digging on the change that took this line out which is different from the #1242 PR

@bwidtmann
Copy link
Contributor

If I have understood this bug correctly, I think this is blocking us from deploying 2.1.1 as switching languages is a big issue for us and CDN costs as well.

@dsparacio
Copy link
Contributor

You can fix with a one line change so do not let it block you. Ill push the change today in to dev branch. Sorry for the blocker guys.

dsparacio pushed a commit that referenced this issue May 2, 2016
LloydW93 pushed a commit to bbc/dash.js that referenced this issue May 3, 2016
…sh-Industry-Forum#1369.  This was done as a hack before I fixed the actual problem with MP for FireFox and issue Dash-Industry-Forum#1217  This commit will fix Dash-Industry-Forum#1369
@bwidtmann
Copy link
Contributor

@AkamaiDASH thanks for pointing out.

@dsparacio
Copy link
Contributor

@bwidtmann I have pushed it into dev (32f6982)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants