Windows phone music player - windows-phone-7

I am developing a music player using X N A in windows phone.
Here I am using a slider to automatic synchronizing of songs.
Problem is how can i seek song in slider .I am also using timer.
MediaPlayer.PlayPosition=TimeSpan.FromMilliseconds(slider1.Value);
I have tried mediaPlayer.PlayPosition propety in slider mouse left button event but it is saying play position property is read only.So
please help.

This seems practically impossible to do..
Here's the UserVoice request, asking just this.
http://wpdev.uservoice.com/forums/110705-dev-platform/suggestions/2411252-mediaplayer-playposition-should-be-able-to-be-set
There are some other tricks to accomplish this, as explained in this question. (Though it would be an overkill by the look of it.)
XNA MediaPlayer fastforward/rewind

Related

Adding multiplayer to HTML5 canvas game

Let's say I have similar simple HTML5 canvas game in website: LINK
What are the options to add multiplayer to this? By that I mean one user can play with other.
Tutorial?
Blog post I didn't find?
Library specially for that?
Or you know to say few works about that?
First there's a Play button which then "keeps loading" when clicked until anyone else presses the button too & it automatically hooks up these 2 users - very simple construction, nothing too complicated.
I've done my homework & I didn't find anything useful.
You have some options, but for a basic tic-tac-toe game I'd use a database.
Connect the clients to the database, updating the move they make from both sides and voila, you've got yourself a (slow) multiplayer game.
Alternatively, check out this tutorial to try it with javascript (ajax): https://jadendreamer.wordpress.com/2012/04/26/ajax-tutorial-2-player-tic-tac-toe-game-no-database-required/

Sync MediaElement to Slider in Windows Store App

Im developing an app like media player to Windows Store using c#. I use C# But I have a problem .
I want to sync MediaElement to slider. For examle the music in the mediaelement and music is playing. I want to see the position of music in the slide bar. For example if music in the 30th , Sliderbar's value is 30.
I answered a very similar question already. Please take a look at this answer and let me know if that's what you were looking for! If you need more details, please comment.
A msdn tutorial including the implementation of a slider control is provided here. Hope this helps.

Is there a standard Control for creating an in-app video player?

Im making a videoplayer in a wp7 app. Im using mediaelement to show the video, and sets its source from a url. Functionality i wanted are play/stop-buttons, forwarding/rewinding, a progressindicator (for the progress of the video itself) and show a progressbar when it buffers. I have accomplished all above, using some customized grids, buttons and so on.
I did get some trouble though, which i dont want to bother you with here (its a mess) and which is why im asking the following:
Is there a standard (or downloadable) control for wp7 that does all these things for me and that works perfectly. Ive searched "everywhere" but couldnt find anything. It surprises me that this isnt an easy to use, built in control that is easy to customize, since standard videoplayers are something id guess alot of apps could take advantage of.
Anyone?
Here is a tutorial on how to create a Windows Phone 7 View Model Style Video Player.

How can I stop background audio played by other apps?

I have an app for WP7, using BackgroundAudioPlayer as we need to play in the background. The problem is, when there's already an app playing audio in the background, I can't get my AudioPlaybackAgent work, the previous music just keep playing.
The document introduced this way,
BackgroundAudioPlayer.Instance.Close();
by which I can only close the audio that is played by myself or Zune, but it doesn't work when the audio is played by other apps.
So is there a way to close all the playing audio?
OK I fixed it.
What I did to get it play is like this, first I set a track to the player:
BackgroundAudioPlayer.Instance.Track = ...;
Then an OnPlayStateChanged event will fire in the background agent, where I call the BackgroundAudioPlayer.Instance.Play() method. This seems to work great.
But if the background player is already being used by another app, the PlayState won't change to TrackReady when I set the track, and consequently the event won't fire.
To fix this, I simply call the .Play() method in the main UI thread, right after setting the track. And it works.

How to capture actions taken on Windows Media Player

I want to programmtically detect the state of movie currently being played in Windows Media Player. i..e if the movie is maximized I need to find that it is maximized and put the word "MAXIMIZED" in text file, if the movie is paused I need to capture PAUSED in text file, if movie is stopped I need to capture STOPPED in text file.
The capturing needs to happen in the background i.e. totally transparent to end user as the user takes action while watching the movie on Windows Media player
I am planning to achieve this using Visual Basic 6.0
Kindly provide me inputs / pointers on how to go about this.
Thanks
I think only way how to do this, is using Windows Media Player SDK.
Windows Media Developer Center
You have to create a Media Player plugin and access the state using the Media Player API.
Theoretically you could also do some external analysis of the Media Player, for example by enumerating its windows and handles and reading window texts, but that would be very "hacky" and most fragile.
Although creating a plugin sounds like a lot of work, it'll be the better solution in the long run.

Resources