locked
Audio streaming not working with MediaElement RRS feed

  • Question

  • Before I upgraded to windows 8.1, it seemed to work fine, I upgraded the target to .NET Framework 4.5.1 and now it is not working, I have added the code for background audio as in this tutorial http://msdn.microsoft.com/en-us/library/windows/apps/jj841209.aspx

    my code for this app is here - http://pastie.org/private/bbi0sw4o3ydlty0tvsvna

    please help me with what i am doing wrong.

    Henry

    Tuesday, October 8, 2013 5:45 PM

All replies

  • This probably is not the specific cause of your error, but ... it is not a good idea to put InitializeComponent inside a try block. You couldn't possibly have a graceful recovery for that not running. And you might also save setting your MediaElement.Source for a Loaded event handler rather than slamming it in there immediately after InitializeComponent is called. There could be a timing issue with that.
    Wednesday, October 9, 2013 12:44 AM
  • Hi imbehindyou123,

    Try to remove try and catch block to see what kind of exception has been thrown. I tried your code and replace with another mp3 address and it works fine for me. I do think you have another code for win8 since SystemMediaTransportControls is a new win8.1 feature.

    You should really validate if your source is correct or not. The Uri in your code does not look like a media address.

    Uri pathUri = new Uri("http://62.65.106.78:8003");
    MusicPlayer.Source = pathUri;
    

    By the way I will move the thread to win8.1 forum for a better support.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, October 9, 2013 2:11 AM
    Moderator