Forum Discussion

NewIrelandTV's avatar
NewIrelandTV
Reel Rookie
3 years ago

Novice developer: Can't get past Load Screen on sideloaded channel

Hi,

I followed along with this YouTube tutorial and wrote up all the .brs and .xml files by hand, with some minor adjustments (comments, and RSS feed URL etc)

I have sucessfully sideloaded it onto a roku device, however it is not advancing past the Load screen. My Splash Screen shows for a fraction of a second, and then the string that I had put in MainScene.xml is visible, along with the correct hexidecimal colour for the background.

        <Label
            id="loadingIndicator"
            text="Loading. Please Wait"
            width="1280"
            height="720"
            translation="[0,0]"
            horizAlign="center"
            vertAlign="center"
            visible="false"
            font="font:MediumBoldSystemFont"
        />

However, the app is not advancing past this. I have checked MainScene.brs and Main.brs for typos etc, and sideloaded the updated files, but it's still remaining on this screen.

I want to see if my feed can show up correctly, as I am trying to enable the RAF in order to monetise. I have a feed working correctly with a Direct Publisher Channel, but the ad server I am engaged with needs it to be an SDK channel.

Here is the code I have for components > tasks > MainLoadertask.brs

sub Init()
    m.top.functionName = "GetContent"
end sub

sub GetContent()
    xfer = CreateObject("roURLTransfer")
    xfer.SetCertificatesFile("common:/certs/ca-bundle.crt")
    xfer.SetURL("https://vimeo.com/showcase/8111312/feed/roku/4a6071e726")
    rsp = xfer.GetToString()
    rootChildren = []
    rows = {}

    ' parses the feed to build content tree
    json = ParseJson(rsp)
    if json <> invalid
        for each category in json
            value = json.Lookup(category)
            if Type(value) = "roArray"
                if category <> "series"
                    row = {}
                    row.title = category
                    row.children = []
                    for each item in value
                        itemData = GetItemData(item)
                        row.children.Push(itemData)
                    end for
                    rootChildren.Push(row)
                end if
            end if
        end for
        contentNode = CreateObject("roSGNode", "ContentNode")
        contentNode.Update({
            children: rootChildren
        }, true)
        m.top.content = currentNode
    end if
end sub

function GetItemData(video as Object) as Object
    item = {} ' populates standard metadata on screen
    if video.longDescription <> invalid
        item.description = video.longDescription
    else
        item.description = video.shortDescription
    end if
    item.hdPosterURL = video.thumbnail
    item.title = video.title
    item.releaseDate = video.releaseDate
    item.id = video.id
    if video.content <> invalid
        item.length = video.content.duration
    end if
    return item
end function

Thanks in advance.

2 Replies