Tatiana Sokolova
Tatiana Sokolova

Reputation: 41

Videojs-vast-vpaid ad control buttons

Please, help! I have video.js v4.12.11 and videojs-vast-vpaid plugin. I need control buttons like "skip ad", "go to site", "close ad". I checked xml - they have such information. For example

<Extension type="skipTime"><![CDATA[00:05]]></Extension>
<Extension type="skipTime2"><![CDATA[00:05]]></Extension>
<Extension type="linkTxt"><![CDATA[&#1087;&#1077;&#1088;&#1077;&#1081;&#1090;&#1080; &#1085;&#1072; &#1089;&#1072;&#1081;&#1090; &#1088;&#1077;&#1082;&#1083;&#1072;&#1084;&#1086;&#1076;&#1072;&#1090;&#1077;&#1083;&#1103;]]></Extension>
<Extension type="isClickable"><![CDATA[1]]></Extension>

And also I have such code:

"plugins": {
        'ads-setup': {
            "adsEnabled": true,
            "url": here is url
        }
    }

So ad is shown. But advertiser needs these buttons. I tried to find is this plugin has such options but failed =( Also I found it has different trigger like vast.adSkip but how can I skip this video?! Oh yes! It is preroll video

Upvotes: 0

Views: 1683

Answers (1)

Tatiana Sokolova
Tatiana Sokolova

Reputation: 41

I was sure that it has some little parameter and when I set it "true" everything will work like I want. I was wroooong. They just don't have such functions. I had to add it for myself. Also the part of my problem was that this plugin adds skip button if I get vast of the 3rd version by HTML. But adfox works only with v.2 and send additional info in extention parameteres

  1. This issue helped me https://github.com/MailOnline/videojs-vast-vpaid/issues/56
    I changed functions like indieveed did.

  2. After that I changed and modified and added many functions.

    • add close button
    • add "go to site" button
    • get links for sending statistics from additional (adfoxish) parameteres "Extention" and send events by these links

My thoughts about easy way was so untrue. Next time when I get more time I'll try to change the plugin

Upvotes: 0

Related Questions