googleads / videojs-ima

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

Advertising does not work with the adding plugin method called "plugins option." #1082

Closed sanghavp closed 1 year ago

sanghavp commented 1 year ago

When I add the plugin as a plugin option, the advertisement does not work and this error is displayed on the console tab Screenshot_2 This could be due to the controlBar not being initialized by this method Screenshot_1 Screenshot_3

sanghavp commented 1 year ago

These are two ways to use the plugin on the videojs homepage, I used method 1 but the advertisement is not working: "Setting up a Plugin There are two ways to set up (or initialize) a plugin on a player. Both ways work identically for both basic and advanced plugins.

The first way is during creation of the player. Using the plugins option, a plugin can be automatically set up on a player:

videojs('example-player', { plugins: { examplePlugin: { customClass: 'example-class' } } }); Otherwise, a plugin can be manually set up:

var player = videojs('example-player'); player.examplePlugin({customClass: 'example-class'}); These two methods are functionally identical - use whichever you prefer!"

Kiro705 commented 1 year ago

Hello @sanghavp ,

Would it be possible to share code snippet that reproduce the error you are seeing in the first comment?

We recommend following the Get started section of our readme for instructions on setting up the videoJS-IMA plugin.

Please let me know if you have any questions.

Thank you, Jackson IMA SDK team

sanghavp commented 1 year ago

This is code snippet produce the error: Screenshot_4 ControlBar not created when I using plugin option(I need to use this in my project): Screenshot_5

sanghavp commented 1 year ago

Thank you very much!!

Kiro705 commented 1 year ago

Hello @sanghavp ,

This plugin is not designed to be included in the plugin option when initiating the videojs player. Instead please follow the initiation steps as detailed by the plugin readme. Otherwise you may see issue with certain plugin features not being properly initiated.

Thank you, Jackson IMA SDK team

sanghavp commented 1 year ago

Thank you very much for support!