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: 
SkipFire
Visitor

roSpringboardScreen no progress bar

I have roSpringboardScreen that starts an roAudioPlayer and I have the roSpringboardScreen content type set to audio and I see the artist and album labels but I don't see the progress bar. Is there something I need to do to link the roSpringboardScreen and the roAudioPlayer? I do have screen.SetProgressIndicatorEnabled(true) included in the code.
0 Kudos
9 REPLIES 9
belltown
Roku Guru

Re: roSpringboardScreen no progress bar

Are you calling SetProgressIndicator() ?
0 Kudos
SkipFire
Visitor

Re: roSpringboardScreen no progress bar

I call it once at the beginning just with 0, 60 just hoping it will initialize it, but it doesn't show. I also don't see how it should be updated.
0 Kudos
belltown
Roku Guru

Re: roSpringboardScreen no progress bar

There's some more discussion of this topic in: http://forums.roku.com/viewtopic.php?f=34&t=46239&p=314965

It seems that if you have a call to SetPosterStyle on the audio springboard then you won't see the progress bar. Also, make sure your roAudioplayer Wait loop specifies a timeout value of something greater than zero.
0 Kudos
SkipFire
Visitor

Re: roSpringboardScreen no progress bar

I stumbled on that discussion as well. I do not have SetPosterStyle set, and I do have the wait set to something bigger than 0. Below is my code down to the top of the wait loop.

port = CreateObject("roMessagePort")
screen = CreateObject("roSpringboardScreen")
screen.SetMessagePort(port)
screen.SetDescriptionStyle("audio")

screen.SetStaticRatingEnabled(false)
screen.SetProgressIndicatorEnabled(true)
screen.AllowUpdates(true)
screen.AllowNavRight(true)
screen.AllowNavLeft(true)
screen.AllowNavRewind(true)
screen.AllowNavFastForward(true)

screen.ClearButtons()
screen.AddButton(2, "Pause")
screen.AddButton(3, "Resume")
screen.AddButton(5, "Next Song")

audioPlayer = CreateObject("roAudioPlayer")
audioPlayer.SetMessagePort(port)

conn = CreateMusicConnection("", "Country")
songs = conn.LoadMusicItems(conn)
audioplayer.SetContentList(songs)
audioplayer.setloop(false)

screen.Show()
audioplayer.SetNext(rnd(songs.Count()) - 1)
audioPlayer.play()

screen.setProgressIndicator(15, 60)

while true
msg = wait(1, port)
0 Kudos
belltown
Roku Guru

Re: roSpringboardScreen no progress bar

Try adding:


screen.SetContent({ContentType: "audio"})
0 Kudos
SkipFire
Visitor

Re: roSpringboardScreen no progress bar

No change, and every content item going to the springboard has ContentType = "audio" anyway, without that I wouldn't see the artist and album labels.
0 Kudos
belltown
Roku Guru

Re: roSpringboardScreen no progress bar

Are you sure you're looking in the right place for the progress bar? The roSpringboard documentation in the Component Reference shows a progress bar at the bottom center of the screen below the artist and album name. However, that's not correct. It appears along the bottom edge of the album artwork. It can be easy to miss if you're looking for it at the bottom of the screen.

"SkipFire" wrote:
No change, and every content item going to the springboard has ContentType = "audio" anyway, without that I wouldn't see the artist and album labels.

In the code you listed I didn't see where you were setting the ContentType in the springboard. I'm sure you're setting the content meta-data for the roAudioPlayer object, but it needs to be set for the Springboard as well.
0 Kudos
SkipFire
Visitor

Re: roSpringboardScreen no progress bar

I use the same object for both the springboard and the audioplayer (figured it was easier than different objects). You are correct I was looking for it on the bottom where the documentation says, but I don't see one under the poster either. Below is the code I use for populating the object that I use on both the audioplayer and the springboard.

item = CreateObject("roAssociativeArray")
item.ContentId = validstr(cItem.contentId.GetText())
item.Title = validstr(cItem.title.GetText())
item.url = validstr(cItem.streamUrl.GetText())
item.artist = validstr(cItem.artist.GetText())
item.album = validstr(cItem.album.GetText())
item.format = validstr(cItem.streamFormat.GetText())
item.medialocation = validstr(cItem.title.GetText())
item.ContentType = "audio"
item.HDPosterUrl = validstr(cItem@hdImg)
item.SDPosterUrl = validstr(cItem@sdImg)
itemCount = itemCount + 1
items.Push(item)
0 Kudos
SkipFire
Visitor

Re: roSpringboardScreen no progress bar

Ok, I changed it set the content type via the xml file like the other fields are and now it is showing, so all I need to do now is figure out how to do the updating of the progress bar.

Thanks belltown.
0 Kudos