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

Allow switching between periods with and without text #715

Closed
miyukki opened this issue Mar 2, 2017 · 7 comments
Closed

Allow switching between periods with and without text #715

miyukki opened this issue Mar 2, 2017 · 7 comments
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request

Comments

@miyukki
Copy link

miyukki commented Mar 2, 2017

  • What version of Shaka Player are you using?
    v2.0.6

    • Can you reproduce the issue with our latest release version?
      yes

    • Can you reproduce the issue with the latest code from master?
      yes

  • Are you using the demo app or your own custom app?
    my custom app

    • If custom app, can you reproduce the issue using our demo app?
      not tried
  • What browser and OS are you using?
    electron v1.6.1

  • What did you do?

    • What content did you load?
      Load the MPD manifest written with some periods.
      One period has a video and audio. But next one has a video only.
  • What did you expect to happen?
    can play the content having different stream types between periods.

  • What actually happened?
    shaka raised INVALID_STREAMS_CHOSEN error when I played between period.

I found that shaka prevent different stream in StreamingEngine.
https://github.com/google/shaka-player/blob/fc46b29ed8b0781bf60165682f125470e2c04b22/lib/media/streaming_engine.js#L1687-L1708

Why shaka implemented such behaviour?

@TheModMaker
Copy link
Contributor

We use MSE to play media. We create a buffer for audio and video data and append data as we get it. The browser pulls data from the buffers to play it in the <video> element. If we switch from video+audio to just video, the browser will pause at the transition waiting for the content to buffer, but it doesn't know that the audio is never coming.

What we could do is reset MSE once we get to the transition, but then the transition won't be smooth since we need to delete everything and re-download it when the playhead gets there. It would also be a lot more complicated to implement. To make things simpler, we don't allow changing from video+audio to video-only.

@TheModMaker TheModMaker added the type: question A question from the community label Mar 2, 2017
@miyukki
Copy link
Author

miyukki commented Mar 3, 2017

@TheModMaker Okay, I see.
Does shaka have the policy to prevent different stream types, or will it play if possible in the future?

@TheModMaker
Copy link
Contributor

I don't understand your question, can you rephrase? Are you asking if we support things other than audio/video/text, or are you asking about what the purpose of that code is?

@TheModMaker
Copy link
Contributor

I should note that although we won't support changing video+audio to video-only, we should support changing between text and no text. I was told that we don't support changing between Periods that do and do not have text streams. That is something we should fix.

@miyukki
Copy link
Author

miyukki commented Mar 6, 2017

@TheModMaker I understand. Thanks.

@miyukki miyukki closed this as completed Mar 6, 2017
@joeyparrish joeyparrish added type: enhancement New feature or request and removed type: question A question from the community labels Mar 6, 2017
@joeyparrish joeyparrish changed the title Question: why shaka cannot play the content having different stream types between periods Allow switching between periods with and without text Mar 6, 2017
@joeyparrish
Copy link
Member

Renamed and reopened to track switching between periods with and without text.

@joeyparrish joeyparrish reopened this Mar 6, 2017
shaka-bot pushed a commit that referenced this issue Mar 9, 2017
We don't allow switching between Periods that are video+audio to
video-only because it is incompatible with MSE.  When the browser
gets to the transition, it will pause waiting for the audio buffer.

However, we should allow switching between Periods that do and do not
have text streams.

Issue #715

Change-Id: I77f3bf92681d8181c90169b8f4a15857b7d9e66d
joeyparrish pushed a commit that referenced this issue Mar 23, 2017
We don't allow switching between Periods that are video+audio to
video-only because it is incompatible with MSE.  When the browser
gets to the transition, it will pause waiting for the audio buffer.

However, we should allow switching between Periods that do and do not
have text streams.

Backport to v2.0.x

Issue #715

Change-Id: I77f3bf92681d8181c90169b8f4a15857b7d9e66d
@joeyparrish
Copy link
Member

This was just released in v2.0.7.

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: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants