-
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
fix: user can pick variant track/texttrack from streaming event #3459
Conversation
I think this fix is too broad. I'm not convinced that it's correct to keep the active track for all the various ways and times that chooseVariant_ is called. Instead, you should make the call right after the streaming event conditional. If there's no active track, you would call chooseVariant_. Otherwise, skip it. Does this help? |
allowed user to pick variant track from streaming event
@joeyparrish is this what you mean ? PTAL. |
hi @joeyparrish , thanks for the suggestion, js have such a nice gem, also I've fix style - it pass |
hi @joeyparrish, PTAL |
@joeyparrish , PTAL, there is one fail test, https://github.com/google/shaka-player/blob/master/test/player_unit.js#L2001-L2005, I've not dig into it yet, but is it fail because this is a new case for it ?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I overlooked your previous comment. Your change breaks an existing test case. As far as I can tell, the test case is still valid, and you've changed the behavior. The test case shows that the initial choice is based on the configuration of language and role preferences. This is an important behavior.
I will see if I can identify the issue, and if so, I'll suggest a fix.
Test Failure:
|
What I'm seeing as I debug this is:
I'm trying to track down why this happens. But I'm fairly sure it has always been this way, and that your change merely uncovered it. Without your change, we would always re-evaluate the initial track selection, so the fact that there was an "active" track from a previous |
Everything I said above is only true in the environment of this unit test. There, we override streamingEngine with a fake, and one that persists. Therefore the active tracks are persisting as well. I need to fix the fake to release its track list when destroy() is called. That should make it behave more like the real thing, and that should make the test pass again. |
I have fixes for this in review internally. When they are merged, I will merge this PR. Thanks! |
Player unit tests use a fake StreamingEngine that persists between loads. Some tests then load() multiple times, which causes calls to destroy() on the fake. But the fake StreamingEngine was not releasing its active stream references on destroy(), leading to a brittle test that broke when PR #3459 was introduced. This fixes the fake to release active streams between loads(). Change-Id: Ifea5234863aeb976ddc45c825ef79342a176bc2f
Thanks! |
Just as we reset text language and role, we should also reset forced sub state between load() calls. Discovered while debugging PR #3459. Change-Id: I22ef29cb6b14e02ee70503595b1303389260a633
Player unit tests use a fake StreamingEngine that persists between loads. Some tests then load() multiple times, which causes calls to destroy() on the fake. But the fake StreamingEngine was not releasing its active stream references on destroy(), leading to a brittle test that broke when PR #3459 was introduced. This fixes the fake to release active streams between loads(). Change-Id: Ifea5234863aeb976ddc45c825ef79342a176bc2f
Just as we reset text language and role, we should also reset forced sub state between load() calls. Discovered while debugging PR #3459. Change-Id: I22ef29cb6b14e02ee70503595b1303389260a633
In v2.5, we could choose a track explicitly from the "streaming" event. In v3, this was broken. Now the player will not choose any tracks automatically if explicit tracks were chosen by the app during the "streaming" event. Closes #3448 Backported to v3.1.x Change-Id: I61aad438be0d71e0ba21c9473e03850bb210fcef
Player unit tests use a fake StreamingEngine that persists between loads. Some tests then load() multiple times, which causes calls to destroy() on the fake. But the fake StreamingEngine was not releasing its active stream references on destroy(), leading to a brittle test that broke when PR #3459 was introduced. This fixes the fake to release active streams between loads(). Change-Id: Ifea5234863aeb976ddc45c825ef79342a176bc2f
In v2.5, we could choose a track explicitly from the "streaming" event. In v3, this was broken. Now the player will not choose any tracks automatically if explicit tracks were chosen by the app during the "streaming" event. Closes #3448 Backported to v3.1.x Change-Id: I61aad438be0d71e0ba21c9473e03850bb210fcef
Description
fix #3448
in 2.5.1, we can pick variant track from manifest alone.
this functionality is broken from v3.
this patch allowed user to pick variant track from streaming event.
Type of change
Checklist: