@stremio/stremio-video 0.0.65 → 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 +1 -1
- package/src/VidaaVideo/VidaaVideo.js +17 -5
package/package.json
CHANGED
|
@@ -414,13 +414,25 @@ function VidaaVideo(options) {
|
|
|
414
414
|
if (videoElement.textTracks) {
|
|
415
415
|
videoElement.textTracks.onaddtrack = function() {
|
|
416
416
|
setTimeout(function() {
|
|
417
|
-
//
|
|
417
|
+
// starts with embedded track selected
|
|
418
|
+
// we'll first select some embedded track
|
|
418
419
|
Array.from(videoElement.textTracks)
|
|
419
|
-
.forEach(function(track) {
|
|
420
|
-
|
|
420
|
+
.forEach(function(track, index) {
|
|
421
|
+
if (!index) {
|
|
422
|
+
track.mode = 'showing';
|
|
423
|
+
}
|
|
421
424
|
});
|
|
422
|
-
|
|
423
|
-
|
|
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
|
+
});
|
|
424
436
|
});
|
|
425
437
|
};
|
|
426
438
|
}
|