@eluvio/elv-player-js 2.0.27 → 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.
@@ -362,10 +362,6 @@ export class EluvioPlayer {
362
362
  });
363
363
  }
364
364
 
365
- // Detect audio/subtitle track changes
366
- this.video.textTracks.addEventListener("change", () => this.__SettingsUpdate());
367
- this.video.audioTracks.addEventListener("change", () => this.__SettingsUpdate());
368
-
369
365
  // Detect Airplay availability
370
366
  this.__RegisterVideoEventListener("webkitplaybacktargetavailabilitychanged", event => {
371
367
  this.airplayAvailable = event.availability === "available";
@@ -384,6 +380,10 @@ export class EluvioPlayer {
384
380
  this.initTimeLogged = true;
385
381
  this.canPlay = true;
386
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
+
387
387
  if(this.playerOptions.autoplay === EluvioPlayerParameters.autoplay.ON) {
388
388
  this.controls.Play();
389
389
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-player-js",
3
- "version": "2.0.27",
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",