2

In brightscript, roVideoPlayer will have been depreciated from 2019. Is there any alternate for playing streaming videos? I have tried Video as a component but I only see a blank and black screen.

ganka
  • 191
  • 1
  • 11
  • Using the video node is correct, but please show both how you used it and the error to get help w/ the second part of your question. – Jess Bowers Feb 02 '18 at 21:13

2 Answers2

1

According to the Roku blog post "Sunsetting the legacy Roku SDK visual screens", all Roku SDK visual screen and associated event components will be deprecated soon. All further development should be transitioned to use new user interface programming API Roku SceneGraph, the ways to transition your app are described in the blog post as well. New API provides a Video node to work with video.

Sample SceneGraph XML Markup:

<Video
  id="videoNode"
  height="480"
  width="640"
/>

BrightScript code to add content to the Video node:

videoContent = createObject("roSGNode", "ContentNode")
videoContent.url = "http://sample/video/url"
videoContent.title = "Sample Video"

m.videoNode = m.top.findNode("videoNode")
m.videoNode.content = videoContent
m.videoNode.control = "play"
Michael Radionov
  • 12,859
  • 1
  • 55
  • 72
  • Thanks for your reply. Could you please share any sample code? Because I have tried a streaming url with video component but It does not render the video (not even start buffering) – ganka Jan 10 '18 at 04:42
  • @ganka I am just starting to learn the Roku platform, so unfortunately I don't have any knowledge of it yet. I've noticed your question and information about deprecation as well, so decided to find out what to do with these deprecations. As soon as I get to know how to work with video I'll try updating my answer to include appropriate code sample. Roku itself has a section in the docs with samples, I believe you'll be able to find something in there: [Media SceneGraph Samples](https://sdkdocs.roku.com/display/sdkdoc/Media+Playback+Markup#MediaPlaybackMarkup-VideoMarkup) – Michael Radionov Jan 10 '18 at 08:19
0

If you want to develop a Roku Application, then Scene Graph is the Only Option now.

In Scene Graph Application, to play a video you have to use the "Video Node" only.

You can refer the sample code https://github.com/rokudev/simple-videoplayer-channel to play the video and make sure you specify the correct parameters according to your media file, e.g. Stream format etc.

For all details regarding this component you can refer the documentation https://sdkdocs.roku.com/display/sdkdoc/Video https://sdkdocs.roku.com/display/sdkdoc/Content+Meta-Data

Abhishek
  • 3,304
  • 4
  • 30
  • 44