<tfoot id='JWzIP'></tfoot>
    • <bdo id='JWzIP'></bdo><ul id='JWzIP'></ul>

    <small id='JWzIP'></small><noframes id='JWzIP'>

    <i id='JWzIP'><tr id='JWzIP'><dt id='JWzIP'><q id='JWzIP'><span id='JWzIP'><b id='JWzIP'><form id='JWzIP'><ins id='JWzIP'></ins><ul id='JWzIP'></ul><sub id='JWzIP'></sub></form><legend id='JWzIP'></legend><bdo id='JWzIP'><pre id='JWzIP'><center id='JWzIP'></center></pre></bdo></b><th id='JWzIP'></th></span></q></dt></tr></i><div id='JWzIP'><tfoot id='JWzIP'></tfoot><dl id='JWzIP'><fieldset id='JWzIP'></fieldset></dl></div>

    1. <legend id='JWzIP'><style id='JWzIP'><dir id='JWzIP'><q id='JWzIP'></q></dir></style></legend>
      1. 如何在 Youtube 中停止使用 Javascript 的视频?

        时间:2023-09-08
        <tfoot id='rQdy0'></tfoot>

        <small id='rQdy0'></small><noframes id='rQdy0'>

          <legend id='rQdy0'><style id='rQdy0'><dir id='rQdy0'><q id='rQdy0'></q></dir></style></legend>

                <tbody id='rQdy0'></tbody>

            1. <i id='rQdy0'><tr id='rQdy0'><dt id='rQdy0'><q id='rQdy0'><span id='rQdy0'><b id='rQdy0'><form id='rQdy0'><ins id='rQdy0'></ins><ul id='rQdy0'></ul><sub id='rQdy0'></sub></form><legend id='rQdy0'></legend><bdo id='rQdy0'><pre id='rQdy0'><center id='rQdy0'></center></pre></bdo></b><th id='rQdy0'></th></span></q></dt></tr></i><div id='rQdy0'><tfoot id='rQdy0'></tfoot><dl id='rQdy0'><fieldset id='rQdy0'></fieldset></dl></div>
                • <bdo id='rQdy0'></bdo><ul id='rQdy0'></ul>
                  本文介绍了如何在 Youtube 中停止使用 Javascript 的视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  情况:这里, 我按了一些视频.

                  问题:我尝试在 Firebug 的控制台中通过 Javascript 停止视频:

                  Problem: I try to stop the video by Javascript in the console of Firebug:

                  player.stopVideo(playerid):Void   [1] [2]
                  

                  问题:为什么上面的命令不起作用?

                  Question: Why does not the command above work?

                  [1] 来源部分player.stopVideo():虚"

                  [1] Source for the part "player.stopVideo():Void"

                  [2] 我用 Firebug 从源代码中查看了 playerid.

                  [2] I looked playerid with Firebug from the source.

                  推荐答案

                  您的视频正在请求启用 JSAPI,所以您非常接近!您所需要的只是对嵌入式播放器的有效引用.检查您的页面发现您正在使用playerid"的 HTML DOM 元素 ID 来识别您的播放器.

                  Your video is requesting w/ the JSAPI enabled, so you are very close! All you need is a valid reference to the embedded player. Inspecting your page revealed that you are using the HTML DOM element id of "playerid" to identify your player.

                  例子:

                  <embed id="playerid" width="100%" height="100%" allowfullscreen="true" allowscriptaccess="always" quality="high" bgcolor="#000000" name="playerid" style="" src="http://www.youtube.com/apiplayerbeta?enablejsapi=1&playerapiid=normalplayer" type="application/x-shockwave-flash">
                  

                  要获得对播放器的引用然后停止视频,请使用以下代码:

                  To obtain a reference to the player and then stop the video use the following code:

                  var myPlayer = document.getElementById('playerid');
                  myPlayer.stopVideo();
                  

                  这篇关于如何在 Youtube 中停止使用 Javascript 的视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:嵌入 YouTube 视频 - 拒绝显示在框架中,因为它将“X-Frame-Options"设置为“SAMEO 下一篇:Youtube iframe api 未触发 onYouTubeIframeAPIReady

                  相关文章

                    <tfoot id='vkW6z'></tfoot>

                      <legend id='vkW6z'><style id='vkW6z'><dir id='vkW6z'><q id='vkW6z'></q></dir></style></legend>
                    1. <i id='vkW6z'><tr id='vkW6z'><dt id='vkW6z'><q id='vkW6z'><span id='vkW6z'><b id='vkW6z'><form id='vkW6z'><ins id='vkW6z'></ins><ul id='vkW6z'></ul><sub id='vkW6z'></sub></form><legend id='vkW6z'></legend><bdo id='vkW6z'><pre id='vkW6z'><center id='vkW6z'></center></pre></bdo></b><th id='vkW6z'></th></span></q></dt></tr></i><div id='vkW6z'><tfoot id='vkW6z'></tfoot><dl id='vkW6z'><fieldset id='vkW6z'></fieldset></dl></div>
                      • <bdo id='vkW6z'></bdo><ul id='vkW6z'></ul>

                      <small id='vkW6z'></small><noframes id='vkW6z'>