- 01-03-2013, 03:48 AM #1
Ok, so I'm wanting to release my WP7 app, but one of the things that has me irked is I can't seem to find a way to get audio from the app into the default music player. What I'll be doing is adding a playlist that consists of copies of the stream plus a "Bridge" which plays in between shows on the station to prevent dead air. Now, is there any way to plug this in to the music player while bypassing the shuffle? The reason for bypassing shuffle even if the user has it set is because I don't want 2 stream files next to each other, they need to be bridged. The files are all online so would be streamed to the device (warning about data usage will also be given).
01-15-2013, 07:26 PM #2
- 73 Posts
You can't edit system playlists in Zune or directly modify the MediaPlayer's MediaQueue. What you can do in your app is to query the MediaLibrary for the music you want, and then use MediaPlayer.play() to play the Song you wanted. If you have streaming media, you can use Song.FromUri() to get a Song object for MediaPlayer.play(). If you want any kind of "playlist", you will have to manage that yourself somehow. To insert the "bridge", you can hook into the MediaPlayer's MediaStateChanged event to control the flow of the audio you want to play. For dealing with shuffle, you can save whatever value shuffle is set to when you start the app, set MediaPlayer.IsShuffled() to false, and then restore the original value of shuffle when the program exits.
Last edited by Catholic Tech Geek; 01-16-2013 at 01:33 PM.Microsoft Student Insider and rom developer for Asus Mypal A6x6 and Axim X50 (and soon, LG Quantum too)
My work is free for everyone's use, but if you wish to give a donation towards my work (I am a full-time college student working in what little spare time I do have), you may do so (paypal email is email@example.com).
Check out my blog for news on mobile Windows and other tech: Catholic Tech Geek
Students, check out Dreamspark for the tools you need and Imagine Cup if you want a challenge
- 01-16-2013, 09:37 PM #3
Had a look through the links. They all seem to be XNA based commands. How would that differ with a standard Silverlight app, if at all?
However, if I can find a way to store the state upon closing the app, so that it can be reset upon stopping the app's playlist (along with the Now Playing playlist prior to starting the app's playlist) that would be fantastic. I'm only having Play and Stop buttons in my app, to grab the stream and clear the stream playlists. Controls such as pausing the stream, and skipping tracks, will be handled by the UVC.
- By Umm Yeah... in forum HTC TrophyReplies: 5Last Post: 08-02-2011, 03:05 AM
- By Ozden79 in forum Developer SpotlightReplies: 0Last Post: 08-01-2011, 05:50 PM
- By daniel_leavitt2000 in forum Windows Phone 7Replies: 24Last Post: 07-26-2011, 04:54 PM
- By jalb in forum Windows Phone 7Replies: 6Last Post: 05-31-2011, 11:47 AM
- By netkodrugi in forum Windows Phone 7Replies: 8Last Post: 03-10-2011, 12:42 PM