googleads / videojs-ima

IMA SDK Plugin for Video.js
Apache License 2.0
450 stars 284 forks source link

Prevent disposing player on Complete event - support #942

Closed damjan25 closed 4 years ago

damjan25 commented 4 years ago

Is it possible to prevent dispose function from being called on COMPLETE event ? :thinking:

Kiro705 commented 4 years ago

Hello @damjan25 ,

To my understanding, SdkImpl.prototype.onPlayerDisposed is only triggered through this.vjsPlayer.on('dispose', this.playerDisposedListener.bind(this));.

Is it possible that your own code could be triggering a player dispose event from the COMPLETE event? When testing, I did not see dispose being called from the COMPLETE event.

damjan25 commented 4 years ago

@Kiro705 Thank you for response, I just went through the code again and you are correct it was my fault, sorry.