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: 
philotas
Level 9

Reuse Video Node?

Is it ok tu reuse one Video node in SceneGraph for all videos being played back in a channel or should it be recreated for every video?
I am talking about mixed content here progressive mp4 and HLS videos.

Maybe this is cleaner cause it cleans some caches or whatever.
0 Kudos
6 REPLIES 6
joetesta
Level 11

Re: Reuse Video Node?

Yes I believe it's preferred to reuse the same video node.
aspiring
0 Kudos
EnTerr
Level 11

Re: Reuse Video Node?

i'd be inclined to use different Video node every time (with the clarification that no more than 1 can go at a time). Based on my experience with other components (roNDK?) being throw-away items, it feels to me more "sanitary" with disposables...
0 Kudos
joetesta
Level 11

Re: Reuse Video Node?

I guess it's up to the individual developer.  In the SDK2 work the team I'm on has done, we created only one and reused it.
aspiring
0 Kudos
belltown
Level 9

Re: Reuse Video Node?

So far, I haven't run into problems re-using nodes, even animations. I don't know what the "official" Roku position is, just what's been working for me.
https://github.com/belltown/
0 Kudos
philotas
Level 9

Re: Reuse Video Node?

ok, will keep on using my single video node then.
EDIT: thanks for the quick feedback
0 Kudos
norcaljohnny
Level 11

Re: Reuse Video Node?

Do what feels right for you. Sometimes global functions/functionality work well and at other times, you simply need more than one video node..a trailer for instance at a different size from the full screen video node. I think what is really important, is write clean codes that can easily be read when adding code or passing it on. Cheers!
0 Kudos