-1

Not sure how Roku and Brightscript actually works. I need to call a script file just before the channel starts to stream. The script file will convert the stream on fly. I asked how to do this in Roku forum and was told to use urlTransfer. Well, the sdk gives little help that I can see when explaining how to. I ran across this post on stackoverflow: How to make api request to some server in roku

It gives a good example which I think I understand. My confusion comes in where and how the function is called. It has to happen right before the video url is called so the conversion can start. Any advice appreciated.

Community
  • 1
  • 1

1 Answers1

2

If you are using roVideoPlayer then just before you call the play function and if you are using roVideoScreen then just before the show function.

Example snippet:

roVideoPlayer
player=CreateObject('roVideoPlayer')
* Your code to add content for the player
* Your call to script
player.play()

roVideoScreen
player=CreateObject('roVideoScreen')
* Your code to add content for the player
* Your call to script
player.show()

Hope this helps

  • hello, it is possible in Roku to switching a screen means one screen button click to navigate another screen. – Nikunj Chaklasiya Jun 27 '19 at 10:41
  • Roku uses SceneGraph concepts, which is different than the older sdk used back around 2012. In ScenGraph Concepts, different screnes are managed through components ( use of Group, LayoutGroup etc) and then ordering them in z-index or changing the components visibility. Check this link https://developer.roku.com/en-gb/docs/developer-program/core-concepts/controlling-screen-program-flow.md an the example's in the same page. The example should help you understand the concept. – Paras Nath Chaudhary Nov 12 '19 at 15:29