FAQ
Hello Gophers,
I'm trying to work on a little side project inspired by
pianobar(https://github.com/PromyLOPh/pianobar). I want to write a cli that
allows interaction with 8tracks api. I figured out how to parse the json
that the server responds with, but I am currently unable to figure out how
to 'stream' the m4a files. The api that I have been looking at using is
here(https://8tracks.com/developers/api_v3). Any ideas?
Many Thanks,
Connor Ameres

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Brad Fitzpatrick at Jul 29, 2014 at 4:14 pm
    The http.Response.Body (a ReadCloser) is a stream. Just Read from it and
    then you're streaming. Just don't wait for it to finish reading, because
    it probably won't if it's a radio station. You'll probably want to write
    it to a decoder and/or sound device as you read it. You can use the
    os/exec to start a child process like vlc and set its Stdin to the value of
    your http.Response.Body and then start the process. As the child reads
    from stdin, it'll be pulling from your http response and playing.


    On Mon, Jul 28, 2014 at 8:26 PM, wrote:

    Hello Gophers,
    I'm trying to work on a little side project inspired by pianobar(
    https://github.com/PromyLOPh/pianobar). I want to write a cli that allows
    interaction with 8tracks api. I figured out how to parse the json that the
    server responds with, but I am currently unable to figure out how to
    'stream' the m4a files. The api that I have been looking at using is here(
    https://8tracks.com/developers/api_v3). Any ideas?
    Many Thanks,
    Connor Ameres

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJul 29, '14 at 1:45p
activeJul 29, '14 at 4:14p
posts2
users2
websitegolang.org

2 users in discussion

Brad Fitzpatrick: 1 post Connorameres: 1 post

People

Translate

site design / logo © 2022 Grokbase