@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stremio/stremio-video",
3
- "version": "0.0.65",
3
+ "version": "0.0.67",
4
4
  "description": "Abstraction layer on top of different media players",
5
5
  "author": "Smart Code OOD",
6
6
  "main": "src/index.js",
@@ -414,13 +414,25 @@ function VidaaVideo(options) {
414
414
  if (videoElement.textTracks) {
415
415
  videoElement.textTracks.onaddtrack = function() {
416
416
  setTimeout(function() {
417
- // disable all embedded tracks on start
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
- track.mode = 'disabled';
420
+ .forEach(function(track, index) {
421
+ if (!index) {
422
+ track.mode = 'showing';
423
+ }
421
424
  });
422
- onPropChanged('subtitlesTracks');
423
- onPropChanged('selectedSubtitlesTrackId');
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
  }