Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
theflamelord
Visitor

How to turn this code into a channel?

So i have the code, but i need to know how i convert the text to a package to upload to my roku dev account
Sub Main()
port=CreateObject("roMessagePort")
screen=CreateObject("roVideoScreen")
screen.SetMessagePort(port)

z=CreateObject("roAssociativeArray")
z.Title="Live Feed"
z.ContentType="episode"
z.ContentQuality="SD"
z.StreamFormat="hls"
z.StreamQualities=[]
z.StreamQualities.Push("SD")
z.StreamBitrates=[]
z.StreamBitrates.Push("0")
z.StreamUrls=[]
z.StreamUrls.Push("http://livestre.am/17lu4") 'stream url

screen.SetContent(z)
screen.Show()
While TRUE
msg=Wait(0,port)
If Type(msg)="roVideoScreenEvent"
If msg.isRequestFailed()
Print"MSG = ";msg.getMessage()
Print"INDEX = ";msg.GetIndex()
Print"TYPE = ";msg.GetType()
Print"DATA = ";msg.GetData()
Print"INFO = ";msg.GetInfo()
Else If msg.isStatusMessage()
Print"Video status: ";msg.GetIndex();" ";msg.GetData()
Else If msg.isButtonPressed()
Print"Button pressed: ";msg.GetIndex();" ";msg.GetData()
Else If msg.isScreenClosed()
Exit While
Else
Print"Unexpected event type: ";msg.GetType()
End If
Else
Print"Unexpected message class: ";Type(msg)
End If
End While
End Sub

Any help would be greatly appreciated.
0 Kudos
1 REPLY 1
Anonymous
Visitor

Re: How to turn this code into a channel?

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.