C # common methods for player empty parts

Source: Internet
Author: User

MediaPlay 9

Right-click the toolkit-> select item (I)...-> display "select toolkit item"-> COM component-> Windows Media Player wmp. dll add

AxWindowsMediaPlayer1.windowlessVideo = false; // if it is set to false, double-click the screen to enable full screen
AxWindowsMediaPlayer1.fullScreen = true; // sets the player to play in full screen mode.

AxWindowsMediaPlayer1.URL = @ "mms: // 192.168.0.102/vod/jingwei.wma ";

AxWindowsMediaPlayer1.Ctlcontrols. play (); // play
AxWindowsMediaPlayer1.Ctlcontrols. stop (); // stop
AxWindowsMediaPlayer1.Ctlcontrols. pause (); // pause

AxWindowsMediaPlayer1.settings. autoStart = true; // automatic playback

AxWindowsMediaPlayer1.settings. mute = false; // mute
AxWindowsMediaPlayer1.settings. volume = 100; // volume int 0 ~ 100 100 is the maximum volume

AxWindowsMediaPlayer1.currentMedia. duration. ToString (); // video Length
AxWindowsMediaPlayer1.Ctlcontrols. currentPosition = 30; // The current playback position is double.

AxWindowsMediaPlayer1.currentMedia. getItemInfo ("Title"); // Title
AxWindowsMediaPlayer1.currentMedia. getItemInfo ("Author"); // prepared

//************************************** ***************************************//

MediaPlay earlier versions

Right-click the toolbox and choose items (I )... -> show "select toolbox item"-> COM component-> browse (B )... -> C: WINDOWSsystem32msdxm. ocx-> open
Add Windows Media Player msdxm. dll

Label4.Text = axMediaPlayer1.Volume. ToString (); // volume
AxMediaPlayer1.FileName = @ "mms: // 218.98.101.164/vod/jingwei.wma"; // file path
AxMediaPlayer1.Play (); // start playing

//************************************** **************************************** //
//************************************** **************************************//

Right-click the toolkit-> select item (I)...-> display "select toolkit item"-> COM component-> RealPlayer G2 Control rmoc3260.dll add

AxRealAudio1.Source = @ "F: mp3hh.mp3"; // playback path

AxRealAudio1.CanPlayPause (); // whether the Bool type can be paused
AxRealAudio1.CanPause (); // pause
AxRealAudio1.DoPlayPause (); // The video being played is paused.

AxRealAudio1.CanPlay (); // whether Bool can be played
AxRealAudio1.DoPlay (); // playback

AxRealAudio1.CanStop () // whether the playback can be stopped
AxRealAudio1.DoStop (); // stops playing

AxRealAudio1.SetCenter (true); // stream the video to the original size
AxRealAudio1.SetFullScreen (); // The player plays a video in full screen mode.

Int place = axRealAudioP. GetPosition ();
AxRealAudio1.DoStop ();
AxRealAudio1.SetCente * (** lse); // play axRealAudio1.SetCenter (true) by Film Size
AxRealAudio1.DoPlay ();
AxRealAudio1.SetPosition (place );

NResL = axRealAudio1.GetPosition (); // gets the playing progress of the current video.
Label1.Text = axRealAudio1.GetTitle (); // obtain the title of the video.
Label2.Text = "Current bandwidth:" + axRealAudio1.GetBandwidthCurrent ()/1024 + "KB"; // current bandwidth of the current video
Label3.Text = "connected bandwidth:" + axRealAudio1.GetConnectionBandwidth ()/1024 + "KB"; // bandwidth of the current connection

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.