Embed the video player code in the webpage

Source: Internet
Author: User

Sometimes we need to embed a video player into the webpage to play the video on our server. Below I will post the code: embed the Video Player:

<Table width = "100%" align = "left"> <tr> <td width = "320px"> <div class = "box1" panelTitle = "file list" panelHeight =" 450 "panelWidth =" 320 "overflow =" auto "> file list: <li> <a href = "javascript: void (0);" onclick = "play ('f: \ 30230201 \ 02-52-01.avi')";> file 1 </a> </li> <a href = "javascript: void (0);" onclick = "play ('f: \ Movie \ NewMovie \ lovelorn 33 days _ DVD. rmvb ') ";> 33 days out of love </a> </li> <a href =" javascript: void (0 ); "onclick =" play ('f: \ Movie2 \ biga pig. avi') ";> PIGA pig </a> </li> </div> </td> <td align = "left"> <div panelHeight = "450" panelTitle = "video playback" overflow = "auto"> <object classid = "clsid: f3D0D36F-23F8-4682-A195-74C92B03D4AF "width =" 560 "height =" 430 "id =" QvodPlayer "name =" QvodPlayer "onError =" downLoadQvod (); "> <param name =" url "id =" qvodurl0 "value =" "> <param name =" Autoplay "value =" 1 "> <param name =" Showcontrol "value = "1"> </object> </div> </td> </tr> </table>

 

Corresponding js control code of the apsaravideo PLAYER:
<Script Language = "JavaScript" src = ""> setInterval (show1, 5000); // 5s displays the download progress var bstartnextplay = false; function show1 () {var pos = QvodPlayer. get_CurTaskProcess ()/10; alert (pos); if (pos> 60) {StartNextDownFile ();} var posv = "the current download progress is:" + pos. toString (10) + "%"; var mediaInfo1 = document. getElementById ("mediaInfo"); mediaInfo1.innerText = posv;} function PointPlay (playername) {// alert (QvodPlay Er); QvodPlayer. URL = playername; QvodPlayer. play ();} function Stop () {QvodPlayer. stop ();} function Pause () {QvodPlayer. pause ();} function Play () {QvodPlayer. play () ;}function GetS () {var iv; var is = QvodPlayer. playState; alert (is); // alert (iv) ;}function putview () {var v = 0; QvodPlayer. put_viewframe (v);} function puttrack (v) {QvodPlayer. put_soundtrack (v);} function putAdjustVideo (v) {QvodPlayer. put_AdjustVideo (v);} function putfull () {var v = true; QvodPlayer. full = v;} var mute = false; function putmute () {if (mute) {mute = false; QvodPlayer. mute = mute;} else {mute = true; QvodPlayer. mute = mute ;}} function curpos () {var pos = 0; pos = QvodPlayer. currentpos; alert (pos);} function setpos (pos) {QvodPlayer. currentpos = pos;} function setvolue (pos) {QvodPlayer. V Olume = pos;} function OnLoad () {// alert (document. protocol); // var I = document. uniqueID; var I = navigator. appName; var B = navigator. userAgent;} function get_MainInfo () {var filename; filename = "this"; filename = QvodPlayer. get_MainInfo (); alert (filename);} function get_TaskDown () {var taskdown1 = QvodPlayer. get_CurTaskProcess (); alert (taskdown1);} function StartNextDownFile () {alert (Qv OdPlayer. get_CurTaskProcess (); if (QvodPlayer. get_CurTaskProcess ()> 600 &&! Bstartnextplay) {var url = 'qvod: // 69999035 | region | Shangri-La 01. rmvb | '; var rv = QvodPlayer. StartNextDown (url); bstartnextplay = true ;}}

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.