1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
PIXI.VideoTexture.prototype.onCanPlay = function()
{
if( event.type === 'canplaythrough' )
{
this.hasLoaded = true;
if( this.source )
{
this.source.removeEventListener( 'canplay', this._onCanPlay );
this.source.removeEventListener( 'canplaythrough', this._onCanPlay );
this.width = this.source.videoWidth;
this.height = this.source.videoHeight;
// prevent multiple loaded dispatches..
if( !this.__loaded ){
this.__loaded = true;
this.dispatchEvent( { type: 'loaded', content: this } );
}
}
}
}; |