取消静音的iframe静音

时间:2017-10-17 12:50:24

标签: javascript jquery iframe

我只想在点击静音iframe时取消静音。 我自动播放iframe静音,但当我点击它时我想取消静音

JS

 function onYouTubeIframeAPIReady() {
  var player;
  player = new YT.Player('muteYouTubeVideoPlayer', {
    videoId: 'DfwihPa9Rwk', // YouTube Video ID
    playerVars: {
      autoplay: 1,        // Auto-play the video on load
      controls: 0,        // Show pause/play buttons in player
      showinfo: 0,        // Hide the video title
      modestbranding: 0,  // Hide the Youtube Logo
      loop: 0,            // Run the video in a loop
      fs: 0,              // Hide the full screen button
      cc_load_policy: 0,  // Hide closed captions
      iv_load_policy: 3,  // Hide the Video Annotations
      autohide: 0,        // Hide video controls when playing
      rel:0,              //Hide relation videos on finish
      mute:1              //Mute the video on start
    },
    events: {

  }
});
}

0 个答案:

没有答案