Youtube API视频的奇怪问题不会出现

时间:2017-04-05 18:00:23

标签: javascript jquery video youtube youtube-api

我正在我的项目上创建一个模板,它不在我的机器上本地工作的服务器上,我得到的一个奇怪的问题是,我有一个模板附带的页面,并且有视频背景模板工作很好。 当我将代码复制到我的索引页面时它是如何工作的,它不起作用,视频没有启动,我得到了这个错误:

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>

为什么发生这种事情的人会对此有所了解?

1 个答案:

答案 0 :(得分:0)

您应该使用Youtube WITH CTE AS (SELECT COL1, COL2, COL3, COL4, COL5, COL6 FROM ORIGINAL_TABLE) SELECT ,CASE B.i WHEN 1 THEN 'COL1' WHEN 2 THEN 'COL2' WHEN 3 THEN 'COL3' WHEN 4 THEN 'COL4' WHEN 5 THEN 'COL5' WHEN 6 THEN 'COL6' END AS UNPIVOTED_COLUMN_NAMES ,CASE B.i WHEN 1 THEN A.COL1 WHEN 2 THEN A.COL2 WHEN 3 THEN A.COL3 WHEN 4 THEN A.COL4 WHEN 5 THEN A.COL5 WHEN 6 THEN A.COL6 END AS COLUMN_A FROM CTE A CROSS JOIN (SELECT i FROM NUMBERS_TABLE WHERE i in ('1','2','3','4','5','6')) B 嵌入代码。