本文介绍了如何向MediaElement.js发送播放/暂停信号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 有没有人知道如何通过jquery / java发送信号来阻止电影播放/暂停等等。Does anyone know how to send a signal via jquery/java to stop the movie from playing/pausing etc..<!DOCTYPE html><html><head> <title>Video.js | HTML5 Video Player</title> <!-- Chang URLs to wherever Video.js files will be hosted --> <link href="video-js.css" rel="stylesheet" type="text/css"> <!-- video.js must be in the <head> for older IEs to work. --> <script src="video.js"></script> <script src="jquery-1.11.0.js"></script> <!-- Unless using the CDN hosted version, update the URL to the Flash SWF --> <script> //videojs.options.flash.swf = "video-js.swf"; videojs.options.flash.swf = "Module1.swf"; </script> <script> $(document).ready(function() { $("#Tester").mousedown( function() { //What need to be placed here to cause the media to pause //$("#example_video_1").media.pause(); //new MediaElement(v, {success: function(media) { media.pause();}}); }); }); </script></head><body> <video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="640" height="264" data-setup="{}"> <source src="Module1.swf" type='video/flv' /> <track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 --> <track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 --> </video> <div ID="Tester"> Click This </div></body></html>推荐答案 这篇关于如何向MediaElement.js发送播放/暂停信号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-06 07:28