googleads / videojs-ima

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

Plugin doesn't work with video.js auto-setup (requires player as first parameter) #1096

Closed davlasq closed 1 year ago

davlasq commented 1 year ago

When useing video.js auto-setup mode (passing options via data-setup attribute) there's an error Uncaught TypeError: Cannot read properties of undefined (reading 'contribAdsSettings') And it's happening because plugins expect player as first parameter and options as second one. Here you can see that my options are in player variable. Options variable is in this case undefined. Code from the docs says player.ima(imaOptions); Which also doesn't work, but this works: player.ima(player, imaOptions); But I can't do this when passing options to data-setup I'm useing video.js 8.0.4

davlasq commented 1 year ago

It was a problem with my configuration, my bad