@eluvio/elv-player-js 2.0.26 → 2.0.28

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.
@@ -625,8 +625,9 @@ class PlayerControls {
625
625
  Array.from(this.player.video.audioTracks).forEach(track =>
626
626
  track.enabled = index.toString() === track.id
627
627
  );
628
+
629
+ // Nudge seek bar to clear cached segments
628
630
  this.Seek({time: this.GetCurrentTime() - 0.1});
629
- setTimeout(() => this.player.__SettingsUpdate(), 500);
630
631
  } else if(this.player.hlsPlayer) {
631
632
  this.player.hlsPlayer.audioTrack = index;
632
633
  this.player.hlsPlayer.streamController.immediateLevelSwitch();
@@ -380,6 +380,10 @@ export class EluvioPlayer {
380
380
  this.initTimeLogged = true;
381
381
  this.canPlay = true;
382
382
 
383
+ // Detect audio/subtitle track changes
384
+ this.video.textTracks && this.video.textTracks.addEventListener("change", () => this.__SettingsUpdate());
385
+ this.video.audioTracks && this.video.audioTracks.addEventListener("change", () => this.__SettingsUpdate());
386
+
383
387
  if(this.playerOptions.autoplay === EluvioPlayerParameters.autoplay.ON) {
384
388
  this.controls.Play();
385
389
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-player-js",
3
- "version": "2.0.26",
3
+ "version": "2.0.28",
4
4
  "description": "![Eluvio Logo](lib/static/images/Logo.png \"Eluvio Logo\")",
5
5
  "main": "dist/elv-player-js.es.js",
6
6
  "license": "MIT",