gpt4 book ai didi

youtube - 使用带模式的Light YouTube Embed(来自基金会的公开)-如何在模式窗口关闭后停止视频播放?

转载 作者:行者123 更新时间:2023-12-03 06:14:01 26 4
gpt4 key购买 nike

我正在将最新的Foundation 6.4.xLight YouTube Embeds script by @labnol一起使用。

我在标准html页面中使用以下代码:

<button data-toggle="animatedModalVideoTest1" class="hollow button expanded alert" href="##">View video</button>

而相应的基金会展示模式就是这部分:
<div class="reveal" id="animatedModalVideoTest1" data-reveal data-close-on-click="true" data-animation-in="fade-in" data-animation-out="fade-out">
<button class="button float-right" data-close type="button">
<span aria-hidden="true">&times;</span> Close modal window
</button>

<div class="responsive-embed">
<div class="youtube-player" data-id="xecEV4dSAXE"></div>
</div>



当我单击“关闭窗口”时,视频将继续在后台播放。
任何可以提出一个想法来阻止这种情况的js专业人士,将不胜感激:-)

PS:此处链接的视频可以安全工作(John Oliver)

最佳答案

尝试使用zurb-forum的..this链接:
https://foundation.zurb.com/forum/posts/39375-stop-video-when-closing-a-reveal-modal-with-foundation-6 ..对我有用!

data-reset-on-close="true"插入您的标记。


 <div class="large reveal" id="myvideo" data-reveal data-reset-on-close="true">

<iframe width="560" height="315" src="https://www.youtube.com/embed/xxxyyyzzz?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen=""></iframe>

<button class="close-button close-reveal-modal" data-close aria-label="Close reveal" type="button">
<span aria-hidden="true">&times;</span>
</button>
</div>

关于youtube - 使用带模式的Light YouTube Embed(来自基金会的公开)-如何在模式窗口关闭后停止视频播放?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46672792/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com