我正在构建一个 Android 应用程序,它将从我的国家流式传输多个广播电台,我使用
一些网址,它们对我不起作用。这里的代码:
private void startStreamingAudio() {
try {
final ProgressBar progressBar = (ProgressBar) findViewById(R.id.progress_bar);
if ( audioStreamer != null) {
audioStreamer.interrupt();
}
audioStreamer = new StreamingMediaPlayer(this,textStreamed, playButton, streamButton,progressBar);
audioStreamer.startStreaming("http://stream.mosaiquefm.net/mosaique64k?MSWMExt=.asf",5208, 216);
streamButton.setEnabled(false);
} catch (IOException e) {
Log.e(getClass().getName(), "Error starting to stream audio.", e);
}
因此,当我更改其他网址时,例如此网址:
我只是想知道,为什么代码适用于某些 URL,而不适用于其他一些!谢谢你帮我..