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

Detect when Server Side Ad is playing #507

Open
samueleastdev opened this issue Dec 17, 2019 · 1 comment
Open

Detect when Server Side Ad is playing #507

samueleastdev opened this issue Dec 17, 2019 · 1 comment

Comments

@samueleastdev
Copy link

How do you detect when a server-side ad is playing is this possible with this plugin?

Example here: https://b8478f1f82bb4ad1b117b36bdc953d43.mediatailor.us-east-1.amazonaws.com/v1/master/d02fedbbc5a68596164208dd24e9b48aa60dadc7/q2nvw3-1576620977/master.m3u8

Is there an event I can listen to something like.

player.on('adPlaying', function(_event) {
     // Update UI
});

Thanks

@marguinbc
Copy link
Contributor

Hi @samueleastdev, there isn't really a way (in contrib-ads) to detect if server-side ads are playing but if you know you are only playing server-side ads, you can set the option stitchedAds:true in the contrib-ads-settings: http://videojs.github.io/videojs-contrib-ads/integrator/options.html

In fact, this is required to make sure ad events are fired and handled correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants