googleads / videojs-ima

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

videojs-ima breaks other video players on website that use data-setup="{}" attribute #1064

Closed damjan25 closed 1 year ago

damjan25 commented 1 year ago

Videojs-ima package hooks onto any video player on the website that has attribute: data-setup="{}" which then breaks those players using that property.

Example: If I have videojs-ima + videojs player on the website (from publisher - not my website) for showing ads and there is another video player from publisher on page for just showing mp4 file for example <video data-setup="{}"></video> on the website. Videojs-ima will automatically hook onto that player with attribute data-setup="{}" and break it.

image

videojs-ima versions: "2.1.0" (also tried with version: "^1.11.0" ) browser: chrome device: desktop and mobile

damjan25 commented 1 year ago

Here is just html example what happens to the any random video html tag(with attribute: data-setup="{}") that is on website when videojs-ima is loaded

videojsimaBugExample.csv

ps. sorry for some reason it doesnt let me post html directly

Kiro705 commented 1 year ago

Hello @damjan25 ,

Thank you for bringing this up. I am a little unclear on how this happens, I also do not see anywhere in the videojs-ima code that specifically targets data-setup.

Would you have any additional details on how a fix could be developed for this issue? My understanding is the videojs-ima plugin follows the standard for registering a videojs plugin. See code here.

Thanks you, Jackson IMA SDK team

damjan25 commented 1 year ago

@Kiro705 I think that issue might be coming from videojs itself, from these lines: image

https://github.com/videojs/video.js/blob/4e2f8add411d38549a39cf4e52172d9a01158da0/src/js/setup.js#L15

Kiro705 commented 1 year ago

Would it be possible to raise the issue to the videojs player team? I won't be able to resolve it through this IMA plugin.