Reputation: 1
MediaElement Windows Phone 8.1 does not play links to resources, for example http://kgot-fm.akacast.akamaistream.net/7/449/31707/v1/auth.akacast.akamaistream.net/kgot-fm, but plays links. mp3. Windows 8 running all references. What's the problem? and how to fix it? the same code.
//only works in windows 8.1
<MediaElement x:Name="MediaElement"
Source="http://kgot-fm.akacast.akamaistream.net/7/449/31707/v1/auth.akacast.akamaistream.net/kgot-fm"
AutoPlay="True" Margin="199,320,114,252" Width="100" Height="100"/>
//works in windows 8, and in windows phone 8.1
<MediaElement x:Name="MediaElement"
Source="http://radio02-cn03.akadostream.ru:8114/businessfm96.mp3"
AutoPlay="True" Margin="199,320,114,252" Width="100" Height="100"/>
Upvotes: 0
Views: 2345
Reputation: 1
from the c# set the string as uri
MediaElement.Source = new Uri("http://kgot-fm.akacast.akamaistream.net/7/449/31707/v1/auth.akacast.akamaistream.net/kgot-fm");
Upvotes: 0
Reputation: 29792
If you subscribe to MediaElement.MediaFailed
:
MediaElement.MediaFailed += MediaElement_MediaFailed;
then you will see that using the first link you get:
MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED : HRESULT - 0xC00D2EE0
which means (HRESULT) that:
0xC00D2EE0 NS_E_UNKNOWN_PROTOCOL
The specified protocol is not supported.
The list of supported audio and video formats you will find here.
Upvotes: 2