videojs / videojs-contrib-ads

A Tool for Building Video.js Ad Plugins
http://videojs.github.io/videojs-contrib-ads/
Other
381 stars 257 forks source link

Firefox not providing normal ad events (Chrome, Edge, Opera fine) #435

Closed dilburt closed 6 years ago

dilburt commented 6 years ago

Hi,

This is a bit strange since I'm not sure what changed to cause this. I was using: videojs version 6.8.0 videojs-contrib-ads version 6.4.2 videojs-ima version 1.5.1

But have upgraded to the following versions hoping to fix this (with no noticeable improvement): videojs 6.12.1 videojs-contrib-ads 6.6.1 videojs-ima 1.5.1 (1.5.2 is not on npm for some reason)

Testing with the latest production versions of Chrome, Opera, Edge and Firefox.

We've been making some tweaks for Firefox trying to solve these issues but nothing has seemed to help. We are simply not getting the correct sequence of events with Firefox:

start: VIDEOJS: Play middleware has been registered with videojs VIDEOJS player event: contentpause VIDEOJS player event: adsready VIDEOJS: WARN: Unexpected startLinearAdMode invocation (Preroll) Invalid URI. Load of media resource failed. (the file is simply src="path/blank.mp4"> that works on all other browsers.

That is usually it, no other events even though the video plays (of course it messes up the player since many of the events we trigger on do not occur). Sometimes it will provide a weird out of order series of content events after this such as contentplay, playing, canplaythrough, canplay, playing, canplaythrough - it seems like something is messing up the normal series of events..

Here is a normal set of events from Chrome

VIDEOJS player event: loadstart VIDEOJS player event: canplay VIDEOJS player event: canplaythrough VIDEOJS player event: ready VIDEOJS player event: adsready VIDEOJS player event: play VIDEOJS player event: adstart VIDEOJS player event: adend VIDEOJS player event: contentfirstplay VIDEOJS player event: contentplay VIDEOJS player event: playing VIDEOJS player event: pause VIDEOJS player event: ended

Events in Opera and Edge are very close to Chrome..

What I would like to know is whether anyone has seen this type of behaviour from Firefox or has any suggestions for what I can try to understand what is causing this. I have run the ima3_debug.js library but it didn't reveal any insights into why this is happening in Firefox.

Also, does anyone have suggestions regarding the versions I'm using. It appears that videojs is labeling 6.12.1 as their primary version 6 release. I've tried videojs-contrib-ads version 6.6.0, 6.4.3 and 6.4.3 but not 6.5.0 (since I missed it below 6.4.2).

I can provide a test url for videojs-contrib-ad via PM if needed.

Thanks,

D

dilburt commented 6 years ago

I figured this out. Firefox was being really picky about some items in the video definition.

bbleds commented 5 years ago

@dilburt seeing similar issues in Firefox as well. Could you elaborate on the solution you found?

Thanks!

dilburt commented 5 years ago

It was the statement from the video element. There are some parameters required for iPhones (playsinline and webkit-playsinline) which Firefox didn't like so I'm only adding those when I know it's an iphone.