Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Beta Documentation

The contents of this page are subject to change

Playing any type of video requires just one Scene Graph node class: Video.

For the most basic video playback, you only need to set the URL and StreamFormat field values in a ContentNode node, assign the ContentNode node to the content field of the Video node, then set the Video node control field value to play to start the video. For example:

videoContent = createObject("RoSGNode", "ContentNode")
videoContent.url = "video_URI"
videoContent.streamformat = "hls"
m.video = m.top.findNode("video_node_ID")
m.video.content = videoContent
m.video.control = "play"

For more advanced video playback (for example, incorporating "trick play" DVD-like scene indexing functionality), there are fields in the Video node and the associated ContentNode node to provide this functionality.

Adding closed caption support is a simple matter of configuring the subtitleconfig video node content element.  See SceneGraphCaptionsDemo.zip for an example of using side loaded TTML captions in your channel.

 

  • No labels