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: 
pradeeptv
Visitor

how to load images from url for roPosterScreen

I am new to bright script platform. This is my code. Can anyone give me the code to load images from the urls...
My image url is below
https://zts.verizon.net/previews/hls/mu ... 2_bc_1.jpg)

Function poster(response as string)

port = CreateObject("roMessagePort")
poster = CreateObject("roPosterScreen")
poster.SetBreadcrumbText("[location1]", "[location2]")

poster.SetMessagePort(port)
list = CreateObject("roArray", 10, true)
for i = 0 to 9
o = CreateObject("roAssociativeArray")
'print element.ProductType
'print type(element.ProductType)
o.ContentType = "episode"
o.Title = "[Title]"
o.ShortDescriptionLine1 = "[ShortDescriptionLine1]"
o.ShortDescriptionLine2 = "[ShortDescriptionLine2]"
o.Description = ""
o.Description = "[Description] "
o.Rating = "NR"
o.StarRating = "75"
o.ReleaseDate = "[<mm/dd/yyyy]"
o.Length = 5400
o.Categories = []
o.Categories.Push("[Category1]")
o.Categories.Push("[Category2]")
o.Categories.Push("[Category3]")
o.Actors = []
o.Actors.Push("[Actor1]")
o.Actors.Push("[Actor2]")
o.Actors.Push("[Actor3]")
o.Director = "[Director]"
list.Push(o)
end for
poster.SetContentList(list)
poster.Show()
while true
msg = wait(0, port)
if msg.isScreenClosed() then
return -1
else if msg.isButtonPressed()
print "msg: ";msg.GetMessage();"idx: ";msg.GetIndex();
end if
end while
end function

0 Kudos
1 REPLY 1
RokuJoel
Binge Watcher

Re: how to load images from url for roPosterScreen

Try inserting something like this after the o.shortdescriptionline2= line


o.HdPosterURL="http://myserver.com/images/imageHD.jpg"
o.SDPosterURL="http://myserver.com/images/imageSD.jpg"



- Joel
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.