mb.YTPlayer jQuery插件中的背景视频静音问题

时间:2015-09-17 19:28:42

标签: javascript video youtube

我正在使用mb_YTPlayer jQuery插件创建一个在页面加载时自动播放的背景视频,但我无法将视频静音。我已将属性设置为mute:truevolumn:0。我还尝试在YouTube网址末尾添加&volumn=0。似乎没有任何作用,任何帮助表示赞赏。

<script src="http://pupunzi.com/mb.components/mb.YTPlayer/demo/inc/jquery.mb.YTPlayer.js"></script>

<section class="content-section video-section">
    <div class="pattern-overlay">
        <a id="bgndVideo" class="player" data-property="{videoURL:'https://www.youtube.com/watch?v=bP7vggHJLVM',containment:'.video-section', quality:'large', autoPlay:true, mute:true, opacity:1, volumn:0,}"></a>
        <h2>Overlay Textenter code here</h2>
    </div>
</section>


$(document).ready(function () {
    $(".player").mb_YTPlayer();
});

CSS

.video-section .pattern-overlay {
  padding: 110px 0 32px;
  min-height: 405px;
  background-color: rgba(76, 76, 76, .85);
  width: 100%;
}

.video-section .buttonBar {
  display: none;
}
.player {
  font-size: 1px;
}
.video-section h2 {
  font-size: 40px;
  text-align: center;
  font-family: 'proxima_novalight', Arial, Helvetica;
  color: #fff;
  margin: 9px;
}

.video-section .play-video {
  border: 3px solid #fff;
  color: #fff;
  width: 255px;
  height: 47px;
  text-align: center;
  padding-top: 10px;
}

1 个答案:

答案 0 :(得分:0)

这个对我有用,没有&#34; volumn&#34;包括:

data-property="{videoURL:'https://www.youtube.com/watch?v=bP7vggHJLVM',containment:'#intro-video',autoPlay:true, mute:true, startAt:0, printUrl:false,showControls:false, opacity:1, quality: 'highres'}