C# Windows Media Player timeline - c#

Hello I want to use Windows Media Player (WinForms app) without any controls except timeline.
Is there any way?
I looked into AxWindowsMediaPlayer Object but i didn't seen any usefull interface for that.

Related

How to customize Windows Media Player UI programmatically?

I have this Skin Programming Reference for Windows Media Player: https://learn.microsoft.com/en-us/windows/win32/wmp/skin-programming-reference
According to that reference BUTTON.image is the image attribute that specifies or retrieves the default image of the BUTTON, I wanna change the color or skin of a BUTTONELEMENT such as play, pause, stop, next, prev, etc., how do I set those properties through an AxWMPLib.AxWindowsMediaPlayer object? Is it even possible or does it need something else? I'd appreciate both C# or C++ examples.
Everything about skins is explained in the old WMP 9 SDK (Windows Media Player 9 Series Software Development Kit
There is a basic sample, RemoteSkin, which implements the IWMPRemoteMediaServices as explained at Using Skins with the Windows Media Player Control
Skins have the .wms or .wmz extension and are just zip files with all necessary files inside
You can find many examples of more advanced skins on the Web, like World Of Warcraft Skin for Windows Media Player (you can extract the files from WoW.wmz)

How to display a video behind gui on mobile with Unity3D

Is it possibile to play a video, mp4 or other format, behind the GUI in Unity3D for mobile?
Using class MovieTexture it works on desktop, unfortunately MovieTextures aren't supported on iOS/Android.
And Handheld.PlayFullScreenMovie only plays the movie in full screen.
There is some other method?
(or a solid plugin)
Yes.
Vuforia Unity - How do I create a simple VideoPlayback app
You just can put your UI in front of the video.

Windows Phone 8.1 play a sound effect in C# WPF application

I'm making a simple 2d game using WPF where the game objects need to emit a sound when they hit the walls of the screen, but I can't find anything that lets me play a sound effect in Windows Phone 8.1.
In Windows Phone 8 I was using the SoundEffect class from XNA, but I don't think XNA is supported in 8.1 any longer. Is there any equivalent class I can use?
Use a <MediaElement> with MediaElement.AudioCategory set to ForegroundOnlyMedia
If you want more controlled sound playback, you'll need to use DirectX.

Better Slider Control in Windows 8 Media App

I'm developing Windows 8 App, it's use media element to play video and music
Windows 8 build in slider control is ugly and difficult to use on touch screen
I want something like this:
Very beautiful slider
Sorry, i don't have enough reputation to post images
How can I do this? Or what's the name of that control? I try transport slider, as show up here: Designing great entertainment app for Windows 8, but no luck
Thanks
That slider is available in Player Framework, an open source component of the Microsoft Media Platform.

How to interact with Windows Media Player in C#

I am looking for a way to interact with a standalone full version of Windows Media Player.
Mostly I need to know the Path of the currently played track.
The iTunes SDK makes this really easy but unfortunately there really isn't any way to do it with Windows Media Player, at least not in .Net(C#) without any heavy use of pinvoke, which I am not really comfortable with.
Thanks
Just to clearify: I don't want to embedded a new instance of Windows Media Player in my app, but instead control/read the "real" full version of Windows Media Player, started seperatly by the user
Just add a reference to wmp.dll (\windows\system32\wmp.dll)
using WMPLib;
And then you can instantiate a media player
var Player = new WindowsMediaPlayer();
// Load a playlist or file and then get the title
var title = Player.controls.currentItem.name;
See Creating the Windows Media Player Control Programmatically for more information
For remoting the Windows Media Player, you can use the IWMPRemoteMediaServices interface to control the stand alone Windows Media Player. And you should be able to read all the informations you want like title or filename from your WMP player object. Unfortunately there is no C# smaple code in the SDK included. You can get the files from here: http://d.hatena.ne.jp/punidama/20080227 Look for the file WmpRemote.zip
Originally it's from here: http://blogs.msdn.com/ericgu/archive/2005/06/22/431783.aspx
Then you have to cast to the WindowsMediaPlayer object:
RemotedWindowsMediaPlayer rm = new RemotedWindowsMediaPlayer();
WMPLib.WindowsMediaPlayer myPlayer = this.GetOcx() as WMPLib.WindowsMediaPlayer;
and there you go..
I had this https://social.msdn.microsoft.com/Forums/vstudio/en-US/dbd43d7e-f3a6-4087-be06-df17e76b635d/windows-media-player-remoting-in-c?forum=clr in my bookmarks but have NOT tested it in anyway. Just a pointer in the right direction. It's nothing official and will require a bit of digging, but you should get a fairly simple wrapper (which will still use PInvoke under the hood - but you won't see it) around Windows Media Player.
Hope that helps.
Oh, I misunderstood. I thought you were talking about controlling the currently running Windows Media Player instance. If you are hosting Windows Media Player yourself then WMPLib is certainly the better solution.
The best info I have seen on interacting with Windows Media Player is this article written by Stephen Toub.
He lists a whole load of different ways to play dvr-ms files (doesn't really matter what format they are for this though). The bit that is possibly of interest to you is about using a Media Player ActiveX Control, which you can add to the visual Studio toolbox by right-clicking and adding the Windows Media Player ActiveX COM Control. You can then embed the player into your app, and access various properties of Media Player, like the url:
WMPplayer.URL = stringPathToFile;
This solution is possibly not what you want because it's starting a new instance of Media Player (as far as I know), however it might point you in the right direction.

Categories

Resources