@viewlift/player-backup 1.0.4-lighteningjs → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/autoNextVideo-823821e8.js +1 -0
- package/cjs/bundle.css +657 -0
- package/cjs/caption-settings-67212c17.js +1 -0
- package/cjs/caption-settings-d42c056e.js +1 -0
- package/cjs/debugSelection-cbfdabb7.js +1 -0
- package/cjs/dvr_skin-f7f770ae.js +1 -0
- package/cjs/error-26d5a3c3.js +1 -0
- package/cjs/features-dfe03404.js +1 -0
- package/cjs/generic-8b99b151.js +1 -0
- package/cjs/icons-7afb9c13.js +1 -0
- package/cjs/index-1f8b5f12.js +1 -0
- package/cjs/index-2b74e462.js +1 -0
- package/cjs/index.js +1 -0
- package/cjs/keyboardShortcuts-cfd998c2.js +1 -0
- package/cjs/loader-393b838a.js +1 -0
- package/cjs/multicam-21c9a90b.js +1 -0
- package/cjs/multicam-a41fe4a6.js +1 -0
- package/cjs/multicamv2-76d8530b.js +1 -0
- package/cjs/multicamv2-c148fa24.js +1 -0
- package/cjs/mwebPotrait-3c11d7cf.js +1 -0
- package/cjs/mwebPotraitTray-b9d5d45a.js +1 -0
- package/cjs/nextEpisodeButton-300afadc.js +1 -0
- package/cjs/nextEpisodeButton-b6e6586f.js +1 -0
- package/cjs/nondvr_skin-ef2cb3b2.js +1 -0
- package/cjs/playlist-925f808b.js +1 -0
- package/cjs/playlist-df87ca90.js +1 -0
- package/cjs/renditions-bc841552.js +1 -0
- package/cjs/resolution-6a9adf54.js +1 -0
- package/cjs/series-82ec79d3.js +1 -0
- package/cjs/series-9c237975.js +1 -0
- package/cjs/series-v2-70137d8c.js +1 -0
- package/cjs/series-v2-7f4e41fd.js +1 -0
- package/cjs/settings-icon-a63f46fc.js +1 -0
- package/cjs/settings-icon-e6a8feee.js +1 -0
- package/cjs/skin-1eb7077c.js +1 -0
- package/cjs/skin-225252ff.js +1 -0
- package/cjs/skin-786d5e26.js +1 -0
- package/cjs/skin-84083352.js +1 -0
- package/cjs/skin-983a2ea7.js +1 -0
- package/cjs/skin-a01e3768.js +1 -0
- package/cjs/skin-afbec6d7.js +1 -0
- package/cjs/skin-c0b074fe.js +1 -0
- package/cjs/skin-e06fd04c.js +1 -0
- package/cjs/skin-f225a42e.js +1 -0
- package/cjs/util-fa21734a.js +1 -0
- package/cjs/videoSelector-4a02b437.js +1 -0
- package/cjs/videoSelector-fcdf11eb.js +1 -0
- package/esm/autoNextVideo-4aee2ee0.js +1 -0
- package/esm/bundle.css +657 -0
- package/esm/caption-settings-2e47813b.js +1 -0
- package/esm/caption-settings-f0f1945a.js +1 -0
- package/esm/debugSelection-2601b8b3.js +1 -0
- package/esm/dvr_skin-9cc1b144.js +1 -0
- package/esm/error-2395864b.js +1 -0
- package/esm/features-ba25c46d.js +1 -0
- package/esm/generic-6b0be7a7.js +1 -0
- package/esm/icons-c18c70b7.js +1 -0
- package/esm/index-57452e02.js +1 -0
- package/esm/index-c5a34630.js +1 -0
- package/esm/index.js +1 -0
- package/esm/keyboardShortcuts-5ecdd493.js +1 -0
- package/esm/loader-580278fe.js +1 -0
- package/esm/multicam-36c57c1e.js +1 -0
- package/esm/multicam-de741974.js +1 -0
- package/esm/multicamv2-8f58aca8.js +1 -0
- package/esm/multicamv2-d006cffa.js +1 -0
- package/esm/mwebPotrait-3c1805d8.js +1 -0
- package/esm/mwebPotraitTray-2229862a.js +1 -0
- package/esm/nextEpisodeButton-5f3b245a.js +1 -0
- package/esm/nextEpisodeButton-a1556cdf.js +1 -0
- package/esm/nondvr_skin-64be70e5.js +1 -0
- package/esm/playlist-75d710d0.js +1 -0
- package/esm/playlist-7ecf432a.js +1 -0
- package/esm/renditions-ddb320bd.js +1 -0
- package/esm/resolution-06ae4756.js +1 -0
- package/esm/series-041152aa.js +1 -0
- package/esm/series-9f68ec00.js +1 -0
- package/esm/series-v2-0727ee8c.js +1 -0
- package/esm/series-v2-72198a6e.js +1 -0
- package/esm/settings-icon-0125bffd.js +1 -0
- package/esm/settings-icon-52517438.js +1 -0
- package/esm/skin-0bb6f716.js +1 -0
- package/esm/skin-2c638dc1.js +1 -0
- package/esm/skin-31221b73.js +1 -0
- package/esm/skin-665ec17e.js +1 -0
- package/esm/skin-93e320fc.js +1 -0
- package/esm/skin-c16bc29b.js +1 -0
- package/esm/skin-cd537931.js +1 -0
- package/esm/skin-d5510f70.js +1 -0
- package/esm/skin-d66cd4fd.js +1 -0
- package/esm/skin-d6a8f25f.js +1 -0
- package/esm/util-f62bec40.js +1 -0
- package/esm/videoSelector-2689b3b6.js +1 -0
- package/esm/videoSelector-8e258d45.js +1 -0
- package/package.json +15 -33
- package/.babelrc +0 -8
- package/README.md +0 -29
- package/babel.config.json +0 -8
- package/dist/38afc79c94e0bcf0.png +0 -0
- package/dist/3bc8b7ff04e98d37.png +0 -0
- package/dist/522ea7c76ac4fd33.png +0 -0
- package/dist/a74cd46ed4277568.png +0 -0
- package/dist/b739faec1fde1346.png +0 -0
- package/dist/bundle.css +0 -2
- package/dist/bundle.css.map +0 -1
- package/dist/bundle.js +0 -38
- package/dist/bundle.js.map +0 -1
- package/dist/ed3d0a4d9de91460.png +0 -0
- package/index.html +0 -49
- package/jsconfig.json +0 -9
- package/rollup.config.mjs +0 -39
- package/src/ads-manager/ads-manager.js +0 -120
- package/src/assets/checkIcon.png +0 -0
- package/src/assets/pauseIcon.png +0 -0
- package/src/assets/pauseIconFocus.png +0 -0
- package/src/assets/playIcon.png +0 -0
- package/src/assets/playIconFocus.png +0 -0
- package/src/assets/settingsIcon.png +0 -0
- package/src/index.js +0 -13
- package/src/player-components/player-buttons/playerButtons.js +0 -106
- package/src/player-components/player-seekbar/playerSeekbar.js +0 -223
- package/src/player-components/player-setting-option-wrapper/player-setting-option-one-wrapper.js +0 -82
- package/src/player-components/player-setting-option-wrapper/player-setting-option-two-wrapper.js +0 -84
- package/src/player-components/player-sidebar/player-sidebar.js +0 -188
- package/src/player-components/player-title/playerTitle.js +0 -56
- package/src/player-ui/player-ui.js +0 -564
- package/src/playerControls/playerControls.css +0 -10
- package/src/playerControls/playerControls.js +0 -501
- package/src/styles/index.css +0 -204
- package/src/utilities/utilities.js +0 -79
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export const vtt_or_srt_parser = (vtt) => {
|
|
2
|
-
|
|
3
|
-
try {
|
|
4
|
-
var lines = vtt.trim().split(/[\r\n\r\n]/).map(function (line) {
|
|
5
|
-
return line.trim();
|
|
6
|
-
});
|
|
7
|
-
} catch (e) {
|
|
8
|
-
try {
|
|
9
|
-
var lines = vtt.message.split(/[\r\n\r\n]/).map(function (line) {
|
|
10
|
-
return line.trim();
|
|
11
|
-
});
|
|
12
|
-
} catch (e) {
|
|
13
|
-
return [];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
var cues = [];
|
|
18
|
-
var start = null;
|
|
19
|
-
var end = null;
|
|
20
|
-
var payload = null;
|
|
21
|
-
for (var i = 0; i < lines.length; i++) {
|
|
22
|
-
|
|
23
|
-
if (lines[i].indexOf('-->') >= 0) {
|
|
24
|
-
var splitted = lines[i].split(/[ \t]+-->[ \t]+/);
|
|
25
|
-
if (splitted.length != 2) {
|
|
26
|
-
throw 'Error when splitting "-->": ' + lines[i];
|
|
27
|
-
}
|
|
28
|
-
if (start != null && end != null && payload != null) {
|
|
29
|
-
var cue = new VTTCue(start, end, payload);
|
|
30
|
-
cue.line = 13;
|
|
31
|
-
cues.push(cue);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
payload = null;
|
|
35
|
-
start = null;
|
|
36
|
-
end = null;
|
|
37
|
-
|
|
38
|
-
// Already ignoring anything past the "end" timestamp (i.e. cue settings).
|
|
39
|
-
if (splitted[0] && splitted[1] && splitted[0].indexOf("undefined") == -1 && splitted[1].indexOf("undefined") == -1) {
|
|
40
|
-
start = parse_timestamp(splitted[0]);
|
|
41
|
-
end = parse_timestamp(splitted[1]);
|
|
42
|
-
}
|
|
43
|
-
} else if (lines[i] != undefined && lines[i].trim() != '') {
|
|
44
|
-
try {
|
|
45
|
-
if (Number(lines[i]) > 0) {
|
|
46
|
-
|
|
47
|
-
} else {
|
|
48
|
-
payload = (payload == null) ? "" : payload;
|
|
49
|
-
payload = ((payload.trim() == "") ? lines[i] : (payload + '\n' + lines[i]));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
} catch (e) {
|
|
53
|
-
payload = (payload == null) ? "" : payload;
|
|
54
|
-
payload = ((payload.trim() == "") ? lines[i] : (payload + '\n' + lines[i]));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
if (start && end && payload) {
|
|
62
|
-
var cue = new VTTCue(start, end, payload);
|
|
63
|
-
cue.line = 13;
|
|
64
|
-
cues.push(cue);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return cues;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export const parse_timestamp = (s) => {
|
|
71
|
-
let match = s.match(/^(?:([0-9]+):)?([0-5][0-9]):([0-5][0-9](?:[.,][0-9]{0,3})?)/);
|
|
72
|
-
if (match == null) {
|
|
73
|
-
throw 'Invalid timestamp format: ' + s;
|
|
74
|
-
}
|
|
75
|
-
let hours = parseInt(match[1] || "0", 10);
|
|
76
|
-
let minutes = parseInt(match[2], 10);
|
|
77
|
-
let seconds = parseFloat(match[3].replace(',', '.'));
|
|
78
|
-
return seconds + 60 * minutes + 60 * 60 * hours;
|
|
79
|
-
}
|