I need to synchronize Windows Media Player with my application. I want to show the current song that WMP is playing in a ListBox in real time, with updates when WMP changes songs. How can I implement this?
A bit of sniffing around in Google gave me this: http://brandon.fuller.name/archives/hacks/nowplaying/wmp/, it looks like you need to write a plugin for WMP that exposes the information to your application. Depending on what you need/cost, the Plugin on that page might do the job!
Poll HKEY_CURRENT_USER\SOFTWARE\Microsoft\MediaPlayer\Player\RecentFileList\File perhaps.
We've controlled Windows Media Player through the Windows Media library (wmp.dll) and .NET Remoting, using a singleton service.
Look here:
How to interact with Windows Media Player in C#
Related
I know it is somehow possible to implement a windows media player in a form with Visual C#.
The info for that is here: How to add the libraries and here How to code it.
But my project is in Visual C++ and I'm having a hard time finding how to do the same. It is a windows store application based on an example from a Hearth Rate Bluetooth monitor.
My goal is to play a video while the data acquisition occurs.
The answer is Windows Store App can't handle ActiveX controls. At least in a straightforward way.
The solution was to implement a MediaElement from the Toolbox into the XAML page. That element is easy to use with mediaElement.Play() and mediaElement.SetSource()
I am making a netradio app on windows phone, my problem is that netradio uses the RTSP audio format and native media player in Windows Phone does not support RTSP.
As a workaround, I have to navigate to a webpage that then handles the audio.
This works fine, and plays the radio, but the problem is that as soon as the app is put in the background the music stops.
Is there a way to keep the webbrowser audio playing?
You could use the BackgroundAudioPlayer within your solution as another project where you could go through a sample here.
And also the sample from Codeplex you can try the Windows Phone Streaming Media.
https://phonesm.codeplex.com/
Hope it helps!
There is no native RTSP support with BackgroundAudioPlayer. You would need to make your own MediaStreamSource implementation to be able to use the stream. At least I didn't find any public 3rd party solutions. Check this http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e052ea29-53cf-4ebb-8558-742b67fc72ad/rtsp-support-in-wp8.
If you are up for the task of writing your own MediaStreamSource implementation, you can use this as starting point and study the RTSP protocol here.
I am developing a windows form C# application that should be able to interface with iTunes. Basically, I now am able to use the iTunes COM to play music. However, when I do this, iTunes should be running since the music plays through iTunes. I was wondering if there is a way I can play music without iTunes running. Is it possible to just use the iTunes SDK to play music without starting iTunes?
No you can't. iTunesLib COM Object is just a way to control the player engine implemented in the iTunes application, and to manage the media library.
Even if you would like to implement your own player, you couldn't avoid iTunes showing up, because it's showing up when iTunes object is instanciated.
The only way is to implement your own (background) player and to parse the iTunes media library file with some XML process.
Is there a way to rewind/fast forward (or at least start playing at a certain position of a track) a media that is being played (using XNA.Framework.Media.MediaPlayer static instance) from a Media Library integrated application on Windows Phone Mango?
BTW: I have created a feature request on wpdev user voice community, so if you are in need of the similar functionality, go ahead and make a vote: http://wpdev.uservoice.com/forums/110705-app-platform/suggestions/2459380-allow-setting-a-playback-start-position-within-the
In XNA 4.0 there is no real way of doing this using MediaPlayer unless there are undocumented hacks to get it to. But definitely there are no documented ways of doing this with the MediaPlayer class.
I have created a movie player. I'm using the default windows control for Media Player. However I just saw that some movies do not work under it(some FLV files). However those files do work under Media Player Classic. So I was thinking about using the Media Player Classic control.
However
I want this movie player to be as portable as possible. So what I would like to do is to use Media Player Classic control when its available in system, but if its NOT than use Media Player control.
Is that even possible or do I need to create two applications that share the same code?
I would recommend using libvlc. VLC is really good about playing almost anything you give it. It is a C API but one could possibly DllImport their way to success and write code in C#.
Here are some good resources to get you started:
http://wiki.videolan.org/Libvlc
http://www.helyar.net/2009/libvlc-media-player-in-c/ (Shows how to DllImport and call the C code from C#)