Hello All, I'm brand new to developing for Roku, and I've been messing around with some examples trying to get the hang of everything. I've managed to get an app working that parses a json file from a site, and populates a row with thumbnails and info for live streaming content. My problem is the site does not include direct links to play the live video, instead it has links to user pages that contain the live video, and a chatroom. Unless I'm mistaken, I should be able to use GetToString() to fetch the source code from the page and then Match the correct link using regex correct?
So this is what I have, and it doesn't seem to work. I've successfully tested my regex outside of the roku app and it worked, but it does not work in this example. It's supposed to match a link starting with http and ending in m3u8 Any ideas that could point me in the correct direction?
Function PlayVideo(video as object, json as boolean) as integer
videoScreen = CreateObject("roVideoScreen")
port = CreateObject("roMessagePort")
videoScreen.SetMessagePort( port )
url = createObject("roURLTransfer")
url.SetUrl("http://mysite.com/"+video.username)
print url.GetUrl()
pre = url.GetToString()
test = CreateObject("roRegex","\bhttps://[.0-9A-Za-z-]+\.[A-Za-z]{2,63}+(?:/[]!#$%&'()*+,.0-9:;<=>?@A-Z[\\_`a-z{|}~^-]+){2}/[.0-9A-Z_a-z-]+\.m3u8","")
streamurl = test.Match(pre)
print streamurl