dash-shaka-playback
Advanced tools
Comparing version 2.0.10-beta to 2.0.12-beta
20
index.js
@@ -6,2 +6,3 @@ import {HTML5Video, Log, Events} from 'clappr' | ||
const AUTO = -1 | ||
const SHAKA_READY = 'shaka:ready' | ||
@@ -38,3 +39,3 @@ export default class DashShakaPlayback extends HTML5Video { | ||
if (!this.isReady) { | ||
this.once(Events.PLAYBACK_READY, this.play) | ||
this.once(SHAKA_READY, this.play) | ||
return | ||
@@ -87,8 +88,12 @@ } | ||
this._player.destroy(). | ||
then(() => this._destroy()). | ||
catch(() => { | ||
this._destroy() | ||
Log.error('shaka could not be destroyed') | ||
}) | ||
if (this._player) { | ||
this._destroy() | ||
} else { | ||
this._player.destroy(). | ||
then(() => this._destroy()). | ||
catch(() => { | ||
this._destroy() | ||
Log.error('shaka could not be destroyed') | ||
}) | ||
} | ||
} | ||
@@ -122,2 +127,3 @@ | ||
this._isShakaReadyState = true | ||
this.trigger(SHAKA_READY) | ||
this._ready() | ||
@@ -124,0 +130,0 @@ this._startToSendStats() |
{ | ||
"name": "dash-shaka-playback", | ||
"version": "2.0.10-beta", | ||
"version": "2.0.12-beta", | ||
"description": "clappr dash playback based on shaka player", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
277470
574