Home > front end >  Use js cyberplayer players pause control
Use js cyberplayer players pause control

Time:03-29

Even if want to by button now players suspended and fast forward, the HTML code is as follows, how should write to achieve

The function cyplayer (name, event_0 event_1, event_2, event_3, event_4, event_5, event_6, event_7, event_8, event_9, event_10) {
//the name said components in is created, the name of the event said components have event
//if there are multiple event components, can continue to fill in behind these events name
//such as: the function flexibly ckplayer (name, event1 event2, event3) {

//internal component attributes, only for the use of components:
this.name=name;

Var pw=document. DocumentElement. ClientWidth;
Var ph=document. DocumentElement. ClientHeight;
Document. The getElementById (enclosing the name). Style. The width="100%";
Document. The getElementById (enclosing the name). Style, height="100%";

Var player=this. The name + "player".
Var zjId=this. The name;
//component event global variable
Var vpsta;//play/pause state
Var VPFSC;//full/not full screen state
//component command:
This. Initialization player=function (video address, address the cover, the default volume, width, height, whether looping, whether it is live, default jump time, logo) {
Var player=cyberplayer (" playercontainer "). The setup ({
Width: the width,
Height: height,
Title: "FLV on demand,"
File: video address,//HLS broadcast address (x must support cross-domain access, or to set up the primary parameters)
Image: "http://cyberplayer.bcelive.com/thumbnail.jpg",//video capture
Autostart: true,
Stretching, "uniform",
Repeat: true,
Volume: 100,
Controls: true,
Starttime: 0,
//primary: "flash",//forced to use flash to play, do not set the default yields using H5 play
Ak: "43 c1d7cb02114edeab2e093fbcf0214d
"});
Player, play ();
E4a. JsAndroid (" at the end of the initialization ")
}
Play this.=function () {
Player, play ();
E4a. JsAndroid (" is ")
}
This. Suspend=function () {
Player. Pause ();
E4a. JsAndroid (" person ")
}
This. Jump video=function () {
Player. Seek (10);
E4a. JsAndroid (" fast forward 10 seconds ")
}
}

CodePudding user response:

To find the answer, I also want to know this,
thank you
  • Related