首页 > 解决方案 > 使用 API 关闭分享/稍后观看 youtube 视频

问题描述

已经提出的类似问题,但当 youtube 视频在后台自动播放时,我找不到删除每个按钮(共享副本)的解决方案。你能帮忙看看哪些参数丢失了,哪些是不必要的

function onYouTubePlayerAPIReady() {
    player = new YT.Player('ytplayer', {
        width: '100%',
        height: '100%',
        videoId: 'orQFFE7cVDw',
        playerVars: {
            'autoplay': 1,
            'showinfo': 0,
            'autohide': 1,
            'mute': 1,
            'loop': 1,
            'controls': 0,
            'modestbranding': 1,
            'disablekb': 1,
            'fs': 0,
            'rel': 0,
            'cc_load_policy': 0,
            'iv_load_policy': 3,
            'playsinline': 1,
            'vq': 'hd1080'
        },
        events: {
            'onReady': onPlayerReady,
            'onStateChange': onPlayerStateChange
        }
    });

标签: htmlyoutube-api

解决方案


推荐阅读