-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
video.js: Local patch for subtitle loading behavior
Upstream PR in progress, will add more adjustments to it and later will be able to remove this patch here. videojs/video.js#6043 Bug: T222763 Change-Id: I4d2eeb44dacdcd12c7717d208b21bed2775a8360
- Loading branch information
1 parent
2a1dbb7
commit c6390e0
Showing
3 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff -ur node_modules/video.js/dist/video.js old-video.js-patched/dist/video.js | ||
--- dist/video.js 1985-10-26 01:15:00.000000000 -0700 | ||
+++ dist/video.js 2019-06-12 08:26:10.000000000 -0700 | ||
@@ -7930,6 +7930,9 @@ | ||
|
||
mode = newMode; | ||
|
||
+ if (mode !== 'disabled' && this.cues.length === 0) { | ||
+ loadTrack(this.src, this); | ||
+ } | ||
if (mode !== 'disabled') { | ||
this.tech_.ready(function () { | ||
_this2.tech_.on('timeupdate', timeupdateHandler); | ||
@@ -8022,7 +8025,10 @@ | ||
|
||
if (settings.src) { | ||
_this.src = settings.src; | ||
- loadTrack(settings.src, _assertThisInitialized(_assertThisInitialized(_this))); | ||
+ _this.loaded_ = true; | ||
+ if (default_ || (settings.kind !== 'subtitles' && settings.kind !== 'captions')) { | ||
+ loadTrack(_this.src, _assertThisInitialized(_assertThisInitialized(_this))); | ||
+ } | ||
} else { | ||
_this.loaded_ = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters