[英]jwplayer is not loading when using external js file
我使用了JW Player廣告版本,但似乎我的代碼無法正常工作。我使用了外部js配置文件。.不確定真正的問題是什么。.尋求支持。 謝謝!。
我的代碼:
在外部js文件中:我輸入以下代碼:HTML源:
jwplayer("my-video").setup({
file: file,
aspectratio: "16:9",
skin: {
name: "five",
active: "red",
inactive: "white",
background: "black"
},
width: width,
height: height,
primary: primary,
advertising: advertising
});
在pre.html中
我輸入以下代碼:
<script type="text/javascript">
var file: "https://s3.amazonaws.com/aws-website-awsvideouploadvastadscustomizer-f3qi3/videos/JACKALS+Trailer+(2017)+Horror+Movie.mp4",
var width: "580",
var height: "360",
var primary: "flash",
var advertising: {
var client: "vast",
var schedule: {"ad tag"}
};
</script>
首先,您需要設置JW腳本URL( https://support.jwplayer.com/customer/portal/questions/16758746-cdn-url )。 在儀表板中,您可以設置播放器的高度和寬度以及為事物着色。
然后,您需要設置JW Player(假設div#my-video是播放器,然后您需要設置文件)
var playerInstance = jwplayer("my-video");
playerInstance.setup({
'file' : 'https://s3.amazonaws.com/aws-website-awsvideouploadvastadscustomizer-f3qi3/videos/JACKALS+Trailer+(2017)+Horror+Movie.mp4',
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.