axwindowsmediaplayer

How to jump X second with axWindowsMediaPlayer in C#

那年仲夏 提交于 2019-12-01 01:02:35
I am using axWindowsMediaPlayer, and I have a video loaded, but I want to jump X seconds. So, for example, if the current time is 1 minute into the video, I want to jump to 1 minute 10 seconds. Okay, I found my solution. I was actually running it correctly, but I was not accounting for the time it takes to load the video. Specifically, the needed code is like axWindowsMediaPlayer1.Ctlcontrols.currentPosition += 10; However I wrote a function to check to see if the video had finished loading and attached a timer to it private bool isPlaying() { return axWindowsMediaPlayer1.playState ==

How to add multiple files to a playlist

旧巷老猫 提交于 2019-11-28 22:03:45
I have one OpenFileDialog control that has Multiselect = true . Now I want to add each file to windows media player playlist but I have no idea how to do that and there is no good example on the internet. if (ofdSong.ShowDialog() == DialogResult.OK) { foreach (string file in ofdSong.FileNames) { //Code to add file to the playlist } } a1204773 With help of DJ KRAZE that gave me the example link and JayJay who wrote that example, here is the solution. WMPLib.IWMPPlaylist playlist = wmp.playlistCollection.newPlaylist("myplaylist"); WMPLib.IWMPMedia media; if (ofdSong.ShowDialog() == DialogResult

How to add multiple files to a playlist

隐身守侯 提交于 2019-11-27 14:11:25
问题 I have one OpenFileDialog control that has Multiselect = true . Now I want to add each file to windows media player playlist but I have no idea how to do that and there is no good example on the internet. if (ofdSong.ShowDialog() == DialogResult.OK) { foreach (string file in ofdSong.FileNames) { //Code to add file to the playlist } } 回答1: With help of DJ KRAZE that gave me the example link and JayJay who wrote that example, here is the solution. WMPLib.IWMPPlaylist playlist = wmp

Windows Media Player control - get/set video position?

我的梦境 提交于 2019-11-27 05:53:25
问题 I am using Windows Media Player ActiveX (axWindowsMediaPlayer) component in C# WinForms application. Is it possible to get and set the current position of the video that is being played using this control? 回答1: axWindowsMediaPlayer1.Ctlcontrols.currentPosition = positionInSeconds; 来源: https://stackoverflow.com/questions/5590291/windows-media-player-control-get-set-video-position