Results 1 to 5 of 5

Thread: Playing media from Isolated storage on Windows Phone 7

  1. #1
    Join Date
    Oct 2010
    Posts
    70

    Playing media from Isolated storage on Windows Phone 7

    I have downloaded one MP3 file which has been saved on an isolated storage. But when i am trying to play this file then it is not working. Even i have tried playing it from the web server which didn't worked as well. Getting the same MP3 file from the my laptop works perfectly. The issue seems to be related to the MediaElement.SetSource throws a 'not implemented' exception. What you say guys?

  2. #2
    Join Date
    Oct 2008
    Posts
    421

    Re: Playing media from Isolated storage on Windows Phone 7

    I guess there are many things which are not accessible on Windows Phone 7 and one of them is playing the music from an Isolated storage. I suggest you to play the media by transferring it from the system itself until microsoft releases the updates for the Windows Phone 7. And i think there would be no way out to play the media from an isolated storage so it would be better you don't try for it much harder.

  3. #3
    Join Date
    May 2008
    Posts
    5,812

    Re: Playing media from Isolated storage on Windows Phone 7

    I have found information which might be helpful to you for an issue which you are facing while playing the media from an Isolated Storage. Actually the XNA SoundEffect.FromStream API only accepts PCM wave files and here you are looking for the XNA Song.FromUri() function to get the sound file from the server. Now the thing is that the Song.FromUri does not works with the file which has been placed on an isolated storage. It seems to that an API would be allowing you to stream within the MediaElement object.

  4. #4
    Join Date
    Oct 2008
    Posts
    401

    Re: Playing media from Isolated storage on Windows Phone 7

    Streaming an audio files or a video files online from the Windows Phone 7 is not at all good idea this operating system has many things which have not been provided or they need to some better solutions or an options such as Wifi or playing the media from the isolated space or local database issue. So it is much better to use an older version of the Windows Mobile so that you can enjoy using your phone instead of getting an errors and new issues on your phone due to this new operating system.

  5. #5
    Join Date
    Jan 2006
    Posts
    6,878

    Re: Playing media from Isolated storage on Windows Phone 7

    I have given you one code as follows which helps you to use the bit.ly to create a short URL containing the parameters which you would be able to use in the Song.FromUri but you have to register the name/key. You have to put the given code in an appropriate Silverlight app.
    Code:
    protected override void Init()
    {
    	WebClient user = new WebClient();
    	user.DownloadStringCompleted += new DownloadStringCompletedEventHandler(user_DownloadStringCompleted);
    
    	string trueUrl = "yourfullurl;
    	string bitlyLoginname = "yourbitlyname";
    	string bitlyTokenNo = "yourbitlytoken";
    	string bitly = string.Format(
    		"http://api.bit.ly/shorten?version=2.0.1&longUrl={0}&login={1}&apiKey={2}&format=xml", 
    		trueUrl, bitlyLoginname, bitlyTokenNo);
    	user.DownloadStringAsync(new Uri(bitly));
    
    	base.Init();
    }
    
    void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
    {
    	if (e.Error != null)
    		return;
    
    	XDocument doc = XDocument.Parse(e.Result);
    	string shortUrl = doc.Descendants("shortUrl").First().Value;
    	MediaPlayer.Volume = 1f;
    	MediaPlayer.Play(Song.FromUri("My Song", new Uri(shortUrl + "?.mp3")));
    }

Similar Threads

  1. Replies: 5
    Last Post: 07-03-2012, 02:46 AM
  2. Need help for Windows phone 7 Storage and Options
    By Loveyboo in forum Portable Devices
    Replies: 8
    Last Post: 04-09-2011, 10:27 AM
  3. Azure Storage and Windows Phone 7.
    By RAJni-Gandha in forum Portable Devices
    Replies: 4
    Last Post: 27-10-2010, 04:23 AM
  4. Cloud Storage and Windows Phone 7
    By Lacto-bacilli in forum Portable Devices
    Replies: 6
    Last Post: 27-10-2010, 12:16 AM
  5. Replies: 6
    Last Post: 07-01-2010, 11:50 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,245,984.87552 seconds with 17 queries