从当前用户的多个来源自动检测最佳质量 - jwplayer

时间:2015-10-19 12:50:23

标签: html5 css3 jwplayer jwplayer7

这是我的代码:

var playerInstance = jwplayer("mySingleVideoWrapper").setup({
        image: getCurrentPosterSrc,
        sources: [
            {
                file: 'file-360.mp4',
                label: "360p"
            },{
                file: 'file-480.mp4',
                label: "480p"
            },{
                file: 'file-720.mp4',
                label: "720p HD"
            },{ 
                file: 'file-1080.mp4',
                label: "1080p HD"
            }
        ], 
        width: "100%",
        androidhls: 'true',
        type: "hls",
        fallback:true,
        aspectratio: "16:9",
        autostart: true,
        logo: { 
        hide: true 
    },
        tracks: [{ 
            file: "/assets/captions-en.vtt", 
            label: "EN",
            kind: "captions",  
            "default": true 
        },{ 
            file: "/assets/captions-es.vtt", 
            label: "ES",
            kind: "captions"
        },{ 
            file: "/assets/captions-fr.vtt", 
            kind: "captions",
            label: "FR"
        },{ 
            file: "js/assets/captions-de.vtt",  
            label: "DE",
            kind: "captions"
        }]
   }); 

这里还有一个截图,其中突出显示了我需要的内容 enter image description here

所以我需要那个' Auto'按钮将自动检测哪个是当前用户的最佳质量。现在有了我的代码,我看到了所有4个来源/品质但是' Auto'按钮无法看到。我该如何添加它?

1 个答案:

答案 0 :(得分:0)

Amazon支持向我提供了这篇有用的文章链接http://www.jwplayer.com/blog/encoding-hls-with-amazon-elastic-transcoder/,我可以做我想做的事情。