将播放列表对象添加到我的JWPlayer

时间:2015-10-04 19:04:25

标签: thumbnails jwplayer

我尝试将播放列表对象(以显示缩略图)添加到我的JWPlayer,但它不起作用(播放器消失)。任何的想法 ?我试图结合我的脚本:

<script type="text/javascript">jwplayer.key="-";</script>
<div id="player_div" style="outline:0px;">Loading...</div>
<script type="text/javascript">
        var playerInstance = jwplayer("player_div");
        playerInstance.setup({
        autostart: "0",
        startparam: "start",
        aspectratio: "12:7",
        width: "100%",
        image: "/content/img/mp4-poster.jpg",
        sources: [{
            file: "<?= getsignedurl('http://videos.-.land/480/'.$object, time() + 3600) ?>",
            type: "mp4",
            },{
            file: "<?= getsignedurl('http://videos.-.land/720/'.$object, time() + 3600) ?>",
            type: "mp4",
            "default": true,
        }]
    });
</script>

到它

var playerInstance = jwplayer("myElement");
playerInstance.setup({
    playlist: [{
        file: "/assets/myVideo.mp4",
        image: "/assets/myPoster.jpg",
        tracks: [{ 
            file: "/assets/myThumbnails.vtt", 
            kind: "thumbnails"
        }]
    }]
});

0 个答案:

没有答案