Brightline ads broken in RAF 2.2 + Scenegraph?

I’m trying to test Brightline interactive ads in SceneGraph. Using RAF 2.0215 in firmware 7.7.0. I am using SSAI.
The ad doesn’t render. I copied the Brightline ad pods from the ServerStitchedAdSDK1Sample.zip app from this page: https://sdkdocs.roku.com/display/sdkdoc/Integrating+the+Roku+Advertising+Framework#IntegratingtheRokuAdvertisingFramework-UseCases
(BTW I remember this example working fine, but sideloading that app now results in a RAF crash since I updated my firmware).
When I run my app with the following data, I see the two fake tracking events but never see a brightline event in the log, nor do I see an ad render.
Here’s the mock ad data I am feeding in to RAF:

[
  {
  duration:30,
  pod_index:0,
  rendersequence:"preroll",
  rendertime:0,
  tracking:[
    {
      adSystems:"fw",
      event:"PodStart",
      time:0,
      url:"http://1-PODTRACK.FAKEURL.COM"
    },
    {
      adSystems:"Auditude",
      event:"PodStart",
      time:0,
      url:"http://2-PODTRACK.FAKEURL.COM"
    }
  ],
  "viewed":false,
  ads:[
      {
        adid:"20234435",
        advertiser:"",
        duration:30,
        rendertime:0,
        streamformat:"hls",
        streams:[],
        companionads: [
          {
            height: 720,
            mimetype: "application/json",
            tracking: [
              {
                event: "Impression",
                time: 0,
                triggered: false,
                url: "http://a.brightline.tv/?track=companion_impression&ad_id=001"
              },
              {
                event: "AcceptInvitation",
                triggered: false,
                url: "http://a.brightline.tv/?track=companion_accept_invitation&ad_id=001"
              }
            ],
            url: "https://a.brightline.tv/?id=ROKU_RAF_1&ver=%%SDK_VER%%&cb=%%CACHEBUSTER%%&mblist=2450X,2500X",
            width: 1280
          }],
        tracking:[
          {
            event:"Impression",
            time:0,
            triggered:false,
            url:"http://1-ADTRACK.FAKEURL.COM"
          },
          {
            event:"Impression",
            time:0,
            triggered:false,
            url:"http://2-ADTRACK.FAKEURL.COM"
          }
        ]
      }
    ]
  }
]

Couple of things - first, i see streams is empty - put there the URL to the (whole) stitched stream. Interactive companion check logic depends on it not being empty.

Your pkg:/components/cpc/tasks/raf.brs(54) line is raf.stitchedAdsInit(), right?
By the nature of the error i am guessing you are passing wrong argument to stitchedAdsInit() - not a roArray and not even an Object. Not sure what it is instead (string? number?), just print it and it’s type on the previous line.

Well, when I provide the array I posted originally, RAF works without errors (but Brightline companions are ignored/notworking). When I add the “streams” info, it throws the error. So something about the streams object is causing RAF to break.

oh boy, never mind, I was being an idiot and passing invalid to stitchedAdsInit.
Now I see more activity in the log, but the Brightline ad does not render on screen.
Do I need to do something else with stitchedAdHandledEvent to make Brightline work?
here’s the log entry:

rafrndr-renderTypeChanged() - server-stitched
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ BRIGHTLINE.TV SG RENDERER for RAF ~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Roku_Ads library version: 2.0215
added child: Rectangle id: 1 subtype: Rectangle

Here’s my event loop:

while m.playing
      msg = wait(0, port)
      curAd = invalid
      curAd = m.raf.stitchedAdHandledEvent(msg, {sgNode:m.videoplayer,port : port})
      '? "RAF cur ad >",curAd
      if curAd <> invalid
        'detect ad exit and nuke loop
        if curAd.adExited
          m.videoplayer.control="STOP"
          m.playing = false
          exit while
        else if curAd.adCompleted
          m.videoplayer.setFocus(true)
        end if
      else if msg.getField()="keypressed" and msg.getData()=0
        m.playing = false
        m.videoplayer.control="STOP"
        exit while
      end if
    end while

Are you playing the stitched stream in a Video node (vs. roVideoPlayer), then it’s native-RSG mode?
Brightline don’t have RSG-native renderer for SSAI in RAF 2.2, only Innovid does.

Well that explains it. I am using Video node in RSG.
But that contradicts the release notes here: https://sdkdocs.roku.com/display/sdkdoc/Roku+Advertising+Framework#RokuAdvertisingFramework-Version2.2–07/2017

Added a native RSG renderer for Brightline interactive ads

“tim_beynart” wrote:
Well that explains it. I am using Video node in RSG.
But that contradicts the release notes here: https://sdkdocs.roku.com/display/sdkdoc/Roku+Advertising+Framework#RokuAdvertisingFramework-Version2.2–07/2017

Added a native RSG renderer for Brightline interactive ads
That only covers the CSAI (client-side ad insertion, traditional) case, i am afraid. Brightline interactives have worked (and still work) with SSAI + roVideoPlayer since before RAF 2.0. Just mentioning the options, pls no beatings…

Cool, thanks for all your help! I can just mark this task as “BLOCKED” and go get a cappuccino. :laughing: