[英]MediaElement Windows Phone 8.1 does not play links to resources
MediaElement Windows Phone 8.1不播放資源鏈接,例如http://kgot-fm.akacast.akamaistream.net/7/449/31707/v1/auth.akacast.akamaistream.net/kgot-fm ,但播放鏈接。 MP3。 Windows 8運行所有引用。 有什么問題? 以及如何解決它? 相同的代碼。
//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"/>
如果您訂閱了MediaElement.MediaFailed
:
MediaElement.MediaFailed += MediaElement_MediaFailed;
然后你會看到使用你得到的第一個鏈接:
MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED:HRESULT - 0xC00D2EE0
這意味着(HRESULT):
0xC00D2EE0 NS_E_UNKNOWN_PROTOCOL
不支持指定的協議。
從c#中將字符串設置為uri
MediaElement.Source = new Uri("http://kgot-fm.akacast.akamaistream.net/7/449/31707/v1/auth.akacast.akamaistream.net/kgot-fm");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.