YouTube Embeded Player on Android 4.3

限于喜欢 提交于 2019-12-06 05:50:30

I had the same issue. Looks like the only way to fix this for the moment is to destroy and recreate the player instance.

I found this solution here: https://code.google.com/p/gdata-issues/issues/detail?id=5273

Works for me Android 4.4, iOS7.

if (player != null) {
    player.destroy();
    player = null;
}


player = new YT.Player('divplayer', {
                width: '100%',
                height: '100%',
                videoId: video_id,

                playerVars: { 'autoplay': 0, 'playerapiid': 'ytPlayer', 'border': 0,  'hd': 1, 'version': 3, 'rel': 0, 'color' : 'red' },


                events: {
                    'onReady': onPlayerReady
                }

            });
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!