Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Add post roll - Using Jw Player Plugin


Hi,
We are using your Wordpress plugin, with video ads' license.
I know how to add pre roll, there is ad tag field in plugin's settings,
But how can I add post roll?

10 Community Answers

Todd

JW Player Support Agent  
1 rated :

Our WordPress plugin does not currently have built-in functionality to schedule a post-roll ad. You would need to configure your ad schedule directly via Javascript. Please see http://support.jwplayer.com/customer/portal/articles/1431665-basic-preroll-video-ads and http://support.jwplayer.com/customer/portal/articles/1432024-scheduling-ad-breaks- for more details.

beka

User  
0 rated :

Is it planed, adding of this function to plugin?
Your plugin are used by hundreds of people, so, I think you should add to it this, and many other functions too...

beka

User  
0 rated :

@Todd, can you tell me in which file can I find code of the player? In source of my site I see this code:

<script type='text/javascript'>if(typeof(jQuery)=="function"){(function($){$.fn.fitVids=function(){}})(jQuery)};jwplayer('jwplayer-0').setup({"aspectratio":null,"width":700,"height":394,"skin":"beelden","stretching":"exactfit","autostart":true,"fallback":false,"primary":"flash","advertising":{"client":"googima","tag":"https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/52669678/Metra-04.05.14&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=[timestamp]"},"ga":{},"file":"https://www.youtube.com/watch?v=OVnRcIXEqaU"});
</script>

I can add to it post-roll's js code, but can't find this code in files... Please help.

Todd

JW Player Support Agent  
0 rated :

Your JW Player WordPress plugin is converting your short code into the usual jwplayer().setup() you see in our support documents. I will take the code you provided and add line breaks to make it a little more readable:

jwplayer(‘jwplayer-0’).setup({
aspectratio,
width,
height,
“skin”:“beelden”,
“stretching”:“exactfit”,
autostart,
fallback,
“primary”:“flash”,
“advertising”:{
“client”:“googima”,
“tag”:“https://pubads.g.doubleclick.net/gampad/ads?sz=640×480&iu=/52669678/Metra-04.05.14&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=[timestamp]”
},
“ga”:{},
“file”:“https://www.youtube.com/watch?v=OVnRcIXEqaU”
});

To take that existing code and convert your ad to a post-roll ad, you need to use the syntax documented at http://support.jwplayer.com/customer/portal/articles/1432024-scheduling-ad-breaks-

Since you will not be using the JW Player short code to insert the video, you will also need to add the <div> tag as documented at http://support.jwplayer.com/customer/portal/articles/1406723-mp4-video-embed but you do not have to worry about step one. Our WordPress plugin is already linking to the cloud-hosted player for you.

Here’s the complete code you need:

<div id='jwplayer-0'>Loading your player…</div> <script> jwplayer('jwplayer-0').setup({ "aspectratio":null, "width":700, "height":394, "skin":"beelden", "stretching":"exactfit", "autostart":true, "fallback":false, "primary":"flash", "advertising":{ "client":"googima", schedule: { postroll: { offset: 'post', "tag":"https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/52669678/Metra-04.05.14&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=[timestamp]" } } }, "ga":{}, "file":"https://www.youtube.com/watch?v=OVnRcIXEqaU" }); </script>

One last thing, WordPress has a nasty habit of replacing all ampersands in ad tags with the HTML characters codes. My suggestion is to use another WordPress plugin called Raw HTML to prevent this automatic replacement. After you install their plugin, just check all four boxes in the little box that will appear on the right hand column when you are adding a new post.

beka

User  
0 rated :

Thanks for info. I can add that code, but there is a one problem - Where can I find this code, in which file of your WP plugin?

Todd

JW Player Support Agent  
0 rated :

Not sure what you mean. Our plugin converts your shortcode to the actual HTML and Javascript code (like I gave you) necessary to embed our player.
You should copy and paste that chunk of code directly into Text mode in your post.

beka

User  
0 rated :

Okay, my question is:
Is there opportunity to add our post-roll code directly to plugin's file? Result will be something like this - Plugin will convert shortcode to the actual HTML and Javascript code, which will have pre and post roll's codes inside it.

We are adding 10s of posts on our blogs, and shortcodes are more comfortable than adding big HTML&JS codes in every post.

Todd

JW Player Support Agent  
1 rated :

I cannot find a way to implement a post-roll ad tag with only a shortcode with the current version of our plugin. I will escalate this feature request to our Engineering team and provide you with their feedback.

beka

User  
0 rated :

Thanks.
Waiting the feedback.
And update of jw player's plugin with new, 7th version of your player ^_^

Todd

JW Player Support Agent  
0 rated :

We do not support JW Player 7 in our WordPress plugin at present. Please stay tuned as we are working on an update.

This question has received the maximum number of answers.