Skip to content

Commit

Permalink
fix(FEC-7470, FEC-7471): Receiver app hangs at the end when Pre roll …
Browse files Browse the repository at this point in the history
…Ad is not enabled (kaltura#3631)
  • Loading branch information
Dan Ziv authored Nov 30, 2017
1 parent 7bbc5df commit d4b1114
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ AdsManager.prototype = {
kdp.kUnbind( "postSequenceStart" );
kdp.kUnbind( "postSequenceComplete" );
kdp.kUnbind( "onAllAdsCompleted" );
kdp.kUnbind( "onEndedDone" );

ReceiverAdsManager = null;
},
Expand Down Expand Up @@ -140,6 +141,7 @@ AdsManager.prototype = {
kdp.kBind( "postSequenceStart", this._onPostSequenceStart.bind( this ) );
kdp.kBind( "postSequenceComplete", this._onPostSequenceComplete.bind( this ) );
kdp.kBind( "onAllAdsCompleted", this._onAllAdsCompleted.bind( this ) );
kdp.kBind( "onEndedDone", this._onEndedDone.bind( this ) );
},

/**
Expand Down Expand Up @@ -315,5 +317,15 @@ AdsManager.prototype = {
if ( this.postSequenceStart ) {
this._onEnded();
}
},

/**
* Kills the media session.
* @private
*/
_onEndedDone: function () {
ReceiverLogger.log(this.CLASS_NAME, "_onEndedDone");
this.destroy();
mediaManager.onEnded();
}
};

0 comments on commit d4b1114

Please sign in to comment.