1

I try to configure the JW Player 7, make video + ads (pre-rolls). I also have key for JW Player which includes support for viewing advertising (pre-rolls) in the video. Please, help me to create video + ads(pre-roll) in JW Player 7?

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Test JW Player 7</title>
    ​<script src="jwplayer.js"></script>
    <script src="jwplayershaka.js"></script>
    <script src="provider.shaka.js"></script>
    <script>jwplayer.key="MY_KEY";</script>

    <link href="css%20skins/beelden.css" rel="stylesheet" type="text/css"/>
    <link href="css%20skins/bekle.css" rel="stylesheet" type="text/css"/>
    <link href="css%20skins/five.css" rel="stylesheet" type="text/css"/>
    <link href="css%20skins/glow.css" rel="stylesheet" type="text/css"/>
    <link href="css%20skins/roundster.css" rel="stylesheet" type="text/css"/>
    <link href="css%20skins/seven.css" rel="stylesheet" type="text/css"/>
    <link href="css%20skins/six.css" rel="stylesheet" type="text/css"/>
    <link href="css%20skins/stormtrooper.css" rel="stylesheet" type="text/css"/>
    <link href="css%20skins/vapor.css" rel="stylesheet" type="text/css"/>
</head>

<body>
<div id="myElement">Loading the player...</div>
<script type="text/javascript">
    var playerInstance = jwplayer("myElement");
    playerInstance.setup({
        file: "http://localhost/jw.local/big_buck_bunny.mp4",
        image: "http://example.com/uploads/myPoster.jpg",
        width: 640,
        height: 360,
        title: 'Basic Video Embed',
        description: 'A video with a basic title and description!'
    });
</script>
</body>
</html>
  • That code looks fine to me. You don't need to list out all of the scripts though. Just load the jwplayer.js file, and define the key. Are you testing on an actual local webserver? You need to do that to get playback to work. If you are still having issues, can you provide a link to a test page somewhere? – emaxsaun Aug 18 '15 at 15:10

1 Answers1

1

It's not clear what you actually want to do, but I assume you just want to add an invocation tag to your script to allow JWplayer to download and play your video ad. You just need to add this code:

advertising: {
          client: "vast",
          tag: ["myadtag1.xml","myadtag2.xml","myadtag3.xml"]
     }

inside playerInstance.setup({});

genesst
  • 1,333
  • 1
  • 10
  • 39