Search code examples
youtuberokubrightscript

How can i Open my "Youtube channel link" from my roku channel?


I searched and couldn't find more than just opening youtube app from my channel but i want to open "Myname youtube channel" link from My roku channel here is link for opening another channels from own .

below is code for opening only app . so i need something like meta data to pass into the below code, so youtube should open direct my youtube channel not youtube Home page. Thanks in Advance.

    create roDeviceInfo, call GetIPAddrs() to determine IP of the box

    create roUrlTransfer, call setURL("http://"+IP+":8060/launch/33739"), 
    then say PostFromString()

Solution

  • appID = 837
    ipAddrs = CreateObject("roDeviceInfo").GetIPAddrs()
    if ipAddrs.eth0 <> invalid
        url = "http://"+ ipAddrs.eth0++":8060/launch/"+appID
    else
        url = "http://"+ ipAddrs.eth1+":8060/launch/"+appID
    end if
    
    request = CreateObject("roUrlTransfer")
    request.SetUrl(url)
    request.AsyncPostFromString(url)
    urlEvent = request.head()