Open GoogleCodeExporter opened 8 years ago
I was thinking along the same lines. We might get better results not using
autoplay but responding to mpd's state events to start the stream:
mpd.events.on('state', function(){
if(mpd.status.state == 'play'){
...
}
})
I'll give it a try myself this week.
Original comment by cseic...@gmail.com
on 20 Dec 2010 at 5:07
I have added audio streaming via the html5 Audio() API to svn. There is a new
icon in the upper right hand corner for options. Tested in chrome on linux.
The problem is, the current html5 implementation does not support chained ogg
streams, which is why the stream stops when switching songs. To workaround
this, client175 will start a new stream on every song change.
Consider this a proof of concept for now. When browser support improves, I
will revisit this feature. I'll leave the issue open as a reminder...
Original comment by cseic...@gmail.com
on 24 Dec 2010 at 8:20
Thanks for attempting this. I think you're right about waiting for browser
support. Anyway, thanks again for client175.
Original comment by ajn...@gmail.com
on 7 Jan 2011 at 4:51
I love client175's interface, and it has an amazing feature set. This was the
one sticking point - I wanted to be able to stream the media to any browser.
Now I hate flash as much as everyone (I have it disabled by default in my
browser) but until HTML5 catches up we can use Flash to handle this. I'll post
here for anyone else who wants this functionality, I don't expect it to be
included in the standard build because Flash is annoying.
- Download a copy of FFMp3 from http://ffmp3.sourceforge.net/
- Put the file "ffmp3.swf" into your static folder
- You can use the form on the download page to put in your stream details. Specific points to watch for are the "Audio Codec" (if you haven't changed anything in mpd, it should be OGG) and "Auto Play" functionality.
- Copy this code into the body of index.html in the static folder
- Wrap it in a <div> tag so that we can position it.
- - If you want it to be positioned at the bottom of the window, use "position:absolute; bottom:0;"
- - If you don't want to see it, put "margin-left: -500px" (just to move it offscreen)
- - Don't put display:none or any variant, because then the flash will not load.
This setup works fairly nicely, with the only understandable caveat that there
is a delay between the client175 interface and the streaming feed based on your
bandwidth.
Original comment by bora...@gmail.com
on 27 Jan 2011 at 8:48
This flash method works better in my testing than the html5 method does
currently. Thanks for the clearly-written instructions.
Original comment by ajn...@gmail.com
on 31 Jan 2011 at 11:06
I think I'm using version 0.7 but not sure.
Just reporting that the audio tag does work in this version.
Depending on the browser, your http stream should be mp3 or ogg.
According to http://html5doctor.com/native-audio-in-the-browser/ :
ogg: FF3.6, Chrome6, Opera10.5+
mp3: Safari5+, Chrome6, IE9beta
Original comment by jeroen.o...@gmail.com
on 26 Dec 2011 at 2:32
Original issue reported on code.google.com by
ajn...@gmail.com
on 20 Dec 2010 at 5:58