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

Multi-Period: Get the correct variant / text streams for the current period #2887

Closed
valotvince opened this issue Sep 30, 2020 · 3 comments
Closed
Labels
status: archived Archived and locked; will not be updated type: question A question from the community

Comments

@valotvince
Copy link
Contributor

valotvince commented Sep 30, 2020

Have you read the Tutorials?

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

What version of Shaka Player are you using?
v3.0.3

Please ask your question
How could we get the current variants / text streams for the playing period ? That would be helpful to prevent showing audio tracks / subtitles tracks which disappear from period to period, and that would be really helpful in case of a live start-over or time-shifting.

  • P1

    • French Audio
    • English Audio
  • P2

    • French Audio

... and English audio might appear back in another Period

@valotvince valotvince added the type: question A question from the community label Sep 30, 2020
@joeyparrish
Copy link
Member

Let's expand your example slightly for the sake of discussion:

  • P1: French & English
  • P2: French
  • P3: French & English

In v2.5, we modeled DASH periods internally, and tracks were per-Period. So if you transitioned from P1 to P2, the English audio track would disappear.

This caused issues, however. For example, if the user selects English in P1, they would be forced into French at P2. Then when they reach P3, should we play French or English?

Obviously, as a human reading this example, you would want English back. However, it was difficult to know from the API what the user's intent was, and there are cases less obvious than language. An app can select any track with selectVariantTrack(), and we don't know what attribute caused them to select that track. So how can we maintain that user intent across periods? In short, we can't.

So in v3.0+, we combine periods and create tracks that span DASH periods. So the combined tracks from our example look like this in v3:

  • French: P1 French, P2 French, P3 French
  • English: P1 English, P2 French, P3 English

Because we've explicitly mapped tracks across periods in advance, there's no automatic track changes at period boundaries. A app's or user's selection is always preserved, no matter what track attributes were used to make the selection.

Does this help?

@shaka-bot
Copy link
Collaborator

@valotvince Does this answer all your questions? Can we close the issue?

@shaka-bot shaka-bot added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Oct 4, 2020
@valotvince
Copy link
Contributor Author

@joeyparrish Thank you for the explanation :)

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Oct 5, 2020
@shaka-project shaka-project locked and limited conversation to collaborators Dec 4, 2020
@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: question A question from the community
Projects
None yet
Development

No branches or pull requests

3 participants