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

Switching text languages mid-playback clears buffer and remains with old languages until next period #1774

Closed
salmoro opened this issue Jan 22, 2019 · 16 comments
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@salmoro
Copy link

salmoro commented Jan 22, 2019

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
2.5.0-beta2 (also applicable to 2.4.5)

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from master?
Haven't tried

Are you using the demo app or your own custom app?
Both

If custom app, can you reproduce the issue using our demo app?
Yes

What browser and OS are you using?
Windows 10 chrome 73 (applicable to other OSs as well)

For embedded devices (smart TVs, etc.), what model and firmware version are you using?

What are the manifest and license server URIs?
https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine-hls/hls.m3u8

What did you do?

  1. Load & start playing (in demo app).
  2. Turn on captions.
  3. See captions appear on screen.
  4. Switch text language.

What did you expect to happen?

  1. Video should continue playing.
  2. Buffered video portions should remain.
  3. Newly selected language should appear at next caption display.

What actually happened?

  1. Video stalls for a bit (until re-buffered).
  2. Buffered video portion clears.
  3. Previous languages continues to appear in captions and selected one does not.
@ismena
Copy link
Contributor

ismena commented Jan 22, 2019

Hi @salmoro
I'm having trouble with the repro. Do you see this on our demo page or the nightly build? Do the links have the correct asset? (It shouldn't matter, but still).

@salmoro
Copy link
Author

salmoro commented Jan 23, 2019

@ismena Sorry. I too am having trouble reproducing with the above content (even though I'm pretty sure I was yesterday). On private content I'm able to reproduced consistently. Can I PM you a link to private content?

@ismena
Copy link
Contributor

ismena commented Jan 23, 2019

Yes! Please send it to shaka-player-issues@google.com (mention the issue # in the subject) and we'll take a look.
Please note that for protected content we will need drm information.

@michellezhuogg michellezhuogg added status: waiting on response Waiting on a response from the reporter(s) of the issue and removed needs triage labels Jan 31, 2019
@shaka-bot
Copy link
Collaborator

Closing due to inactivity. If this is still an issue for you or if you have further questions, you can ask us to reopen or have the bot reopen it by including @shaka-bot reopen in a comment.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Feb 7, 2019
@TheModMaker TheModMaker reopened this Mar 4, 2019
@TheModMaker TheModMaker added the type: bug Something isn't working correctly label Mar 4, 2019
@TheModMaker TheModMaker added this to the v2.5 milestone Mar 4, 2019
@michellezhuogg
Copy link
Contributor

Hello @salmoro , I am seeing 'Invalid Token' from the link you sent us via email. Is your content still available for testing?

@michellezhuogg michellezhuogg added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Mar 19, 2019
@salmoro
Copy link
Author

salmoro commented Mar 25, 2019

@michellezhuogg Sorry about that. We've removed the authorization requirements for that link.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Mar 25, 2019
@joeyparrish joeyparrish self-assigned this Apr 18, 2019
@joeyparrish joeyparrish removed their assignment May 7, 2019
@joeyparrish
Copy link
Member

@salmoro, I don't see any subtitles on this content. Several text languages show up in the menu, but I have yet to see any cues after a few minutes of playback. So I'm unable to reproduce this issue.

@joeyparrish joeyparrish modified the milestones: v2.5, Backlog May 7, 2019
@joeyparrish joeyparrish added the status: unable to reproduce Issue could not be reproduced by the team label May 7, 2019
@joeyparrish
Copy link
Member

If this is still an issue in the latest code, please provide instructions on how to reproduce (specific languages and timestamps may help), and we will take another look.

@joeyparrish joeyparrish modified the milestones: Backlog, v2.6 May 8, 2019
@salmoro
Copy link
Author

salmoro commented May 20, 2019

@joeyparrish I've just emailed a new link of our private content to shaka-player-issues@google.com (titled Issue #1774).

Steps to reproduce:

  1. Open Shaka demo app https://shaka-player-demo.appspot.com (v2.5.0 -uncompiled).
  2. Select "Custom Content" on the top bar and add the manifest URL (provided in email).
  3. Begin playing the content.
  4. Jump to about 1:30 (where subtitles exist).
  5. Click on the 3-dot menu on the bottom right of the player and select Captions->English and notice the English captions appear on the the screen.
  6. Click again on the menu and select Captions->Espanol and notice how the English captions still remain.
  7. Skip forward to 12:30 (new period) and notice how the Spanish Captions are now appearing on the screen.

@joeyparrish joeyparrish removed the status: unable to reproduce Issue could not be reproduced by the team label May 20, 2019
@joeyparrish
Copy link
Member

Thanks! I can confirm this bug now in v2.5.0.

Notes:

  • When seeking to time 90, there is an exception when the UI tries to update the audio language list. TypeError: Cannot read property 'language' of undefined because selectedTrack is undefined.
  • When selecting the Spanish subtitles, the console shows many failed assertions with Inconsistent active text stream

@joeyparrish
Copy link
Member

This bug and all of the symptoms I documented above can still be seen in the nightly build.

shaka-bot pushed a commit that referenced this issue Jun 18, 2019
When switch() is called, it checks for what segment/period the media
state will need to fetch next. As text is much smaller than audio/
video, it might be the case that text has all the segments in
period i while audio and video are still in the process of fetching
them.
Thus, the next period needed for text will be i+1, while for other
media states it will be i.
Switch() assumes that if the period needed is not the same as
current period, a perios transition is about to happen and there's
no point in switching streams now since they're about to change on
the next update anyway.
However, the period transition only happenes if all the media
states require it. In our edge case, only text is ready for the
next period, so transition will not happen.
This change corrects the assumption "if a media state is ready
for the new period, don't switch" to assumption "if ALL media
states are ready for the new period, don't switch."

Issue #1774

Change-Id: I35f1b7ae10704922fb5692e02fc5f2edc6982575
@ismena
Copy link
Contributor

ismena commented Jun 18, 2019

Hi @salmoro
Sorry for the delay. The main problem should be now fixed in master.
We're not closing the issue just yet as I'm still seeing a few weird things with this content:

  • The UI exception @joeyparrish mentioned is still there though unrelated to the subtitles
  • Not all the subtitle languages are displayed when selected.

We'll need to look into this further.

@ismena
Copy link
Contributor

ismena commented Jun 20, 2019

@salmoro the content is no longer available on the server. If you're interested in pursuing this issue further, please let us know by providing an updated manifest!

@ismena ismena added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jun 20, 2019
@salmoro
Copy link
Author

salmoro commented Jun 23, 2019

@ismena Sorry about that. Just sent you a new link via email. TY

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jun 23, 2019
@ismena
Copy link
Contributor

ismena commented Jun 24, 2019

Got the link!
Changing subtitles works on latest master and our nightly build.
The only two languages missing are "hu" and "pt", and their vtt files are empty (don't actually provide any subtitles).

Please try the new master and let me know if you have any questions :)

TheModMaker pushed a commit that referenced this issue Jul 3, 2019
When switch() is called, it checks for what segment/period the media
state will need to fetch next. As text is much smaller than audio/
video, it might be the case that text has all the segments in
period i while audio and video are still in the process of fetching
them.
Thus, the next period needed for text will be i+1, while for other
media states it will be i.
Switch() assumes that if the period needed is not the same as
current period, a perios transition is about to happen and there's
no point in switching streams now since they're about to change on
the next update anyway.
However, the period transition only happenes if all the media
states require it. In our edge case, only text is ready for the
next period, so transition will not happen.
This change corrects the assumption "if a media state is ready
for the new period, don't switch" to assumption "if ALL media
states are ready for the new period, don't switch."

Issue #1774

Change-Id: I35f1b7ae10704922fb5692e02fc5f2edc6982575
AnteWall pushed a commit to AnteWall/shaka-player that referenced this issue Jul 17, 2019
When switch() is called, it checks for what segment/period the media
state will need to fetch next. As text is much smaller than audio/
video, it might be the case that text has all the segments in
period i while audio and video are still in the process of fetching
them.
Thus, the next period needed for text will be i+1, while for other
media states it will be i.
Switch() assumes that if the period needed is not the same as
current period, a perios transition is about to happen and there's
no point in switching streams now since they're about to change on
the next update anyway.
However, the period transition only happenes if all the media
states require it. In our edge case, only text is ready for the
next period, so transition will not happen.
This change corrects the assumption "if a media state is ready
for the new period, don't switch" to assumption "if ALL media
states are ready for the new period, don't switch."

Issue shaka-project#1774

Change-Id: I35f1b7ae10704922fb5692e02fc5f2edc6982575
@TheModMaker
Copy link
Contributor

I also cannot reproduce any error. If this is still an issue for you or if you have further questions, you can ask us to reopen or have the bot reopen it by including @shaka-bot reopen in a comment.

@shaka-project shaka-project locked and limited conversation to collaborators Sep 27, 2019
@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

6 participants