【发布时间】:2017-08-31 11:55:44
【问题描述】:
我正在为我的项目制作一个模板,它不在服务器中,只是在我的机器上本地工作,我遇到的奇怪问题是,我有一个模板附带的页面,并且视频背景模板正在工作很好。 当我将代码完全复制到我的索引页面时,它不起作用,视频无法启动并且我收到此错误:
VM5155:1 Uncaught ReferenceError: Invalid left-hand side in assignment
at HTMLDivElement.<anonymous> (jquery.mb.YTPlayer.min.js:8)
at Function.each (jquery.js:384)
at m.fn.init.each (jquery.js:136)
at m.fn.init.buildPlayer (jquery.mb.YTPlayer.min.js:8)
at HTMLDivElement.<anonymous> (functions.js:1565)
at Function.each (jquery.js:384)
at m.fn.init.each (jquery.js:136)
at HTMLDocument.<anonymous> (functions.js:1562)
at j (jquery.js:3148)
at Object.fireWith [as resolveWith] (jquery.js:3260)
(anonymous) @ jquery.mb.YTPlayer.min.js:8
each @ jquery.js:384
each @ jquery.js:136
buildPlayer @ jquery.mb.YTPlayer.min.js:8
(anonymous) @ functions.js:1565
each @ jquery.js:384
each @ jquery.js:136
(anonymous) @ functions.js:1562
j @ jquery.js:3148
fireWith @ jquery.js:3260
ready @ jquery.js:3472
J @ jquery.js:3503
我不明白为什么我在索引页面中收到错误而我在其他页面上没有,脚本顺序完全相同,这是我与视频相关的代码:
<section class="content_section bg_fixed white_section bg2">
<div class="bg_overlay">
<!-- Video -->
<div class="youtube_bg_video has_overlay now_pausing" data-property="data-property=" {
"videoURL:'http://www.youtube.com/watch?v=V6_85cSOIcE',containment:'self',startAt:0,mute:true,autoPlay:true,loop:false,opacity:1,showYTLogo:false, realfullscreen:false, quality:'small'}"></div>
<!-- End Video -->
<div class="content row_spacer clearfix">
<!-- Video Frame-->
<div class="video_frame centered">
<div class="video_frame_tl">
<div class="video_frame_br">
<div class="video_frame_bl row_spacer2">
<div class="main_title upper">
<h2><span class="line"></span>Video Background</h2>
</div>
<a href="#" class="play_video_btn pause_video">
<span><i class="ico-pause2"></i></span>
</a>
</div>
</div>
</div>
</div>
<!-- End Video Frame-->
</div>
</div>
这是脚本顺序:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/jquery.js"><\/script>')
</script>
<script src="js/plugins.js"></script>
<script src="js/jquery.videobackground.js" type="text/javascript"></script>
<script src="js/jquery.mb.YTPlayer.min.js" type="text/javascript"></script>
<!-- this is where we put our custom functions -->
<script type="text/javascript" src="js/functions.js"></script>
<script src="js/plugins.js"></script>
<script src="js/jquery.themepunch.tools.min.js" type="text/javascript"></script>
<script src="js/jquery.themepunch.revolution.min.js" type="text/javascript"></script>
<script src="js/isotope.pkgd.min.js"></script>
<!-- this is where we put our custom functions -->
<script type="text/javascript" src="js/functions.js"></script>
为什么会有人对此有所了解?
【问题讨论】:
标签: javascript jquery video youtube youtube-api