Forum Discussion

cheungj's avatar
cheungj
Visitor
12 years ago

Custom Protocol Handling

Is there a way to handle custom protocol's in Roku. Essentially what I am looking for is a way for to intercept a URL within the m3u8 request and have it perform an action when Roku encounters that URI.

3 Replies

  • It's not entirely clear what you're wanting to do, but you could possibly set up an roSystemLog and listen for the http.connect event for the specific URI you want to react to.
  • Sorry essentially we have a HLS encrypted string but the encrypted key location is defined by a custom URL scheme. so when the player intercepts the encrypted stream and see's the custom url it processes it and uses the resulting key to play the Encrypted HLS Stream.
  • If you are able to read the .m3u8 as a text file, assuming it is not encrypted or that you can somehow decrypt it, then you should be able to look at what is in it. You could use roUrlTransfer:

    function getline(url_to_get as string) as string
    xfer=createobject("roURLTransfer")
    xfer.seturl(url_to_get)
    result=xfer.gettostring()
    result=result.tokenize(chr(10))
    For each line in result
    if instr(line,"string value") > 0 then return line
    end for
    return ""
    end function