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

Store and use fragmentedText settings in localStorage #3293


Copy link

jeffcunat commented Jun 16, 2020

fragmentedText initial settings were already stored in localStorage but never used.
This PR allows to reuse previous subtitles settings stored in localStorage.

They are only used when loading a stream if

  • settings streaming.lastMediaSettingsCachingInfo.enabled is true
  • textDefaultEnabled is not explicitly false (can be undefined if setTextDefaultEnabled is not called)
  • setInitialMediaSettingsFor('fragmentedText') has not been called to set preferred language and/or role

This means that, if no other settings are set, dash.js player will reuse previously used subtitles language/role when loading a new stream (like what is already done for audio content)

samples/captioning/multi-track-captions.html has been modified in order to test various settings combination (no more auto-load to be able to set settings before loading)

@jeffcunat jeffcunat added the Subtitles label Jun 16, 2020
@dsilhavy dsilhavy added this to the 3.1.2 milestone Jun 16, 2020
@dsilhavy dsilhavy self-requested a review Jun 16, 2020
@jeffcunat jeffcunat force-pushed the Orange-OpenSource:textSettingsInLocalStorage branch from 968b4af to f7b2f6f Jul 6, 2020
@@ -282,6 +302,9 @@ function TextController() {

let oldTrackIdx = textTracks.getCurrentTrackIdx();
if (oldTrackIdx !== idx) {
if (allTracksAreDisabled && mediaController) {

This comment has been minimized.


dsilhavy Jul 14, 2020 Collaborator

Can we use mediaController.setTrack here instead of saveTextSettingsDisabled?

This comment has been minimized.


bbert Jul 15, 2020 Contributor

That would complexify mediaController.setTrack

@dsilhavy dsilhavy merged commit c67d3d3 into Dash-Industry-Forum:development Jul 15, 2020
2 checks passed
2 checks passed
ci/circleci: build Your tests passed on CircleCI!
commit-workflow Workflow: commit-workflow
@bbert bbert deleted the Orange-OpenSource:textSettingsInLocalStorage branch Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.