Web online player

Source: Internet
Author: User
Tags first string prefetch shuffle

1.avi format

<object id= "video" width= "height=" border= "0" classid= "CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" > <param name= "Showdisplay" value= "0" ><param name= "Showcontrols" value= "1" ><param name= "AutoStart" Value= "1" ><param name= "autorewind" value= "0" ><param name= "Playcount" value= "0" ><param name= " Appearance value= "0 value=" "" ><param name= "BorderStyle value=" 0 value= "" ><param name= "moviewindowheight "Value=" "><param name=" moviewindowwidth "value=" "><param name=" FileName "value="/http Www.jb51.net/sample.avi "><embed width=" "height=" "border=" 0 "showdisplay=" 0 "showcontrols=" 1 "autostart = "1" autorewind= "0" playcount= "0" moviewindowheight= "moviewindowwidth=" "Filename=" http://www.jb51.net/ Sample.avi "src=" Sample.avi "></embed></object>

  2.mpg format

<object classid= "clsid:05589fa1-c356-11ce-bf01-00aa0055595a" id= "ActiveMovie1" width= "239" height= "><" param name= "appearance" value= "0" ><param name= "AutoStart" value= "-1" ><param name= " Allowchangedisplaymode "value="-1 "><param name=" Allowhidedisplay "value=" 0 "><param name=" Allowhidecontrols "value="-1 "><param name=" Autorewind "value="-1 "><param name=" Balance "value=" 0 "> <param name= "currentposition" value= "0" ><param name= "Displaybackcolor" value= "0" ><param name= " Displayforecolor "value=" 16777215 "><param name=" DisplayMode "value=" 0 "><param name=" Enabled "value="-1 " ><param name= "Enablecontextmenu" value= "-1" ><param name= "Enablepositioncontrols" value= "1" >< param name= "enableselectioncontrols" value= "0" ><param name= "Enabletracker" value= "-1" ><param name= " Filename "value=" Http://www.jb51.net/sample.mpg "valuetype=" ref "><param name=" Fullscreenmode "value=" 0 "> <param name= "MovIewindowsize "value=" 0 "><param name=" Playcount "value=" 1 "><param name=" rate "value=" 1 "><param name = "SelectionStart" value= "-1" ><param name= "Selectionend" value= "-1" ><param name= "Showcontrols" value= "-1 "><param name=" Showdisplay "value="-1 "><param name=" showpositioncontrols "value=" 0 "><param name=" Showtracker "value="-1 "><param name=" Volume "value=" -480 "></object>

3.RM format

<object id=video1 classid= "CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" height=288 WIDTH=352> <param Name= "_ Extentx "value=" 9313 "><param name=" _extenty "value=" 7620 "><param name=" AUTOSTART "value=" 0 ">< param name= "SHUFFLE" value= "0" ><param name= "PREFETCH" value= "0" ><param name= "nolabels" value= "0" >< param name= "SRC" value= "rtsp://203.207.131.35/vod/dawan-a.rm"; ><param name= "CONTROLS" value= "Imagewindow" ><param name= "CONSOLE" value= "Clip1" ><param name= "LOOP" value= "0" ><param name= "Numloop" value= "0" ><param name= "CENTER" value= "0" ><param name= "maintainaspect" value= "0" ><param name= " BackgroundColor "value=" #000000 "><embed SRC type=" Audio/x-pn-realaudio-plugin "console=" Clip1 "controls=" Imagewindow "height=" 288 "width=" 352 "autostart=" false "> </OBJECT>

4WMV format

<object id= "Nsplay" width=200 height=180 classid= "clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase= "/http activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=6,4,5,715 "standby=" Loading Microsoft Windows Media Player components ... "type=" Application/x-oleobject "align=" right "hspace=" 5 "><!--ASX File Name--& Gt;<param name= "Autorewind" Value=1><param name= "FileName" value= "xxxxxx.wmv" ><!--Display Controls-- ><param name= "Showcontrols" value= "1" ><!--Display Position Controls--><param name= " Showpositioncontrols "value=" 0 "><!--Display Audio Controls--><param name=" Showaudiocontrols "value=" 1 " ><!--display Tracker Controls--><param name= "Showtracker" value= "0" ><!--Show display-->< param name= "showdisplay" value= "0" ><!--Display Status Bar--><param name= "ShowStatusBar" value= "0" > <!--diplay Go to Bar--><param name= "Showgotobar" value= "0" ><!--Display COntrols--><param name= "showcaptioning" value= "0" ><!--Player Autostart--><param name= "Autostart" value=1><!--Animation at Start--><param name= "Volume" value= " -2500" ><param name= "Animationatstart  "value=" 0 "><!--Transparent at Start--><param name=" Transparentatstart "value=" 0 "><!--don't allow a Change in display size--><param name= "allowchangedisplaysize" value= "0" ><!--don't allow scanning-->&lt ;p Aram Name= "Allowscan" value= "0" ><!--do not show contect menu in right mouse click--><param name= "Enablecon Textmenu "value=" 0 "><!--do not allow playback toggling on mouse click--><param name=" Clicktoplay "value=" 0 "& Gt;</object>

5. The simplest music player

<embed src= "http://www.jb51.net/sample.wmv" autostart= "true" loop= "true" width= "$" height= ">"

6 RM format with image

<object CLASSID=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=288 id=video1 width=305 VIEWASTEXT>< param name=_extentx value=5503><param name=_extenty value=1588><param name=autostart value=-1>< param name=shuffle value=0><param name=prefetch value=0><param name=nolabels value=0><param name= SRC Value=http://www.jb51.net/sample.ram><param Name=controls value=imagewindow,statusbar,controlpanel> <param name=console value=raplayer><param name=loop value=0><param Name=NUMLOOP Value=0><param Name=center value=0><param name=maintainaspect value=0><param name=backgroundcolor value= #000000 > </OBJECT>

7: RM format without Image: (e.g. crosstalk, songs ...)

<object Id=video2 width=300 height=62 classid=clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa><param name=_ Extentx value=9657><param name=_extenty value=847><param name=autostart value=-1><param name= SHUFFLE value=0><param name=prefetch value=0><param name=nolabels value=0><param Name=SRC value= Http://www.jb51.net/sample.rm><param Name=controls Value=statusbar,controlpanel><param Name=console Value=clip1><param name=loop value=0><param name=numloop value=0><param Name=CENTER value=0> <param name=maintainaspect value=0><param name=backgroundcolor value= #000000 ></object>

8: The simplest media format player

<embed src=mms://www.jb51.net/sample.wmv width=200 height=200 autostart=true loop=true></embed>

9: Media player with image, automatic call to Web plugin

<object Id=nstv classid=clsid:6bf52a52-394a-11d3-b153-00c04f79faa6 width=280 height=265 codebase=http:// Activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701standby=loading Microsoft? Windows Media? Player components ... type=application/x-oleobject><param name=url value=http://www.jb51.net/sample.wma> <param name=uimode value=full><param name=autostart value=true><param NAME=Enabled value=true>< PARAM name=enablecontextmenu Value=false><param Name=windowlessvideo value=true></object>

10: Media Player without images

<object Id=nstv classid=clsid:6bf52a52-394a-11d3-b153-00c04f79faa6 width=280 height=60 codebase=http:// Activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701standby=loading Microsoft? Windows Media? Player components ... type=application/x-oleobject><param name=url value=http://www.jb51.net/sample.wma> <param name=uimode value=full><param name=autostart value=true><param NAME=Enabled value=true>< PARAM Name=enablecontextmenu value=false></object>

11: Play RM format video code online

<object id= "Player" name= "player" classid= "CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width= "All" height= "272" ><param name= "_extentx" value= "18415" ><param name= "_extenty" value= "9102" ><param name= "AUTOSTART" Value= "-1" ><param name= "SHUFFLE" value= "0" ><param name= "PREFETCH" value= "0" ><param name= "nolabels "Value="-1 "><param name=" SRC "value=" http://www.jb51.net/sample.rm "><param name=" CONTROLS "value=" Imagewindow "><param name=" CONSOLE "value=" clip1 "><param name=" LOOP "value=" 0 "><param name=" Numloop "value=" 0 "><param name=" CENTER "value=" 0 "><param name=" maintainaspect "value=" 0 "><param Name= "BackgroundColor" value= "#000000" ></object><br><object id= "RP2" classid= "CLSID: CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA "width=" height= "><param name=" _extentx "value=" 18415 ">< param name= "_extenty" value= "1005" ><param name= "AUTOSTART" value= "-1" ><param name= "SHUFFLE" ValUe= "0" ><param name= "PREFETCH" value= "0" ><param name= "Nolabels" value= "-1" ><param name= "SRC" value= "Http://www.jb51.net/sample.rm" ><param name= "CONTROLS" value= "Controlpanel,statusbar" ><param name= " CONSOLE "value=" clip1 "><param name=" LOOP "value=" 0 "><param name=" Numloop "value=" 0 "><param name=" CENTER "value=" 0 "><param name=" maintainaspect "value=" 0 "><param name=" BackgroundColor "value=" #000000 " ></object>

Media Player's appearance interface

In a Web page, you can control which parts of the media Player appear and which do not appear through related properties.

The media Player includes the following elements:

Videodisplaypanel: Video display panel;
Videoborder: Video frame;
Closedcaptioningdisplaypanel; subtitles display panel;
TrackBar; search bar;
Controlbarwithaudioandpositioncontrols: Control bar with sound and position control;
Gotobar: Go to the bar;
DisplayPanel: Display panel;
StatusBar: status bar;

The following properties are used to determine which element to display:

Showcontrols property: Whether the control bar (including playback controls and optional sound and position controls) is displayed;
Showaudiocontrols property: Whether to display the sound control (mute button and volume slider) in the control bar;
Showpositioncontrols property: Whether to display the position control in the control bar (including jump backward, rewind, fast forward, jump forward, preview each clip in the playlist);
Showtracker property: Whether to display the search bar;
Showdisplay Property: Displays the display panel (information used to provide the program and clip);
Showcaptioning property: Whether to display the caption display panel;
Showgotobar property: Whether to show go to bar;
ShowStatusBar property: Whether to display the status bar;

Play List

Media Player provides the following methods to access clips in a playlist:
Next method, jumps to the next clip in the program (playlist);
Previous method, jumps back to the previous clip in the program;
One feature of the media Player is the ability to preview every clip in the program, using the following properties:
The PreviewMode property determines whether the media player is currently in preview mode;
Canpreview property, determines whether the media player can be in preview mode;
In the Windows Media meta-file, you can specify a preview time of--previewduration for each clip, and if not specified, the default preview time is 10 seconds.
You can also use Windows Media metafile to add watermarks and banners, and meta-Files also support no-gap stream switching when inserting ads.

Program Information

Use the Getmediainfostring method to return the following information for a related clip or program:
FileName: filename
Caption: Title
Description: Description
Author
Copyrights: Copyright
Level: Rating
Address of Urls:logoicon, watermark, Banner

Clip information can be placed in media files, in Windows Media meta-files, or both. If clip information is specified in the metafile, the Getmediainfostring method returns the information in the metafile without returning the information contained in the clip.
In a metafile, additional information can be placed in the Param tag of each clip or program. You can add any number of PARAM tags to each clip to store customized information or link to related sites. The information in the PARAM tag can be accessed through the GetMediaParameter method.
The following properties return information about size and time:

Imagesourceheight, Imagesourcewidth: Returns the display size of the image window;

Duration property, returns the length of the clip (in seconds), to detect whether the property contains a valid value, check the Isdurationvalid property. (for broadcast video, its length is unpredictable).
Subtitles

You can use the. smi file to add subtitles to your program. Media Player supports the following properties to handle subtitles:
The Samifilename property that specifies the name of the. smi file;
The Samilang property that specifies the language of the caption (if not specified, the first language is used);
The Samistyle property that specifies the text size and style of the caption;
The Showcaptioning property determines whether the caption display panel is displayed;

Script commands

Along with audio and video streaming, you can add script commands to your streaming files. A script command is a multi-pair Unicode string that is synchronized with a specific time in a multimedia stream. The first string identifies the type of command to be sent, and the second string specifies the command to execute.
When streaming is placed in a script-related time, the control sends a Scriptcommand event to the Web page, which is then responded to by the event-handling process. The script command string is passed to the event handler as a parameter to the script command event.
The media Player automatically handles the following types of inline script commands:

1) URL type command: When the media Player control receives a URL-type command, the specified URL is loaded into the user's default browser. If the media player is embedded in a frame-out HTML file, the URL page can be loaded into the frame specified by the script command. If a script command does not specify a frame, the Defaultframe property determines which frame the URL page will be loaded into.
You can decide whether to automatically handle URL-type script commands by setting the Invokeurls property. If the value of this property is false, the media Player control ignores the URL-type command. However, script command events are still triggered, which allows you to selectively handle URL-type commands.
The URL-type command specifies the relative address of the URL. The base address is specified by the BaseURL property. The command arguments for the script command event that the media Player control transmits are the linked addresses.
2) filename Type command: When the media Player control receives a filename-type command, it sets the FileName property to the file provided by the script command, and then the media Player opens the file to start playing. Media Player controls always automatically handle filename-type commands, unlike URL-type commands, which cannot be disabled.
3) Text Type command: When the media Player control receives a text-type command, it displays the contents of the command in the control's caption window. Content can be plain text, or it can be HTML.
4) Event Command: When the media Player control receives an event type command, it searches the media meta file for the event element's Name property. If the Name property matches the second string in a script command, the Media Player control executes the entry contained in the event element.
5) OpenEvent Command: When the media Player control receives a openevent-type command, it examines the event element in the media metafile and opens the matching title, but does not play until it receives a real event with the same name from the event command.
Capturing keyboard and mouse events
The Enablecontextmenu and Clicktoplay properties provide a way for the user to manipulate the image window.

If the Enablecontextmenu property is true, you can open the context menu by right-clicking in the Image window and if the Clicktoplay property is set to True, the user can click the image window to toggle between playing and pausing.
To receive mouse movement and click events, set the Sendmousemoveevents and Sendmouseclickevents properties to true. Mouse events are:
MouseDown, when the user presses the mouse to produce;
MouseUp, generated when the user releases the mouse;
MouseMove, generated when the user moves the mouse;
Click to generate when the user clicks the mouse button on the media player;
Dbclick, when the user double-clicks the mouse button on the media Player to produce;
To receive keyboard events, set the Sendkeyboardevents property to True. Keyboard events are:
KeyDown, generated when the user presses a key;
KeyUp, generated when the user releases a key;
KeyPress, generated when the user presses and releases a key;
Monitoring flow status and network links
Flow state properties include:
Playstate: Playback status;
Openstate: Open state;
Bandwidth: Bandwidth;
The supported events are:
Openstatechange: Open state change (triggered only if the Sendopenstatechangeevents property is true)
Playstatechange: Playback status change (triggered only if the Sendplaystatechangeevents property is true)
Endofstream: Triggered at the end of the stream;
Newstream: Triggered when a new stream is opened;
Network receive properties include:
Receptionquality: Receiving quality;
Receivedpackets: The package has been received;
Lostpackets: Lost package;
The properties for monitoring buffering are:
Bufferingtime: Buffer time;
Bufferingcount: number of buffers;
BufferingProgress: Buffering process;
Buffering: Buffering events;
Error handling
Media Player provides built-in error handling-Displays error messages in dialog boxes or status bars. In addition, you can add error handlers yourself. If the Senderrorevents property is set to True, the error box is not displayed, but the error event is sent, and if the Senderrorevents property is set to False, an error box is sent and an error event is delivered.
Media Player supports the following error handling events:
Error event, refers to the occurrence of dangerous errors;
Warning event, refers to the occurrence of non-dangerous errors;
When your application receives an error event, you can detect the following property to determine the specific error message:
Haserror: Detects if there is an error in the current media player;
ErrorCode: Provides code values related to this type of error;
ErrorDescription: Provide the wrong description information;
Errorcorrection: Specifies that the media player corrects for this type of error;
Play CD
The media player sees the CD as a single audio stream (marked at the beginning of each track). To use a CD in a Web page, you need to set the FileName property to Cdaudi and must have a colon, as follows:

<HTML> <HEAD><TITLE>CDAudioPlaybackExample</TITLE></HEAD> <BODY> <objectid = "MediaPlayer" classid= "Clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" width= "" "height=" 508 "style=" position: absolute;left:0px;top:70px; " > <paramname= "FileName" value= "Cdaudi" > <paramname= "AutoStart" value= "0" > <paramname= "  Showcontrols "value=" 1 "> <paramname=" ShowStatusBar "value=" 1 "> <paramname=" Showdisplay "VALUE=" 1 ">  </OBJECT> </BODY> </HTML> After that you can play the CD using the Play method. You can specify the playback order and the information for each track in the Windows Media meta-file. Examples are: <asxversion= "3.0" > <TITLE>CDAudiowiththeMediaPlayer</TITLE> <AUTHOR>  Windowsmediatechnologies</author> <COPYRIGHT> (c) 1999,microsoft,inc.</copyright> <ENTRY> <TITLE>Track1:Title1</TITLE> <refhref= "/blog/cdaudi"/> <startmarkernumber= "1"/> < endmarkernumber= "2"/> </ENTRY> <ENTRY> <TITLE>Track2:Title2</TITLE>  <refhref= "/blog/cdaudi"/> <startmarkernumber= "2"/> <endmarkernumber= "3"/> </ENTRY> <  entry> <TITLE>Track3:Title3</TITLE> <refhref= "/blog/cdaudi"/> <startmarkernumber= "3"/> <endmarkernumber= "4"/> </ENTRY> <ENTRY> <TITLE>Track4:Title4</TITLE> <refhref= "/ Blog/cdaudi "/> <startmarkernumber=" 4 "/> </ENTRY> </ASX>

Web online player

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.