Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ad not playing in firefox #307

Closed
SolmazKh opened this issue Dec 5, 2017 · 5 comments
Closed

ad not playing in firefox #307

SolmazKh opened this issue Dec 5, 2017 · 5 comments
Labels

Comments

@SolmazKh
Copy link

SolmazKh commented Dec 5, 2017

Hello.
I have recently upgraded my videojs library along with its plugins including contrib-ads.
The ad plays smoothly in chrome but in firefox it gives this error:

VIDEOJS: ERROR: videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect

and it skips to the main video without showing the preroll ad.

How come this was not an error before?!
What should I do to fix this?

Update 1:
It randomly works fine. However it gives this error: InternalError: too much recursion

@incompl
Copy link
Contributor

incompl commented Dec 5, 2017

This was added in 5.x to avoid a class of errors that was impacting a lot of our ad plugin users.

Here is information on what you need to do to address this issue: https://github.com/videojs/videojs-contrib-ads#important-note-about-initialization

If you post your plugin initialization code, I can help identify what needs to change.

@SolmazKh
Copy link
Author

SolmazKh commented Dec 6, 2017

Thanks for the response. I had seen the link you gave but I still can't realize what exactly should I add to the code.
Unfortunately I don't have permission to share the code and even If I did I don't think you could understand. It's seprated in multiple files and is a little complicated.
I am using the preroll plugin for videojs https://github.com/dirkjanm/videojs-preroll.
Shouldn't it be handled in the preroll plugin?!

@incompl
Copy link
Contributor

incompl commented Dec 6, 2017

I looked at videojs-preroll and I wasn't sure what version of videojs-contrib-ads that project was built for. I opened an issue there to clarify. They say it requires videojs-contrib-ads 3.x or newer, so you may want to try it with 3.x, 4.x, and 5.x and see if one of those versions works better with that project.

It's still possible this is fixable just in your integration though. I opened an issue in videojs-preroll that has more information

@SolmazKh
Copy link
Author

SolmazKh commented Dec 7, 2017

I tried using your recommendation in https://github.com/dirkjanm/videojs-preroll/issues/29.
It works fine. I will leave it at that until they fix this issue.
Thanks for your help

@incompl
Copy link
Contributor

incompl commented Dec 13, 2017

Happy to help!

@incompl incompl closed this as completed Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants