mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-19 10:29:16 +00:00
revert VTTCue object when have to
This commit is contained in:
parent
f9be3e9725
commit
6a3e65764e
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,6 @@ function parse(text) {
|
|||
var nativeVTTCue = VTTCue;
|
||||
global.VTTCue = VTTJS.VTTCue;
|
||||
var parser = new VTTJS.WebVTT.Parser(window, VTTJS.WebVTT.StringDecoder());
|
||||
global.VTTCue = nativeVTTCue;
|
||||
var cues = [];
|
||||
var cuesByTime = {};
|
||||
parser.oncue = function(c) {
|
||||
|
|
@ -42,6 +41,7 @@ function parse(text) {
|
|||
};
|
||||
parser.parse(text);
|
||||
parser.flush();
|
||||
global.VTTCue = nativeVTTCue;
|
||||
cuesByTime.times = Object.keys(cuesByTime)
|
||||
.map(function(time) {
|
||||
return parseInt(time);
|
||||
|
|
|
|||
Loading…
Reference in a new issue