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: 
Highlighted

Detecting if the Closed Caption Menu is Opened

Hi everyone,

I'm dealing with an issue that affects lower end Rokus only (I can reproduce on a Roku Stick), and the Closed Caption dialog in a Video Component.

Scenario:
1) Video Playback starts.
2) Show the closed captions dialog
3) Press Back.

Expected: Closed Caption Dialog is dismissed and playback continues.  This occurs on Roku Premiere+ as we don't get the back key press when the options menu is opened.
Actual: We get a back key press and we exit the player.

I'm trying to find a way to ignore the back key press if the CC options dialog is visible, but so far I've been unsuccessful at finding a way to know that the dialog is opened.
I've tried looking at these options:
1) I tried to listen for key events to see if I could detect the options key press, but to no avail. I only get an options key event when closing the menu, not when the menu gets opened.
2) I tried to look for a dialog option to see if it exists or not, but I couldn't find any options on the video component: https://sdkdocs.roku.com/display/sdkdoc/Video

Is there a way to know that this dialog is open? I can't find obvious ways to make it work.
0 Kudos
3 Replies
Highlighted
Level 7

Re: Detecting if the Closed Caption Menu is Opened

Hello, Im having the same issue, were you able to fix this?

0 Kudos
Highlighted
Level 10

Re: Detecting if the Closed Caption Menu is Opened

https://developer.roku.com/docs/references/brightscript/events/rodeviceinfoevent.md

 

You can read rodeviceinfoevent and use the appFocus field within GetInfo().

 

appFocusBoolean

It is set to False when the System Overlay takes focus and True when the channel regains focus

 

 

That is what is called a "System Overlay". Smiley Happy

Highlighted
Level 10

Re: Detecting if the Closed Caption Menu is Opened

And for custom dialogs you could just listen to "wasClosed"

dialog.observeField("wasClosed", "dialogWasClosed").

And do what u intended to!

0 Kudos