googleads / videojs-ima

IMA SDK Plugin for Video.js
Apache License 2.0
445 stars 285 forks source link

How to reset the binding of events and remove the adDisplayContainer clear、remove ima plugin clear? #1112

Closed JonasWater closed 11 months ago

JonasWater commented 1 year ago

Sometimes, when i hit a unknown error, i want to reset the binding of events and remove the adDisplayContainer clear、 remove ima plugin clear that allows player events to control without being affected by videojs-ima plugin.

So how to make it? Thx~

Kiro705 commented 1 year ago

Hello @JonasWater ,

I am a little unclear of what is being asked. If you can share a code sample that reproduces the issue, that may be helpful for finding a fix.

For resetting the IMA SDK, we recommend calling the destroy() methods for the AdDisplayContainer, the AdsLoader, and the AdsManager.

Let me know if you have any questions,

Thank you, Jackson IMA SDK team

JonasWater commented 1 year ago

Thank for your reply~ @Kiro705

Okay, the scenario I encountered: When loading the ima plugin fails, I want to remove the ima plugin from the current environment, for example: deregister the plugin and remove all event bindings. I found that after destroying AdDisplayContainer, AdsLoader, AdsManager, The player's play event is still affected by ima plugin or SDK.

So is there any way to clear the videojs-ima plugin or IMA SDK?

Thx~

Kiro705 commented 1 year ago

Hello @JonasWater ,

Do you know if there is an API provided by videoJS to de-register the plugin? I do not think this plugin has a specific method to do so.

Also, do you know what causes the IMA plugin to fail? Fixing that could also resolve your issue.

Thank you, Jackson IMA SDK team