Code instance for online playback for Web page plus player

Source: Internet
Author: User
Tags format functions integer prefetch shuffle string version window
Web page | online

The players we see on the Web page are no more than Wmp/realone/macromedia Flash player, other than the panel is different, or add other controls, for the computer installed some of the players are encoding and decoder integration, The core coding and decoding techniques are the same. For example, the most popular Windows Media stream (asf,wma,wmv format ...) on the network, real Stream (RM,RMVB ...), and the MPEG Series encoding format (Mp4/mp3 format ...)

Windows Media Video, a streaming media format introduced by Microsoft, is an extension of the "Same Gate" ASF (Advanced stream format) format upgrade. In the same video quality, WMV format is very small, so it is suitable for playback and transmission online. Windows Media Player9 is compatible with all formats of WMV, the official encoder is Windows Media Encoder, but if you want to transform high-quality wmv files, then you must have a large memory to process the data ...

Inadvertently found that the Castpost player can define its own size, for the WMV format of online playback can be said to be fast enough, and then a great effort to put some of the highlights of the video and some of the classic MTV conversion WMV format to put up, although it can not download now, but as long as the number of connections is not too much, It's still a smooth ^_^.

WMP added an ActiveX decoder control, not only to play music, but also to put Flash and other video files

  <object align=middle classid= "Clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" Class=object Id=MediaPlayer Height=196>
<param Name=showstatusbar value=0>
<param name=filename value= "http://202.116.*.*/video/story/chinese/hynh/b.wmv" >
<embed type=application/x-oleobject codebase= "Http://activex.microsoft.com/activex/con ... n/nsmp2inf.cab# version=5,1,52,701 ">
</embed>
</object>

Want to use WMP continuous playback Please refer to the ASX meta File Usage explanation: Use ASX playlist

The player on the top is the old-fashioned one, version 6.4! New players appear after MediaPlayer9.0, that is, only 9.0 or more than 9.0 of the players installed to normal use.

-------------------------------------------------------------------

Here's a new player code that's a lot simpler than it used to be:

   <object id= "Player" height= "width=" classid= "Clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" >
<param name= "AutoStart" value= "-1" >
<!--whether to play--> automatically
<param name= "Balance" value= "0" >
<!--adjust the left and right channel balance,--> with the old player code above
<param name= "Enabled" value= "-1" >
<!--player can be artificially controlled-->
<param name= "Enablecontextmenu" value= "-1" >
<!--whether context menus are enabled-->
<param name= "url" value= "/blog/1.wma" >
<!--playback file address-->
<param name= "Playcount" value= "1" >
<!--playback times control, for integer-->
<param name= "Rate" value= "1" >
<!--playback rate control, 1 is normal, allow decimal,1.0-2.0-->
<param name= "currentposition" value= "0" >
<!--control settings: Current position-->
<param name= "Currentmarker" value= "0" >
<!--control settings: Current Tag-->
<param name= "Defaultframe" value= "" >
<!--display default frame-->
<param name= "Invokeurls" value= "0" >
<!--script command settings: whether to invoke url-->
<param name= "BaseURL" value= "" >
<!--script command settings: called url-->
<param name= "Stretchtofit" value= "0" >
<!--whether to extend--> proportionally
<param name= "Volume" value= "M" >
<!--default sound size 0%-100%,50 is 50%-->
<param name= "Mute" value= "0" >
<!--Mute-->
<param name= "Uimode" value= "Mini" >
<!--player display mode: full display all; Mini simplifies; None does not display playback control, only the video window is displayed; Invisible all do not show-->
<param name= "Windowlessvideo" value= "0" >
<!--if 0 allows full-screen, you can view--> in a window only
<param name= "fullscreen" value= "0" >
<!--start playing automatically full-screen-->
<param name= "Enableerrordialogs" value= "-1" >
<!--whether to enable error notification reporting-->
<param name= "Samistyle" value>
<!--Sami style-->
<param name= "Samilang" value>
<!--Sami language-->
<param name= "Samifilename" value>
<!--subtitles id-->
</object>

----------------------------------------------------------------

RealOne Player Code:

   <object id= "vid" classid= "CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width=427 height=300>
<param name= "_extentx" value= "11298" >
<param name= "_extenty" value= "7938" >
<param name= "AUTOSTART" value= "-1" >
<param name= "SHUFFLE" value= "0" >
<param name= "PREFETCH" value= "0" >
<param name= "Nolabels" value= "-1" >
<param name= "SRC" value= "RTSP://211.89.225.1/ENCODER/CNR3";>
<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> <object id= "Vid2" classid= "CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width=427 height=30>
<param name= "_extentx" value= "11298" >
<param name= "_extenty" value= "794" >
<param name= "AUTOSTART" value= "-1" >
<param name= "SHUFFLE" value= "0" >
<param name= "PREFETCH" value= "0" >
<param name= "Nolabels" value= "-1" >
<param name= "SRC" value= "RTSP://211.89.225.1/ENCODER/CNR3";>
<param name= "CONTROLS" value= "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>

------------------------------------------------------------------

Look at a lot of very complex appearance, in fact, is more than some player parameters, you can not ...

Real Player web player parameter meaning

Parameters: Autostart Property: True or false: Specifies whether the specified source file is automatically played

Parameters: BackgroundColor Property: Any 16-value or any predefined color effect that begins with the symbol "#": Specifies the background color of the image window

Parameters: Center Property: TRUE or false: Specifies that the fragment plays with the initial encoding size and is in the center of the image window.

Parameters: ClassID Property: "clsid:cfcdaa03-8be4-1lcf-b84b0020afbbccfa:** function: Specifies the unique string identifier of an ActiveX control, which can be recognized as an embedded Realpalyer player."

Parameters: Console Property: Any string action: You can aggregate various RealPlayer controls on a Web page so that they can be used interactively or remain independent, and do not affect each other

Parameters: Controls Properties: Imagewindow,all,controlpanel,plavbutton,playonlybutton, Pausebutton,stopbutton,ffctrl,rwctrl, Mutectrl,mutevolume,volumeslider,positionslider,tacctrl,homectrl,infovolumepanel,infopanel,statusbar, Statusfield,positionfield function: Allows you to specify which controls are visible.

Parameters: Height Property: Any integer value function: Specifies the height of the RealPlayer element, in pixels

Parameters: id attribute: Any string action: Specifies a name for the RealPlayer element in the label.

Parameters: Imagestatus Property: True or false: Specifies whether state information is displayed in the Image window, and the default value is True

Parameters: Loop Property: True or False: Allows you to specify whether the fragment loop is infinite

Parameters: Maintainaspect Property: True or false: The default RealPlayer stretches all pieces to fill the entire image window.

Parameters: Name property: Any string action: Specify a name for the RealPlayer element in the label (use ID in the label)

Parameters: Nojava Property: True or false: Avoid starting Java virtual machines

Parameters: Nolabels Property: True or false: You can suppress the display of title or copyright information (realplayer5.0 above, it is garbage ...)

Parameters: Nologo Property: True or false: avoid displaying in the image window when RealPlayer is started

Parameters: Numloop Property: Any integer value function: Allows you to specify the number of times the file slice loop, do not need parameter loop

Parameters: Prefetch Property: True or false: Specifies whether RealPlayer can obtain flow description information before playback, the default value is False

Parameters: Region Property: Any string action: Used with SMIL. Allows you to specify the use of HTML instead of SMIL

Parameters: Scriptcallbacks Properties: comma-separated list function: Specify browser callback monitoring (good high-level Dongdong!)

Parameters: Shuffle Property: True or false: Used with multiple file slices of RAM or smil files. Allows RealPlayer to randomly play the files in the list

Parameters: Src attribute: Any valid relative or complete URL action: Specifies the address of the file or source file to play

Parameters: Type attribute: string action: Specifying MIME type for embedded plug-in

Parameters: Width Property: Any integer value function: Specifies the width of the RealPlayer element

Some functions, methods and processes of RealPlayer

This is all the functions and methods of the real Player ActiveX control Library (Version 1.0) that are interesting to study.

function getsource:widestring;

Procedure SetSource (const lpsznewvalue:widestring);

function getconsole:widestring;

Procedure Setconsole (const lpsznewvalue:widestring);

function getcontrols:widestring;

Procedure Setcontrols (const lpsznewvalue:widestring);

function Getnolabels:wordbool;

Procedure Setnolabels (Bnewvalue:wordbool);

function Getautostart:wordbool;

Procedure Setautostart (Bnewvalue:wordbool);

function Getautogotourl:wordbool;

Procedure Setautogotourl (Bnewvalue:wordbool);

function Getvolume:smallint;

Procedure SetVolume (Nvol:smallint);

function Getmute:wordbool;

Procedure Setmute (Bmute:wordbool);

function Getloop:wordbool;

Procedure Setloop (Bval:wordbool);

function Getimagestatus:wordbool;

Procedure Setimagestatus (Benable:wordbool);

function Getpacketstotal:integer;

function Getpacketsreceived:integer;

function Getpacketsoutoforder:integer;

function Getpacketsmissing:integer;

function Getpacketsearly:integer;

function Getpacketslate:integer;

function Getbandwidthaverage:integer;

function Getbandwidthcurrent:integer;

Procedure Doplaypause;

Procedure Dostop;

Procedure Donextitem;

Procedure Doprevitem;

function Canplaypause:wordbool;

function Canstop:wordbool;

function Hasnextitem:wordbool;

function Hasprevitem:wordbool;

function Hasnextentry:wordbool;

function Haspreventry:wordbool;

Procedure Donextentry;

Procedure Dopreventry;

Procedure AboutBox;

Procedure Editpreferences;

Procedure Hideshowstatistics;

function Isstatisticsvisible:wordbool;

Procedure Dogotourl (const url:widestring; const target:widestring);

Procedure Doplay;

Procedure Dopause;

function Getposition:integer;

function Getplaystate:integer;

function Getlength:integer;

function gettitle:widestring;

function getauthor:widestring;

function getcopyright:widestring;

function Getclipwidth:integer;

function Getclipheight:integer;

function Canplay:wordbool;

function Canpause:wordbool;

Procedure SetPosition (Lposition:integer);

function Getnumloop:integer;

Procedure Setnumloop (Lval:integer);

function Getcenter:wordbool;

Procedure SetCenter (Bval:wordbool);

function Getnologo:wordbool;

Procedure Setnologo (Bval:wordbool);

function Getmaintainaspect:wordbool;

Procedure Setmaintainaspect (Bval:wordbool);

function getbackgroundcolor:widestring;

Procedure SetBackgroundColor (const pval:widestring);

function Getstereostate:wordbool;

function Getlivestate:wordbool;

function Getshowstatistics:wordbool;

Procedure Setshowstatistics (Bval:wordbool);

function Getshowpreferences:wordbool;

Procedure Setshowpreferences (Bval:wordbool);

function Getshowonmouseover Wordbool;

Procedure Setshowabou



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.