Forum Discussion

1 Reply

  • my sample code

    <?xml version = "1.0" encoding = "utf-8" ?>

    <!--********** Copyright 2016 Roku Corp.  All Rights Reserved. **********-->

    <component name = "facade" extends = "Scene">
    <script type="text/brightscript" >
          <![CDATA[
          sub init()
            m.top.setFocus(true)
            setVideo()
          end sub

          function setVideo() as void
            videoContent = createObject("RoSGNode", "ContentNode")
            videoContent.url = "http://yt-dash-mse-test.commondatastorage.googleapis.com/media/motion-20120802-manifest.mpd"
            videoContent.title = ""
            videoContent.streamformat = "dash"
            videoContent.SubtitleUrl = "pkg:/ttml/ttml.xml"

            m.video = m.top.findNode("musicvideos")
            m.video.content = videoContent
            m.video.control = "play"
            m.video.setFocus(true)
          end function
          ]]>
    </script>
      <children >
          <Video
            id="musicvideos"
            width="1920"
            height="1080"
            translation="[0,0]"
            enableUI="true"
          />
      </children>
    </component>