1

我尝试配置 JW Player 7,制作视频 + 广告(前贴片广告)。我还有 JW Player 的密钥,其中包括支持查看视频中的广告(前贴片广告)。请帮我在 JW Player 7 中创建视频 + 广告(前贴片广告)?

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Test JW Player 7</title>
    ​&lt;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>
4

1 回答 1

1

目前尚不清楚您实际上想要做什么,但我假设您只想在脚本中添加一个调用标签,以允许 JWplayer 下载和播放您的视频广告。您只需要添加以下代码:

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

里面playerInstance.setup({});

于 2015-08-19T00:00:02.050 回答