Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

roSlideShow is buggy with TextOverlay

All,

I am attempting to use the "roSlideShow" object and it appears to be broken if I make the overlay visible.

It displays the first picture, but never changes. I can manually change it using the arrow keys on the remote. If I disable the overlay it operates normally. Additionally, the "isPlaybackPosition" message is generated constantly at a rate of about 10 per second with an index of the current picture.

FUNCTION Main() AS VOID
port = CreateObject("roMessagePort")
ui = CreateObject("roSlideShow")
ui.SetMessagePort(port)

ui.SetContentList([
{
url: "http://www.rkeene.org/tmp/image0.jpg"
TextOverlayBody: "BODY0"
TextOverlayUL: "UL0"
TextOverlayUR: "UR0"
}, {
url: "http://www.rkeene.org/tmp/image1.jpg"
TextOverlayBody: "BODY1"
TextOverlayUL: "UL1"
TextOverlayUR: "UR1"
}, {
url: "http://www.rkeene.org/tmp/image2.jpg"
TextOverlayBody: "BODY2"
TextOverlayUL: "UL2"
TextOverlayUR: "UR2"
}
])

ui.SetTextOverlayIsVisible(true)
ui.SetPeriod(10)
ui.Show()

WHILE true
msg = WAIT(0, port)

IF msg.isScreenClosed() THEN
RETURN
END IF

IF msg.isPlaybackPosition() THEN
PRINT "Got isPlaybackPosition message for "; msg.GetIndex()
END IF
END WHILE
END FUNCTION


The output is:

------ Running ------
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0
Got isPlaybackPosition message for 0


for about 1 second of runtime.

Is there some way to work around this bug ?
0 Kudos
7 Replies
Level 9

Re: roSlideShow is buggy with TextOverlay

I don't know if it'll help here, but try setting the content list last. Generally speaking, it's usually best to set all of the screen options prior to setting the content.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Level 7

Re: roSlideShow is buggy with TextOverlay

TheEndless,

Thanks for the suggestion, but unfortunately it had no effect.

Thanks,
Roy Keene
0 Kudos
Roku Employee
Roku Employee

Re: roSlideShow is buggy with TextOverlay

Instead of SetTextOverlayIsVisible(), try using SetTextOverlayHoldTime()

ui.SetTextOverlayHoldTime(10000)
ui.SetPeriod(10)
0 Kudos
Level 7

Re: roSlideShow is buggy with TextOverlay

RokuChris,

Thanks for this workaround, but it breaks down in a few ways:
1. If the user pauses the slideshow the overlay disappears (clearly this can be compensated for by increasing the timeout)
2. There appears to be no way to hide the overlay after a remote key is pressed, and then to immediately display it again when a remote key is pressed (i.e., toggle the overlay visibility with a remote key). I can make it hide immediately by setting the hold time to "0" and then setting the visibility to "false", but obviously making it visible again is problematic because I can't set the visibility to "true" or I hit this bug
0 Kudos
Level 7

Re: roSlideShow is buggy with TextOverlay

Here is the updated code with the workaround and the remote key to toggle the overlay. I'm only able to make the "hiding" portion work with this workaround.

FUNCTION Main() AS VOID
port = CreateObject("roMessagePort")
ui = CreateObject("roSlideShow")
ui.SetMessagePort(port)

ui.SetPeriod(10)
overlay_visible = false

ui.SetContentList([
{
url: "http://www.rkeene.org/tmp/image0.jpg"
TextOverlayBody: "BODY0"
TextOverlayUL: "UL0"
TextOverlayUR: "UR0"
}, {
url: "http://www.rkeene.org/tmp/image1.jpg"
TextOverlayBody: "BODY1"
TextOverlayUL: "UL1"
TextOverlayUR: "UR1"
}, {
url: "http://www.rkeene.org/tmp/image2.jpg"
TextOverlayBody: "BODY2"
TextOverlayUL: "UL2"
TextOverlayUR: "UR2"
}
])

ui.Show()
WHILE true
msg = WAIT(0, port)

IF msg.isScreenClosed() THEN
RETURN
END IF

IF msg.isPlaybackPosition() THEN
PRINT "Got isPlaybackPosition message for "; msg.GetIndex()
END IF

IF msg.isRemoteKeyPressed() THEN
IF msg.GetIndex() = 3 THEN
IF overlay_visible THEN
overlay_visible = false
ELSE
overlay_visible = true
END IF

IF overlay_visible THEN
PRINT "Making overlay visible"
ui.SetTextOverlayHoldTime(0)
ui.SetTextOverlayIsVisible(true)
ui.SetTextOverlayIsVisible(false)
ui.SetTextOverlayHoldTime(10000)
ELSE
PRINT "Making overlay invisible"
ui.SetTextOverlayHoldTime(0)
ui.SetTextOverlayIsVisible(true)
ui.SetTextOverlayIsVisible(false)
END IF
END IF
END IF
END WHILE
END FUNCTION
0 Kudos
Level 7

Re: roSlideShow is buggy with TextOverlay

Does anyone know if the roSlideShow component ever worked ?

How are others working around this component's failures ?
0 Kudos
Level 10

Re: roSlideShow is buggy with TextOverlay

I'm not sure if it ever worked, but it has been broken for years in various ways (losing image counts, displaying wrong images, inaccurate timing delays, poor buffering, etc etc)
How to work around it? Create your own slideshow using roImageCanvas or roScreen.
The ability to display slides is nothing compared to the power of the Roku (streaming videos) so I can understand how the slideshow is possibly the lowest priority for them to work on.
0 Kudos