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

Re: Beta Scene Graph Components

When I extend Video Node, I don't want my extended node to process any key pressings but "play", but when I write onKeyEvent() for my extended node -- this function isn't called at all, even if I just write this:


function onKeyEvent(key as string, press as boolean) as boolean
print key
print press
return false
end function


it prints nothing and handles every key pressing for me. What can I do to fix it?
0 Kudos
BCVatOVG
Visitor

Re: Beta Scene Graph Components

"sudo97" wrote:
When I extend Video Node, I don't want my extended node to process any key pressings but "play", but when I write onKeyEvent() for my extended node -- this function isn't called at all, even if I just write this:


That is because you are returning false.

https://sdkdocs.roku.com/pages/viewpage ... Id=1608547

The onKeyEvent() function must return true if the XML component handled the event, or false if it did not handle the event. Returning false allows the event to continue bubbling up the focus chain so that ancestors of the XML component can handle the event.
0 Kudos

Re: Beta Scene Graph Components

After upgrading to the last firmware I'm having another strange problem . I'm setting an interface field to be an associative array. In the brightscript thread I can see my whole object, (it's an object that contains key, value pairs for strings and for booleans), but when I try to see it in the scene graph script

BrightScript Debugger> ? m.top.data.localStationData
<Component: roAssociativeArray> =
{

This is all that I get, roku as well as the debugger freezes. I am 100 % that my associative array contains some data (key, value pairs) . What can cause this problem and why I am not seeing the whole output ? Even if the associative array would be empty I should still see <Component: roAssociativeArray> = {}, right ?
0 Kudos

Re: Beta Scene Graph Components

I have a component that extends the row list component.I'm using this component in many places. The attributes are set in the init function, and i was overriding them in the brightscript thread which worked fine until firmware version 7.2.0 build 144-04 was installed on my device. Now it seems that i can't change the row list attributes after they have been set in the init function.

For example in the brightscript thread if i make something like this . . . grid = mainScene.createChild("myComponent") - where myComponent extends rowlist
grid.rowHeights = getRowHeights()
grid.rowItemHeight = getRowItemSize()
I should be able to change the attributes, right ? This worked fine prior to the mentioned firmware version. Can you help me out with this ?
0 Kudos

Re: Beta Scene Graph Components

printing row item size
<Component: roArray> =
[
264
110
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
264
149
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
165
247
]
<Component: roArray> =
[
264
149
]

BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.


Current Function:
035:
036: rowHeights = getRowDimensions(m.top.data.response, false , m.rowGridConfig.ROW_MENU_ITEM_SIZE[1])
037: rowItemSize = getRowDimensions(m.top.data.response, true , m.rowGridConfig.ROW_MENU_ITEM_SIZE)
038:
039: print "printing row item size"
040: for each item in rowItemSize
041: print item
042: end for
043:* stop
044: m.top.rowItemSize = rowItemSize
045: m.top.rowHeights = rowHeights
046:
047:
STOP (runtime error &hf7) in pkg:/components/RowList/RowList.brs(43)
043: stop
Backtrace:
#0 Function populaterowlist() As Dynamic
file/line: pkg:/components/RowList/RowList.brs(44)
Local Variables:
global rotINTERFACE:ifGlobal
m roAssociativeArray refcnt=3 count:3
rowheights roArray refcnt=1 count:9
rowitemsize roArray refcnt=1 count:9
item roArray refcnt=6 count:2

BrightScript Debugger> ? type (rowItemSize)
roArray

BrightScript Debugger> s
044: m.top.rowItemSize = rowItemSize
=================================================================
Warning occurred while setting a field of an RoSGNode
-- Type mismatch occurred when setting the "rowitemsize" field of a "rowListGrid" node
at line 44 of file pkg:/components/RowList/RowList.brs
=================================================================


If I continue with the debugger the device will reboots itself 😞

BrightScript Debugger> ........What happened with the rowItemSize attribute? What's the problem ... What am i doing wrong ? :evil: :evil: :evil:
0 Kudos
RokuJoel
Binge Watcher

Re: Beta Scene Graph Components

@dacian_roman23 - What firmware version and build +(and what device model number) are you testing on ?

- Joel
0 Kudos

Re: Beta Scene Graph Components

Hi Joel ..

The firmware version is 7.2.0 build 4065-04, and the model is 4210X - Roku 2
0 Kudos
RokuJoel
Binge Watcher

Re: Beta Scene Graph Components

Hi Dacian, the issue should be fixed in the next build-release. No idea when that will happen, but hopefully soon.

- Joel
0 Kudos
adamkaz
Channel Surfer

Re: Beta Scene Graph Components

BUG REPORT
I've noticed some weird things when working with a partial screen video and with video transitions to roku billing. Device is an Insignia Roku TV:

1) The bufferingbar and retrievingbar are either hidden or are displayed in the location where they would be for a full screen video (on top of my other components). This is annoying.

2) When i hide the screen containing this preview video, to get a user's partial billing info, instead of flashing black between screens like it typically does, it flashes black except for a still frame of the video (in the position where the video was). This looks fairly janky. I've also tested with a full screen video - same result.

3) MOST TROUBLING: the same video still frame will still show up in transitions between screens of production applications. It seems that one of Roku's biggest concerns with the SDK is crossover between applications - somehow the video still frame is not getting removed from the buffer memory. It stays this way until I restart the device. One example is Pandora. Upon launching it, I see the pandora splash screen, then where it usually flashes black for a split second, i instead see a flash of the stillframe from my video.

Is there some workaround to force delete this image? I'd like to use a partial screen video for a production app.

Here is the general setup of my screen (I added my own "loading" message since the normal one is not displayed on the partial video):

<children>
<Group
id="VideoGroup"
translation="[740, 100]"
>
<Video
id="VideoPlayer"
width="1110"
height="624"
/>
<Label
id="VideoLabel"
height="624"
width="1110"
text = "Loading..."
horizAlign = "center"
vertAlign = "center"
/>
</Group>
</children>
0 Kudos

Re: Beta Scene Graph Components

Any news for the fixes in the 7.2 release ?
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.