Integrating the Media Player
-
Hi everyone i am trying to code a program that should be able to play videos besides other features. I thought it would be easiest to accomplish the task by just integrating the Windows Media Player-COM-Object, but i couldn't get the controls to disappear (i want my own user-interface..). I read about mediaplayer-integration in a book called 'Advanced C# Programming' by Paul Kimmel. But he seemed to use a different com-object and the demo-app to that chapter doesn't compile (can't find the reference to AxMediaPlayer). The only COM-object i found, that looks like it has really something to do with the mediaplayer is this: AxWMPLib.AxWindowsMediaPlayer. But with this one i get these nasty mediaplayer-controls that i can't get rid of. Can anybody help me with this, or does somebody know a better solution? thanks in advance
-
Hi everyone i am trying to code a program that should be able to play videos besides other features. I thought it would be easiest to accomplish the task by just integrating the Windows Media Player-COM-Object, but i couldn't get the controls to disappear (i want my own user-interface..). I read about mediaplayer-integration in a book called 'Advanced C# Programming' by Paul Kimmel. But he seemed to use a different com-object and the demo-app to that chapter doesn't compile (can't find the reference to AxMediaPlayer). The only COM-object i found, that looks like it has really something to do with the mediaplayer is this: AxWMPLib.AxWindowsMediaPlayer. But with this one i get these nasty mediaplayer-controls that i can't get rid of. Can anybody help me with this, or does somebody know a better solution? thanks in advance
i just downloaded the media player 9 SDK and tried to compile the c#-sample (named tune-clipper). As written i registered the wmppia.dll with regasm.exe and installed it with gacutil.exe (Global Assembly Cache Utility). This seemed to be successful. But as i tried to compile the tuneclipper i stumbled accross compile-errors (actually 18 of the same kind): D:\dev\SDKs\WMSDK\WMPSDK9\samples\dotNet\csharp\Form1.cs(689): 'AxMicrosoft.MediaPlayer.Interop.AxWindowsMediaPlayer' does not contain a definition for 'controls' I get this one when a call to Player.controls.xxx is made. Player is defined as 'private AxMicrosoft.MediaPlayer.Interop.AxWindowsMediaPlayer'. Player.controls seems to be undefined.. very strange.. (i guess Microsoft-code is supposed to run..) Does anybody know a way out?
-
i just downloaded the media player 9 SDK and tried to compile the c#-sample (named tune-clipper). As written i registered the wmppia.dll with regasm.exe and installed it with gacutil.exe (Global Assembly Cache Utility). This seemed to be successful. But as i tried to compile the tuneclipper i stumbled accross compile-errors (actually 18 of the same kind): D:\dev\SDKs\WMSDK\WMPSDK9\samples\dotNet\csharp\Form1.cs(689): 'AxMicrosoft.MediaPlayer.Interop.AxWindowsMediaPlayer' does not contain a definition for 'controls' I get this one when a call to Player.controls.xxx is made. Player is defined as 'private AxMicrosoft.MediaPlayer.Interop.AxWindowsMediaPlayer'. Player.controls seems to be undefined.. very strange.. (i guess Microsoft-code is supposed to run..) Does anybody know a way out?
I'm not sure but I think the you may use the property 'uiMode'. Valid values are "none", "mini", and "full"... eg... wmp1.uiMode = "none"; Also.. If you don't want the context menu for the Windows Media Control , use wmp1.enableContextMenu = false; // true to turn it back on Hope that helps.. Yippee Kai Yai Signed Polomint.......
-
I'm not sure but I think the you may use the property 'uiMode'. Valid values are "none", "mini", and "full"... eg... wmp1.uiMode = "none"; Also.. If you don't want the context menu for the Windows Media Control , use wmp1.enableContextMenu = false; // true to turn it back on Hope that helps.. Yippee Kai Yai Signed Polomint.......
-
Yup, thanks. does your mediaplayer have the 'controls'-property? As i wrote, mine somehow doesn't. Without it i can't really control media-files. All the play-, stop- and pause-methods are in there.
I've just checked for the controls property and I do have it. wmp.Controls( int index ); I assume that the index is the index of the play/pause controls etc. Are you using Visual Studio? I use VS2003, and all I do is add the Windows Media Player COM component to the toolbox, then use it. HTH John
-
Yup, thanks. does your mediaplayer have the 'controls'-property? As i wrote, mine somehow doesn't. Without it i can't really control media-files. All the play-, stop- and pause-methods are in there.
Damn, my post was hijacked by Anonymous !!!! :-D I've just checked for the controls property and I do have it. wmp.Controls( int index ); I assume that the index is the index of the play/pause controls etc. Are you using Visual Studio? I use VS2003, and all I do is add the Windows Media Player COM component to the toolbox, then use it. HTH John Yippee Kai Yai Signed Polomint.......
-
Damn, my post was hijacked by Anonymous !!!! :-D I've just checked for the controls property and I do have it. wmp.Controls( int index ); I assume that the index is the index of the play/pause controls etc. Are you using Visual Studio? I use VS2003, and all I do is add the Windows Media Player COM component to the toolbox, then use it. HTH John Yippee Kai Yai Signed Polomint.......
damn hijackers ;) I use VS2003, too. At first i just integrated the mediaplayer in my toolbox like you. But as i found out i didn't have that controls-interface in my mediaplayer (but the microsoft-one has) i downloaded the SDK. I still can't compile their sample-app. Btw: I have a Controls-interface.. but not the one that microsoft in the sample uses ;) . But i can't type wmp.Controls(myindex); because in my VS2003 it's not a method.. In the microsoft-sample it's also written lowercase ('controls') and it has functions like play, stop and pause. This friggin thing is starting to go on my nerves.. why can't it just work as it's supposed to be.. or at least as the help tells me it works..