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

Refactor text tracks #3641

Merged

Conversation

bbert
Copy link
Contributor

@bbert bbert commented May 21, 2021

This PR refactors text tracks managements in order to:

  • keep only type "text" for all text tracks (removed 'fragmentedText' and 'embeddedText' types)
  • rely on TextTrackInfo.isFragmented and isEmbedded to get type of text tracks
  • unify text tracks metadata returned by MediaPlayer.getTracksFor() and in TEXT_TRACKS_ADDED event (TextTrackInfo extends MediaInfo)
  • rely on segments templates to know if a text track is fragmented or not

As a benefit:

  • you can get all text tracks using MediaPlayer.getTracksFor('text') agnostically to the type of text tracks (fragmented or not, or embedded) and then ease the managements text tracks of different types in the same stream
  • the list of embedded text tracks are therefore availaible using MediaPlayer.getTracksFor('text'), this was not the case before
  • media settings preferences (language, role) are then persistent accross all types of text tracks
  • fragmented vtt text tracks without mp4 format are supported

bbert added 3 commits May 17, 2021 17:19
…mple fragmented vtt):

- use segment info/template from manifest to determine if track is fragmented or not (do not rely on codecs property)
- use TextSourceBuffer also for "vtt" codec
- do not request for init segments if none
- keep only type "text" for all text tracks
- rely on TextTrackInfo.isFragmented and isEmbedded to get type of text tracks
- unify text tracks metadata returned by MediaPlayer.getTracksFor() and in TEXT_TRACKS_ADDED event (TextTrackInfo extends MediaInfo)
- rely on segments templates to know if a text track is fragmented or not
@dsilhavy dsilhavy added this to the 4.0.0 milestone May 22, 2021
@dsilhavy dsilhavy self-requested a review May 22, 2021 07:57
src/dash/models/DashManifestModel.js Outdated Show resolved Hide resolved
src/streaming/text/TextSourceBuffer.js Outdated Show resolved Hide resolved
src/streaming/text/TextSourceBuffer.js Outdated Show resolved Hide resolved
src/streaming/text/TextSourceBuffer.js Show resolved Hide resolved
src/streaming/text/TextSourceBuffer.js Show resolved Hide resolved
@dsilhavy dsilhavy merged commit 77b96ef into Dash-Industry-Forum:development Jun 11, 2021
@bbert bbert deleted the feat-text-tracks branch June 11, 2021 14:34
@bbert bbert restored the feat-text-tracks branch July 12, 2021 15:12
@bbert bbert deleted the feat-text-tracks branch July 12, 2021 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants