@stremio/stremio-video 0.0.64 → 0.0.65
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/package.json
CHANGED
|
@@ -356,7 +356,8 @@ function ShellVideo(options) {
|
|
|
356
356
|
stream = commandArgs.stream;
|
|
357
357
|
onPropChanged('stream');
|
|
358
358
|
|
|
359
|
-
|
|
359
|
+
var subAssOverride = commandArgs.assSubtitlesStyling ? 'strip' : 'no';
|
|
360
|
+
ipc.send('mpv-set-prop', ['sub-ass-override', subAssOverride]);
|
|
360
361
|
|
|
361
362
|
// Hardware decoding
|
|
362
363
|
var hwdecValue = commandArgs.hardwareDecoding ? 'auto-copy' : 'no';
|
|
@@ -38,7 +38,7 @@ function TizenVideo(options) {
|
|
|
38
38
|
objElement.style.backgroundColor = 'black';
|
|
39
39
|
|
|
40
40
|
var lastSub;
|
|
41
|
-
var disabledSubs =
|
|
41
|
+
var disabledSubs = true;
|
|
42
42
|
|
|
43
43
|
function refreshSubtitle() {
|
|
44
44
|
if (lastSub) {
|
|
@@ -235,9 +235,6 @@ function TizenVideo(options) {
|
|
|
235
235
|
if (totalTrackInfo[i].type === 'TEXT') {
|
|
236
236
|
var textTrack = totalTrackInfo[i];
|
|
237
237
|
var textTrackId = 'EMBEDDED_' + String(textTrack.index);
|
|
238
|
-
if (!currentSubTrack && !textTracks.length) {
|
|
239
|
-
currentSubTrack = textTrackId;
|
|
240
|
-
}
|
|
241
238
|
var extra = {};
|
|
242
239
|
try {
|
|
243
240
|
extra = JSON.parse(textTrack.extra_info);
|
|
@@ -329,9 +329,17 @@ function VidaaVideo(options) {
|
|
|
329
329
|
}
|
|
330
330
|
case 'selectedSubtitlesTrackId': {
|
|
331
331
|
if (stream !== null) {
|
|
332
|
+
// important: disable all first
|
|
333
|
+
Array.from(videoElement.textTracks)
|
|
334
|
+
.forEach(function(track) {
|
|
335
|
+
track.mode = 'disabled';
|
|
336
|
+
});
|
|
337
|
+
// then enable selected
|
|
332
338
|
Array.from(videoElement.textTracks)
|
|
333
339
|
.forEach(function(track, index) {
|
|
334
|
-
|
|
340
|
+
if ('EMBEDDED_' + String(index) === propValue) {
|
|
341
|
+
track.mode = 'showing';
|
|
342
|
+
}
|
|
335
343
|
});
|
|
336
344
|
var selecterdSubtitlesTrack = getProp('subtitlesTracks')
|
|
337
345
|
.find(function(track) {
|
|
@@ -405,8 +413,12 @@ function VidaaVideo(options) {
|
|
|
405
413
|
onPropChanged('buffering');
|
|
406
414
|
if (videoElement.textTracks) {
|
|
407
415
|
videoElement.textTracks.onaddtrack = function() {
|
|
408
|
-
videoElement.textTracks.onaddtrack = null;
|
|
409
416
|
setTimeout(function() {
|
|
417
|
+
// disable all embedded tracks on start
|
|
418
|
+
Array.from(videoElement.textTracks)
|
|
419
|
+
.forEach(function(track) {
|
|
420
|
+
track.mode = 'disabled';
|
|
421
|
+
});
|
|
410
422
|
onPropChanged('subtitlesTracks');
|
|
411
423
|
onPropChanged('selectedSubtitlesTrackId');
|
|
412
424
|
});
|
|
@@ -414,7 +426,6 @@ function VidaaVideo(options) {
|
|
|
414
426
|
}
|
|
415
427
|
if (videoElement.audioTracks) {
|
|
416
428
|
videoElement.audioTracks.onaddtrack = function() {
|
|
417
|
-
videoElement.audioTracks.onaddtrack = null;
|
|
418
429
|
setTimeout(function() {
|
|
419
430
|
onPropChanged('audioTracks');
|
|
420
431
|
onPropChanged('selectedAudioTrackId');
|
|
@@ -431,6 +442,8 @@ function VidaaVideo(options) {
|
|
|
431
442
|
break;
|
|
432
443
|
}
|
|
433
444
|
case 'unload': {
|
|
445
|
+
videoElement.textTracks.onaddtrack = null;
|
|
446
|
+
videoElement.audioTracks.onaddtrack = null;
|
|
434
447
|
stream = null;
|
|
435
448
|
Array.from(videoElement.textTracks).forEach(function(track) {
|
|
436
449
|
track.oncuechange = null;
|