【发布时间】:2018-09-23 05:01:20
【问题描述】:
试图为此找到解决方案,但找不到任何可行的方法。我试过了
$('video').trigger('pause');
并且 html 中没有关闭按钮可以附加任何脚本。但是,我不知道 jquery 或 javascript,所以我希望有人能提供帮助。
使用“Replete Modal”,这似乎很受欢迎,但如果在完整观看之前关闭模态,我会遇到视频音轨继续播放的问题。似乎只有在桌面浏览器上查看时才会出现问题。
希望找到一种解决方案也可以停止音频。
下面是我插入的 HTML 代码:
<div style="margin:50 auto; width:700px;">
<a class="vimeo" >vimeo</a>
<script>
$(window).load( function(){
rplm({
title: "ETSA Teacher Training",
text: '<video width="100%" height="338" controls autoplay><source src="Endeavour Teaching.mp4" type="video/mp4"><!--source src="movie.ogg" type="video/ogg"-->Your browser does not support the video tag.</video>',
html: true,
showConfirmButton: true,
delay: 2,
animation: 'fadeIn',
allowOutsideClick: true,
overlay: "black",
videoHeight: "338",
videoWidth: "100%",
preventDialog: true,
cookieName: "blockModal",
preventText: "Block This Pop-up.",
preventDays: 30,
modalNOverlay: 'black',
});
});
</script>
</div>
非常感谢任何帮助!
【问题讨论】:
-
当您单击“确定”按钮关闭 rplm 弹出窗口时,它实际上并没有暂停视频,它只是隐藏了弹出窗口。单击按钮时,您需要暂停视频
-
我知道,但我不知道该怎么做。正如我所提到的,html 代码中没有用于附加脚本以暂停视频的按钮。我尝试只添加脚本,但没有成功,而且我对 jquery/javascript 了解不足,无法尝试编辑 js 文件。
标签: javascript jquery html video-streaming html5-video