@stremio/stremio-video 0.0.64 → 0.0.67
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,16 +413,31 @@ 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() {
|
|
410
|
-
|
|
411
|
-
|
|
417
|
+
// starts with embedded track selected
|
|
418
|
+
// we'll first select some embedded track
|
|
419
|
+
Array.from(videoElement.textTracks)
|
|
420
|
+
.forEach(function(track, index) {
|
|
421
|
+
if (!index) {
|
|
422
|
+
track.mode = 'showing';
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
setTimeout(function() {
|
|
426
|
+
// then disable all embedded tracks on start
|
|
427
|
+
Array.from(videoElement.textTracks)
|
|
428
|
+
.forEach(function(track) {
|
|
429
|
+
track.mode = 'disabled';
|
|
430
|
+
});
|
|
431
|
+
setTimeout(function() {
|
|
432
|
+
onPropChanged('subtitlesTracks');
|
|
433
|
+
onPropChanged('selectedSubtitlesTrackId');
|
|
434
|
+
});
|
|
435
|
+
});
|
|
412
436
|
});
|
|
413
437
|
};
|
|
414
438
|
}
|
|
415
439
|
if (videoElement.audioTracks) {
|
|
416
440
|
videoElement.audioTracks.onaddtrack = function() {
|
|
417
|
-
videoElement.audioTracks.onaddtrack = null;
|
|
418
441
|
setTimeout(function() {
|
|
419
442
|
onPropChanged('audioTracks');
|
|
420
443
|
onPropChanged('selectedAudioTrackId');
|
|
@@ -431,6 +454,8 @@ function VidaaVideo(options) {
|
|
|
431
454
|
break;
|
|
432
455
|
}
|
|
433
456
|
case 'unload': {
|
|
457
|
+
videoElement.textTracks.onaddtrack = null;
|
|
458
|
+
videoElement.audioTracks.onaddtrack = null;
|
|
434
459
|
stream = null;
|
|
435
460
|
Array.from(videoElement.textTracks).forEach(function(track) {
|
|
436
461
|
track.oncuechange = null;
|