kslimani / clappr-ima-plugin

Interactive Media Ads (IMA) SDK plugin for Clappr
MIT License
13 stars 3 forks source link

How to add Ad Controls? #55

Closed GiriAakula closed 2 years ago

GiriAakula commented 2 years ago

There seems to be no documentation on how to add ad controls like play, pause and mute.

In the current implementation that is shown on the example player ad controls are not coming.

Take a look at the screenshot which demonstrates the same.

Screenshot 2022-03-11 at 11 51 33 AM

Please explain how can I add play-ad and pause-ad button on ads, so that users can play and pause ad whenever they need.

kslimani commented 2 years ago

Hi,

As far as i know, ad controls are not part of Google Ima Ad Player. (HTML5 SDK), you have, indeed, to implements yours.

I released a new version of this plugin which should ease you to create your own custom controls.

Just use the onAdPlayerReady plugin option to retrieve ad player instance to bind specific events to add/display/hide your custom controls.

kslimani commented 2 years ago

I forgot to mention you can also use VPAID to add custom controls.

GiriAakula commented 2 years ago

Thanks for the response. I am thinking to implement my own controls as you mentioned.