Windows Phone XNA MediaPlayer rewind/fast forward functionality - c#

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.

Related

How to keep a media player going in mobile app?

So, I am looking to make a media player that is cross-platform (windows 10 + windows 10 mobile, XBOne, iOS, OSX, and Android), using C# (by far my most proficient language). I need it to remain playing in the background when the user is doing other things (for all but the XBOne). Ideally, I would like to use a cross-platform framework such as Unity, but if that's not possible, I need to know what steps I must take to make my app persist on each platform.
OSX/Windows 10 are easy, but I haven't been able to find absolutely any good information for Android/iOS especially. How does one keep a media player app going in the background on these? I see posts saying a media player that persists is doable, but they never say how.

Get Video from webcam / Ip-camera

I'm trying to implement camera security in my application. I got some SDK's from some security companys to implement there system but they all use ActiveX. My view right now is that ActiveX is kinda old?
But what is the newest way to get video from devices and display (stream) them on a screen?
What control to use in .net 4.5 WPF (and Windows 8)
I'm working on video WPF app for two years now and we had a fundamental problem with video and WPF which was never resolved, and that's variable fps-rate. This blog post goes into details.
There's also a nice library called Media Kit (by Jeremiah Morrill), it might be suitable for your problem.
In our solution we had no choice but to expose HWND's for our rendering DirectX engine. We accomplished this by using HwndHost class and extending it to our custom WPF control. Note this is the base class for windows forms host, so you get the same amount of problems as with WinForms-WPF inter op.
Also, ActiveX is the only way to display professional camera video streams in web interfaces, it's still a defacto industry standard, you'll get it from MOXA, Acti, Vivotek and various other camera equipment manufactureres.
One more thing, if you need to perform some advanced analysis of video, I'd suggest OpenCV.

Embedding Windows media player in C# any other alternative?

I am using embedded version of Windows media player 11+ using C# in a windows application. Is there any better alternative to play audio? I am looking to play audio and will not be playing videos at all.
Windows media player plays well but I am curious about other alternatives as well.
FMOD is a very nice free library that, while game-oriented, supports many formats and has a full-featured C# API.
It's extremely easy to use (for simple scenarios) and comes with lots of examples.

Current playing item in Windows Media Player (wmplayer.exe ver. 12)

Been trying this for a while now.
All solutions I've seen on the net don't seem to work, specially the really simple way to do it.
WMPLib.WindowsMediaPlayer c = new WMPLib.WindowsMediaPlayer();
IWMPMedia i = (IWMPMedia)c.currentMedia;
c.currentMedia is always null.
It seems that new WMPLib.WindowsMediaPlayer(); is always creating a new instance of the Windows Media Player.
First I thought it was the fact that I was running visual studio as Administrator, but changing that did not help.
Seems I somehow have to connect to the running instance of wmplayer.exe but have unable to find a way to do that.
Btw. What I need is a full file url for the current playing song (or fullurl if streaming, but that's the least of my concerns now.)
Your question answered here.
A pretty straight way:
Get a WMP9 plugin here that will put your current song name on the
titlebar of the WMP window, and use
FindWindow P/Invoke to get the window
and get the song name. It shoud work,
though a little tricky.
Check here for more details.
Windows Media Player 9 Series Blogging Plug-in
A much more complex way:
Since your application and the WMP will be different processes, your
scenario requires some kind of
inter-process-communication (IPC). And
.NET offers Remoting for this purpose.
Below are some useful information:
How to interact with Windows Media Player in C#
Windows Media Player Remoting in C#
from SamAgain

How to interface with Windows Media Player in C#

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#

Categories