How could I play a shoutcast/icecast stream using HTML5?

2020 update Modern browsers don’t need any special treatment or server-side workarounds to play audio. Simply use an audio tag with a direct link to one or more stream sources (not a playlist): <audio> <source src=”http://relay.publicdomainradio.org/classical.mp3″ type=”audio/mpeg”> </audio> From MDN: The HTML <audio> element is used to embed sound content in documents. It may contain … Read more

Android Media Stream Error? java.io.FileNotFoundException: No content provider :http://

Go to this file https://github.com/Old-Geek/Radio/blob/master/app/src/main/java/org/oucho/radio/Player.java#L234 and change player.setDataSource(context, Uri.parse(url)); to player.setDataSource(url) The problem is that void setDataSource (String path) Sets the data source (file-path or http/rtsp URL) to use. path String: the path of the file, or the http/rtsp URL of the stream you want to play the github code uses void setDataSource (Context context, … Read more

Why does it take so long for Android’s MediaPlayer to prepare some live streams for playback?

It does appear that it is buffering a fixed amount of data rather than a fixed amount of time. For anyone who doesn’t know the bitrates of various types of NPR streams off the top of their head, the data looks like: MPR news stream: 27 seconds (http://newsstream1.publicradio.org:80/), 64 kbps MPR classical music stream: 15 … Read more

Streaming audio from a Node.js server to HTML5 tag

Here’s a (slightly outdated) summary of the current status of HTML5 Audio and Icecast streams. As you can see, a MP3 source only seems to work in Safari (and possibly IE9). You might need to experiment with some server-side transcoding (with ffmpeg or mencoder) to OGG Vorbis. I’m pretty sure I was able to get … Read more

AVPlayer “freezes” the app at the start of buffering an audio stream

Don’t use playerItemWithURL it’s sync. When you receive the response with the url try this: AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:url options:nil]; NSArray *keys = @[@”playable”]; [asset loadValuesAsynchronouslyForKeys:keys completionHandler:^() { [self.player insertItem:[AVPlayerItem playerItemWithAsset:asset] afterItem:nil]; }];

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)