Forum Discussion

SkipFire's avatar
SkipFire
Visitor
13 years ago

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.

9 Replies

  • 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.
  • 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)
  • 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.
  • 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.
  • 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)
  • 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.