Skip to main content
Skip table of contents

SDK Integration Instruction

Theviewpoint requires the following steps to integrate the SDK

  1. Add to the manifest file

    CODE
    bs_libs_required=roku_ads_lib
  2. Add to the scene XML file

    CODE
    <ComponentLibrary id="RAFLibrary" />
    <Group id="videoContainer">
    <Group id="adsContainer"/>
    <Video id="video" />
    </Group>
  3. Add code in the application code

    CODE
    sub RAFLibrary_Init()
        m.RAFLibraryConfig = {
            "partner_id"    : "AA21",
            "app_id"        : "AA21S4301",
            "app_key"       : "f152e5a9-37a6-456a-ae6b-391bacf205e8"
    "library_uri" : "http://tvp.tv/tvp/sdk/v1/roku/lib?partner_id=AA41&app_id=AA41S0101&app_key=2f7d9c3a-30b1-4cb3-b27f-9ed04f0a687b.pkg"
        }
        m.RAFLibrary = m.top.findNode("RAFLibrary")
        m.RAFLibrary.uri = m.RAFLibraryConfig.library_uri
    end sub
    sub RAFLibrary_StartVideoPlayback(videoNode, adParams)
        ' Populating RAF task and starting the video
        RAFLibraryTask = CreateObject("roSGNode", "RAFLibrary:RAFLibrary")
        RAFLibraryTask.video = videoNode
        RAFLibraryTask.libraryParams = m.RAFLibraryConfig
        RAFLibraryTask.adParams = adParams
        RAFLibraryTask.control = "RUN"
    end sub
  4. Call method

    CODE
    RAFLibrary_Init() 
    Bind library to video, add code
    if (m.RAFLibrary.loadStatus = "ready")
    adParams = {
    "placement_id"  : "AA21S4301001",
    "width"         : 1920
    "height"        : 1080
    }
    RAFLibrary_StartVideoPlayback(videoNode, adParams)
    end if

*videoNode - created object publisher’s  video from point 2 structure;

*for channel type - app (dynamic) need to add parameter - app_stor_id;

*example production request url -

CODE
https://tvp.tv/tvp/sdk/v1/roku/request?width=1024&height=768&partner_id=AA00&app_id=AA000000&app_key=f7d0412e-1d0d-419f-949a-ad3e7dd20e8f&deviceid=test&placement_id=AA00S0000000

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.