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: 
bwaltersTCV
Channel Surfer

Deeplinking for Live Stream channel

Greetings all --

I am working on an update to our existing channel.  Since our last published channel Roku has added the requirement of deep linking.  This is my last obstacle to certification for the update.

 

Our channel is simple.  It loads one scene that has an option to play our live stream.  That's pretty much it.  The only thing we have is the one live stream.  

I understand deep linking and it purpose.  But I am at a loss as to how to implement it.  I see in the requirements that live streams are exempt, but I want to make sure I am doing everything right before I go to partner success with this issue.

I have found info to add to the main.brs file but I am not sure how to proceed with how to handle the deeplinking args from my home scene.  Below is the code from my main.brs...

 

' first thing that happens in a channel'
sub main(args as Dynamic)
    msgPort = CreateObject("roMessagePort")
    input = CreateObject("roInput")
    input.SetMessagePort(msgPort)
    
    screen = CreateObject("roSGScreen")
    m.port = CreateObject("roMessagePort")
    screen.setMessagePort(m.port)
    scene = screen.CreateScene("TCVLiveStream")
    scene.signalBeacon("AppLaunchComplete")
    screen.show()


    while(true)
        msg = wait(0, m.port)
        msgType = type(msg)
        if msgType = "roSGScreenEvent"
            if msg.isScreenClosed() then return
        end if
        if msgType = "roInputEvent"
            info = msg.getInfo()
            'info is now just like args passed to your Main() method
            'it contains mediaType and contentId properties, so you
            'can use your normal deep-link handling code
            getDeepLink(info)
        end if
    end while
end sub


Function getDeepLinks(args) as Object
    deeplink = Invalid

    if args.contentid <> Invalid and args.mediaType <> Invalid
        deeplink = {
            id: args.contentId
            type: args.mediaType
        }
    end if

    return deeplink
end Function

Again, not sure where to go from here because our only stream is a live stream and not sure how to get the contentID or how to handle the deep link args.

Any help is appreciated.

0 Kudos
2 REPLIES 2
saidd
Newbie

Re: Deeplinking for Live Stream channel

hello can you resolve the issue i having the same problem 

0 Kudos
bwaltersTCV
Channel Surfer

Re: Deeplinking for Live Stream channel

My channel is very simple and only had one live stream. Live streams are exempt from deep linking requirements. Once you submit for approval email partner success and explain what you are doing. They can help get the approval completed. 

0 Kudos