question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Content plays before ad

See original GitHub issue

When content is played, we have a few milliseconds of the ad play first, before the content.

As much as this should be expected when the prerollTimout has been reached, we already have our timeout set to 1000ms (overkill, but I wanted to see if it fixed the problem).

Content with this issue can be seen here.

I have dug into it and it seems a script pulled in by the imasdk pulls in a Youtube script that isn’t ready for some time after page load. That’s the only lead I have, although it might be a red herring.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:34 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
shawnbusocommented, Dec 5, 2016

I think the issue is a combo - the contrib-ads docs make it look like you must call play on the video player before you can play ads, so that’s what we do. If it takes us a long time to get those ads then the content will start before we get ads playing. The contrib-ads plugin, however, does have some samples that show pre-rolls playing before calling play on the player, so if we can figure out how those work and refactor our plugin to behave the same way we might be able to fix this, though I think that will be a rather large refactor.

1reaction
shawnbusocommented, Nov 30, 2017

This one’s not fixed by 0.8.0 but it will be fixed in 1.0.0, which will be coming before the end of the year. Stay tuned!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Content plays before ad (Reopening #167) · Issue #558 - GitHub
shawnbuso I'm using version 1.2.1and still seeing the content play briefly before the ad and I've tried all the recommended solutions.
Read more >
Main content starts playing before preroll in video.js when ...
It seems that video.js connects to the CDN of the main content initially and then contrib-ads checks if it needs to play prerolls....
Read more >
What is a Pre Roll Ad? - Digital Logic
A pre-roll ad is a promotional video advertisement that plays before the content of an online video. These ads are typically 6 seconds,...
Read more >
videojs-contrib-ads - GitHub Pages
isContentResuming() (METHOD) – This method returns true during ad mode after an ad break has ended but before content has resumed playing. adstart...
Read more >
7 Ingredients of Great Pre-Roll Ads (With Examples) | Wyzowl
1. Bumper – these ads play before the main video content and can be up to 6 seconds in length. · 2. Non-skippable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found