BackgroundAudioPlayer由live mp3流引起的InvalidOperationException [英] BackgroundAudioPlayer InvalidOperationException by live mp3 stream

查看:81
本文介绍了BackgroundAudioPlayer由live mp3流引起的InvalidOperationException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为广播电台开发了一个广播播放器应用,但是BackgroundAudioPlayer不接受这个网址:'http://gffstream.ic .llnwd.net / stream / gffstream_mp3_w56a'(它是一个mp3流)。

I develop a radio-player-app for a radio station, but the BackgroundAudioPlayer don't accept this url: 'http://gffstream.ic.llnwd.net/stream/gffstream_mp3_w56a' (its an mp3 stream).

这里我的代码:

Uri address = new Uri("http://gffstream.ic.llnwd.net/stream/gffstream_mp3_w56a/; stream.mp3", UriKind.RelativeOrAbsolute);
BackgroundAudioPlayer.Instance.Track = new Microsoft.Phone.BackgroundAudio.AudioTrack(address,"SR-Online","","",null);
BackgroundAudioPlayer.Instance.PlayStateChanged += OnPlayStateChanged;
BackgroundAudioPlayer.Instance.Play();

我总是收到错误:'System.InvalidOperationException' - 'System.Windows.ni.dll'。

and I get always an error: 'System.InvalidOperationException' - 'System.Windows.ni.dll'.

如果我尝试用MediaPlayerLauncher启动它:

If I try it to launch it with MediaPlayerLauncher:

Uri address = new Uri("http://gffstream.ic.llnwd.net/stream/gffstream_mp3_w56a", UriKind.Absolute);
MediaPlayerLauncher mediaPlayer = new MediaPlayerLauncher();
mediaPlayer.Media = address;
mediaPlayer.Location = MediaLocationType.Data;
mediaPlayer.Controls = MediaPlaybackControls.Pause;
mediaPlayer.Show();

一切正常。

有谁知道它是什么, BackgroundAudioPlayer无法播放这个mp3流吗?

Have anyone an idea what can it be, that the BackgroundAudioPlayer can't play this mp3 stream?

感谢您的答案

Gruß,Charly43

Gruß, Charly43

推荐答案

到目前为止您做了哪些故障排除? 你能成功播放其他mp3流吗? 您是否尝试过跟踪网络流量? 这对你有用吗?
What troubleshooting have you done so far?  Can you play other mp3 streams successfully?  Have you tried tracing the network traffic?  Has this ever worked for you?


这篇关于BackgroundAudioPlayer由live mp3流引起的InvalidOperationException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆