Your Digital Media Has Never Looked So Good

 
jseigle85
Topic Author
Posts: 32
Joined: Tue Apr 26, 2011 8:02 pm

Content in a roVideoScreen

Sat May 14, 2011 7:14 pm

I need help understand this code
screen.SetContent({
        Title: "My Video"
        StreamFormat: "hls"
        Stream: { URL: "http://ec2-184-72-239-149.compute-1.amazonaws.com:1935/demos/smil:bigbuckbunnyiphone.smil/playlist.m3u8"}
    })
    screen.Show()


Can you explain what the brackets are for in this code example Why not use one bracket:
screen.SetContent[color=#FF0000]([/color]
        Title: "My Video"
        StreamFormat: "hls"
        Stream: { URL: "http://ec2-184-72-239-149.compute-1.amazonaws.com:1935/demos/smil:bigbuckbunnyiphone.smil/playlist.m3u8"}
    [color=#FF0000])[/color]


Why do we need all of these brackets:

screen.SetContent[color=#FF0000]({[/color]
        Title: "My Video"
        StreamFormat: "hls"
        Stream: [color=#BF0000]{[/color] URL: "http://ec2-184-72-239-149.compute-1.amazonaws.com:1935/demos/smil:bigbuckbunnyiphone.smil/playlist.m3u8"[color=#BF0000]}[/color]
    [color=#FF0000]})[/color]
 
jbrave
Posts: 716
Joined: Mon Mar 22, 2010 3:00 pm
Location: Ben Lomond, CA
Contact:

Re: Content in a roVideoScreen

Mon May 16, 2011 1:01 am

square brackets indicate an array:

x=["test","west","best"]

?x[1]

>west

Curly brackets indicate an RoAssociativeArray:

x={dog:"animal",zucchini:"vegtable",quartz:"mineral"}

?x.zucchini

>vegtable

I could be wrong, but I think the code you posted has some extra brackets that are from an attempt to colorize the code when you posted it, this makes the code almost unreadable, don't try to colorize code you post on the forum, just copy, paste, highlight and click "code" button before posting.

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!

Who is online

Users browsing this forum: No registered users and 5 guests