CaptionStyle

Hi , can you please tell me on how to make changes in closedCaptions by changing the background , text color etc .Have tried using m.videoPlayer.captionStyle={“Text color”:“Yellow”}
but there is no change .

Please suggest what should i do .
Thanks in advance

captionStyle doesn’t exist on roVideoPlayer. It’s part of the Video node which is a Scene Graph type in SDK 2. roVideoPlayer is part of SDK 1 which is deprecated and no longer supported for new channels or channel updates (see https://sdkdocs.roku.com/display/sdkdoc/roVideoPlayer)

Hi ben , but i am talking about video node only , within scenegraph . I used this field stating
m.videoplayer=m.top.findNode(“video”)
m.videoplayer.closedCaptions={“Text Background”:“Yellow”}
I changed different property and value which is given inSDK but no effect on the subtitle . Please let me know the correct parameters to be used to make the changes for the subtitle styling.

Thanks in advance

The property is called captionStyle.

m.videoplayer = m.top.findNode("video")
m.videoplayer.captionStyle["Background color"] = "Yellow"

should tell the caption engine to use a yellow background. Note: this won’t override a user’s choice in the closed caption UI – if they’ve picked green on red, the caption engine will use that settings. This just overrides the defaults. You need to use the exact property names listed on https://sdkdocs.roku.com/display/sdkdoc/Video.

“RokuBen” wrote:
The property is called captionStyle.

m.videoplayer = m.top.findNode("video")
m.videoplayer.captionStyle["Background color"] = "Yellow"

should tell the caption engine to use a yellow background. Note: this won’t override a user’s choice in the closed caption UI – if they’ve picked green on red, the caption engine will use that settings. This just overrides the defaults. You need to use the exact property names listed on https://sdkdocs.roku.com/display/sdkdoc/Video.
Thank you so much ben , you saved me . Thanks a lot

Hi Ben i tried using it , but i got error instead , please can you advise me what wrong i m doing and how to makes things work .
864: SUb availableSubtitleTracks()
865: 'print"m.videoPlayer==>tracks==>"m.videoPlayer.availableSubtitleTracks
866: if m.videoPlayer.availableSubtitleTracks.count()<>0
867: m.subtitle_icon_group.visible=true
868: else
869: m.subtitle_icon_group.visible=false
870: end if
871:
872:* m.videoplayer.captionStyle[“Background color”] = “Yellow”
873: ENd SUb
Invalid value for left-side of expression. (runtime error &he4) in pkg:/componen
ts/baseVideoPLayer/baseVideoPLayer.brs(872)

Thanks in advance

The captionStyle attribute starts as invalid, so you need to assign an associative array to it first to be able to use the syntax I posted.

I also did some debugging on our side, and the attribute names we’ve posted are wrong.  The correct set is

  • Text/Font

  • Text/Effect

  • Text/Size

  • Text/Color

  • Text/Opacity

  • Background/Color

  • Background/Opacity

  • Window/Color

  • Window/Opacity

I’ll ask that the developer docs get updated.  That would make your code now read

m.videoplayer = m.top.findNode("video")
m.videoplayer.captionStyle = { "Background/Color": "Yellow" }

Thanks for persisting with your questions.

Thanks Ben , for the quick answer . It really worked fine .

I have 2 questions , please do help me , atleast provide me an hint . Let me ask you the first question :

In Roku Tv after the new update of 8.0 we have the tv guide , in the UI all the rows moves together with respect to the focus , how is it exactly possible in rowlist , or is it some other component belonging to arrayGrid .

Thanks in advance
Sechin

“SECHIN SUNNY” wrote:
Thanks Ben , for the quick answer . It really worked fine .

I have 2 questions , please do help me , atleast provide me an hint . Let me ask you the first question :

In Roku Tv after the new update of 8.0 we have the tv guide , in the UI all the rows moves together with respect to the focus , how is it exactly possible in rowlist , or is it some other component belonging to arrayGrid .

Thanks in advance
Sechin
Hi ben please reply to this query , give me a hint on how u guys are managing in roku tv the tv guide , how all the rows move together with respect to the row in focus when u change each time section .

That is done with an internal component that’s not published in the Brightscript SDK.

“RokuBen” wrote:
That is done with an internal component that’s not published in the Brightscript SDK.
Can you please suggest me how can i do any hint with the existing components please .

Hi ben ,
How to implement TimeGrid view in roku .
The Roku team has mentioned TimeGrid(EPG) view in 2 places .

https://sdkdocs.roku.com/display/sdkdoc/Static+Analysis+Tool
https://sdkdocs.roku.com/display/sdkdoc/Best+Practices+for+Data+Management

Please let me know Ben , how to make the EPG view .

Thanks In Advance
Sechin

I am not a BrightScript or UI developer, I don’t know how to do this.

Ok i understand , I am sorry ,
But please tell me where can i find information on “TimeGrid” component , you guys have mentioned at 2 places in sdk , and there are many channels which are using them . Tell me how can i get information on “TimeGrid” component . In the sdk i have seen
https://sdkdocs.roku.com/display/sdkdoc … lysis+Tool
Check for usage of the TimeGrid (EPG) component

As this component is allowed on a case by case basis, we are checking for its usage in channels.

Do i need to have a permision from the roku to use this component.

That is an internal component developed for use of some of the MVPD partners who release Roku-based hardware in other regions.

Ben, thanks for your reply , i require an info :
How we can control the volume of a video ,like in youtube the volume is controlled during casting .In a similar way how i can control the volume programmatically.

“SECHIN SUNNY” wrote:
Ben, thanks for your reply , i require an info :
How we can control the volume of a video ,like in youtube the volume is controlled during casting .In a similar way how i can control the volume programmatically.
Hi ben please do let me know what fields or method has to be used

Roku, can you update the Video docs here https://sdkdocs.roku.com/display/sdkdoc/Video#Video-ClosedCaptionFields
to include the correct captionStyle properties listed here: https://forums.roku.com/viewtopic.php?f=34&t=116502&p=594780&hilit=captionstyle#p595085

Might be better to put that request in the current pinned thread at the top of the dev forum.
https://forums.roku.com/viewtopic.php?f=34&t=69731