Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
clwinters
Visitor

AudioApp help

I'm trying to create a radio channel that will later include AOD, VOD, and HLS video. First steps first.

1. I'm able to get the audio stream to play after modifying the AudioApp. The problem I'm running into is, it takes about 30 seconds for the stream to actually start playing. Is there a buffer or other parameter I'm overlooking? I note that when I play the station from TuneIn it plays immediately. I know TuneIn is using the same stream to feed their channel as I. What's different?

2. The audio stream has metadata embedding in it to display song title information. Is there a way to display mp3 metadata information while the stream is playing?

3. Similar to the TuneIn app, I'd like to add our Twitter feed to the screen and have it rotate with the mp3 stream metadata. I've looked at the TwitterOAuth source but that gives me the ability to post to Twitter, I just want to poll the Twitter feed.

Any thoughts, comments, or suggestions would be great appreciated.
0 Kudos
5 REPLIES 5
RokuChris
Roku Employee
Roku Employee

Re: AudioApp help

"clwinters" wrote:
2. The audio stream has metadata embedding in it to display song title information. Is there a way to display mp3 metadata information while the stream is playing?


Metadata embedded in the stream is not exposed through BrightScript. You'd have to pull any metadata from a separate source.

"clwinters" wrote:
3. Similar to the TuneIn app, I'd like to add our Twitter feed to the screen and have it rotate with the mp3 stream metadata. I've looked at the TwitterOAuth source but that gives me the ability to post to Twitter, I just want to poll the Twitter feed.


You probably want this endpoint https://dev.twitter.com/docs/api/1/get/ ... r_timeline
0 Kudos
RokuJoel
Binge Watcher

Re: AudioApp help

If your audio stream is Shoutcast, you can usually get the song data from the server at:

http://server.com:portnumber/7.html

and also http://server.com:portnumber/played.html

where portnumber is the port of the shoutcast server

and with some ugly hacks (using either roRegex, or string manipulation functions or both) convert the html into usable data.

If you really wanted to get into the nitty gritty, you could probably extract the song information from the stream itself using roStreamSockets, but it would be a significant undertaking.


- Joel
0 Kudos
clwinters
Visitor

Re: AudioApp help

Thanks for the help on the Twitter integration. We currently send our song data to Twitter so I'll probably just rotate between our song data user id and our station user id once I get one of them to start working and embedded in the audio player.

Did anyone have any input as for the delay of when the audio actually starts playing?

"clwinters" wrote:
1. I'm able to get the audio stream to play after modifying the AudioApp. The problem I'm running into is, it takes about 30 seconds for the stream to actually start playing. Is there a buffer or other parameter I'm overlooking? I note that when I play the station from TuneIn it plays immediately. I know TuneIn is using the same stream to feed their channel as I. What's different?


Also, seeing how I'll be adding a lot of the VideoPlayer features, should I be working off of that build instead of the AudioApp?

Thanks again.
0 Kudos
destruk
Streaming Star

Re: AudioApp help

For the delay, it is minimized on Roku 2's, but takes longer to buffer on roku1. I don't know of any way to speed that up.
0 Kudos
clwinters
Visitor

Re: AudioApp help

"destruk" wrote:
For the delay, it is minimized on Roku 2's, but takes longer to buffer on roku1. I don't know of any way to speed that up.


I understand there's going to be a buffer delay on the stream but there's a 30 second difference if opened in TuneIn verse opening in the AudioApp sample. Something is definitely coded differently. Just not sure what it is...?
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.