【问题标题】:How to stop video from playing in an <iframe> when switch tabs in Jquery?在 Jquery 中切换选项卡时如何停止在 <iframe> 中播放视频?
【发布时间】:2013-02-11 20:39:43
【问题描述】:

我是 jquery 的新手 - 如果有人可以帮忙!

我的 html 页面上有这个 jquery,它有两个选项卡 Tab1 有文字和图片 Tab2 在 iframe 中有视频。 当我切换标签并且视频是空白框时如何停止视频播放,直到我刷新页面或将视频光标拖到开头。

页面上的脚本:

<script>  $(function() {    $( "#tabs" ).tabs();  }); </script>

div:

<div id="tabs">  
<ul>
<li><a href="#tabs-1">Project Description</a></li>
<li><a href="#tabs-2">Video</a></li>
</ul>

html

<div id="tabs-1">  <p>Contrary to popular belief, Lorem Ipsum is not simply random text.....</p>
    <div id="tabs-2"> <iframe src="http://fast.wistia.net/embed/iframe/xxxxxxx?controlsVisibleOnLoad=true&endVideoBehavior=reset&fullscreenButton=false&playerColor=005293&hidden code xxxxxxx&version=v1&videoHeight=360&videoWidth=640&volumeControl=true" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" width="600" height="386"></iframe>

【问题讨论】:

    标签: jquery video jquery-ui-tabs


    【解决方案1】:

    您无法控制 iframe 的内容...这在跨域策略下是不允许的

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-13
    • 2012-10-17
    • 2019-06-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多