小编use*_*003的帖子

如何在youtube javascript API中删除youtube视频的名称?

     <div id="ytplayer"></div>
    <script>
        // Load the IFrame Player API code asynchronously.
        var tag = document.createElement('script');
        tag.src = "https://www.youtube.com/player_api";
        var firstScriptTag = document.getElementsByTagName('script')[0];
        firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

        // Replace the 'ytplayer' element with an <iframe> and
        // YouTube player after the API code downloads.
        var player;
        function onYouTubePlayerAPIReady() {
            player = new YT.Player('ytplayer', {
                height:'390',
                width:'640',
                videoId:'A_aYVs_zFA8',
                events:{
                    'onReady':onPlayerReady,
                    'onStateChange':onPlayerStateChange
                }
            });
        }

        function onPlayerReady(event) {
            _isPlayerReady = true;
        }
        function onPlayerStateChange(event) {
            switch (event.data) {
                case YT.PlayerState.ENDED:
                $j  = jQuery.noConflict();
                $j(".vid-flow").hide();
                ShowCustomDialog(); …
Run Code Online (Sandbox Code Playgroud)

javascript youtube youtube-javascript-api

1
推荐指数
1
解决办法
6213
查看次数