我在HTML中嵌入了基于Flash的视频,并以模态弹出窗口显示。当我关闭弹出窗口时,我想以编程方式停止播放视频。我怎样才能做到这一点?我想用JavaScript或jQuery做到这一点。
<video controls="controls" loop="loop" poster="@Url.Content("~/Content/videos/Keynote_v10_091211_ProResHQ_MIXED_AUDIO_750k.jpg")" width="640" height="360" onclick="if(/Android/.test(navigator.userAgent))this.play();">
<source src="" type="video/mp4" />
<source src="" type="video/webm" />
<source src="" type="video/ogg" />
<object type="application/x-shockwave-flash" data="@Url.Content("~/Content/videos/flashfox.swf")" width="640" height="360" style="position:relative;">
<param name="movie" value="@Url.Content("~/Content/videos/flashfox.swf")" />
<param name="allowFullScreen" value="true" />
<param name="flashVars" value="autoplay=true&controls=true&loop=true&src=" />
<embed src="@Url.Content("~/Content/videos/flashfox.swf")" width="640" height="360" style="position:relative;" flashVars="autoplay=true&controls=true&loop=true&poster=@Url.Content("~/Content/videos/Keynote_v10_091211_ProResHQ_MIXED_AUDIO_750k.jpg")&src=@Url.Content("~/Content/videos/Keynote_v10_091211_ProResHQ_MIXED_AUDIO_750k.mp4")" allowFullScreen="true" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer_en" />
<img alt="Keynote_v10_091211_ProResHQ_MIXED_AUDIO_750k" src="@Url.Content("~/Content/videos/Keynote_v10_091211_ProResHQ_MIXED_AUDIO_750k.jpg")" style="position:absolute;left:0;" width="640" height="360" title="Video playback is not supported by your browser" />
</object>
</video>