iframe_api如何控制Mobile(youtube-api)?

时间:2016-01-26 02:21:41

标签: iframe youtube-api youtube-javascript-api

iframe_api(脚本)移动设备如何工作?

playerVars等于0时,我无法播放移动设备;但当playerVars等于1或2时,我可以。

<div id="container" class="container">
    <div id="playerLayer"></div>
</div>
function onYouTubeIframeAPIReady() {
        player = new YT.Player('playerLayer', {
            height: '520',
            width: '560',
            html5 : 0,
            videoId: 'jp2lDKlxFVY',
            playerVars : {
                controls: 0,
                showinfo: 0,
                modestbranding: 1,
                wmode: "opaque"
            },
            events: {
                'onReady': onPlayerReady,
                'onStateChange': onPlayerStateChange
            }
        });
    }

0 个答案:

没有答案