0
votes

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"/>
2
sorry, confused, now change myLAdmiral
Also are you targeting Windows Phone Silverlight or Runtime? (if Runtime then add tag windows-runtime)Romasz
runtime. which tag? and where to add?LAdmiral
The MediaElement object can play Windows Media Video (WMV), Windows Media Audio (WMA), and MP3 files only.vITs

2 Answers

2
votes

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.

0
votes

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");