<object classid="clsid:F3D0D36F-23F8-4682-A195-74C92B03D4AF" width="560" height="420" id="QvodPlayer" name="QvodPlayer" onError="downLoadQvod();"> <param name="url" id="qvodurl0" value="http://192.168.1.254:8089/ftp/ftpupload//2_1001_025201.AVI"> <param name="Autoplay" value="1"> <param name="Showcontrol" value="1"> </object>
<Script type = "text/javascript"> function downLoadQvod () {if (window. confirm ('Please install the QvodPlayer software first, and then refresh this page to play normally! ') {Window. open ('<% = basePath %> video/qvod-setup.exe');} function play () {QvodPlayer. url = "F:/30230201/02 -53-02.AVI"; QvodPlayer. play () ;}var I = 0; function getState () {// encapsulate the request address as an array var urlArray = ["F:/30230201/02 -52-01.AVI", "F: /30230201/02 -53-02.AVI "," F:/30230201/02 -53-03.AVI "]; var state = QvodPlayer. playState; if (state = 0 & I <urlArray. length) {QvodPlayer. url = urlArray [I]; QvodPlayer. play (); I ++ ;}}// sets the timer. setInterval ("getState ()", 1000) is requested once in 1 S. </script>
You can also click the button to start the timer:
// Single video playback function singlePlay (path) {QvodPlayer. url = "$ {video_path}" + path; QvodPlayer. play () ;}// function multiPlay (index) {var urls =$ ("# s _" + index) for continuous playback of multiple videos ). text (); var I = 1; if (urls! = "") {Var urlArray = urls. split (","); singlePlay (urlArray [0]); setInterval (function () {var state = QvodPlayer. playState; if (state = 0 & I <urlArray. length-1) {singlePlay (urlArray [I]); I ++ ;}}, 1000 );}}
In this way, every 1 s is used to determine whether or not the previous video file has been played and automatically jumps to the next set after the video has been played. The disadvantage is that it does not automatically buffer the next set as quickly as it does, it's just a jump to an object !!
We can see a method in quickplay: QvodPlayer. playState; it calls an attribute in quickplay, and quickplay provides corresponding interfaces for js and vb, precisely because of the existence of these interfaces, we can play with quickplay on the page.