Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tim_beynart
Channel Surfer

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#IntegratingtheRok...
(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"
          }
        ]
      }
    ]
  }
]
Tags (1)
0 Kudos
8 REPLIES 8
NB_
Roku Guru

Re: Brightline ads broken in RAF 2.2 + Scenegraph?

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.
Tags (1)
0 Kudos
NB_
Roku Guru

Re: Brightline ads broken in RAF 2.2 + Scenegraph?

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.
Tags (1)
0 Kudos
tim_beynart
Channel Surfer

Re: Brightline ads broken in RAF 2.2 + Scenegraph?

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.
Tags (1)
0 Kudos
tim_beynart
Channel Surfer

Re: Brightline ads broken in RAF 2.2 + Scenegraph?

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
Tags (1)
0 Kudos
NB_
Roku Guru

Re: Brightline ads broken in RAF 2.2 + Scenegraph?

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.
Tags (1)
0 Kudos
tim_beynart
Channel Surfer

Re: Brightline ads broken in RAF 2.2 + Scenegraph?

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...07/2017
Added a native RSG renderer for Brightline interactive ads
Tags (1)
0 Kudos
NB_
Roku Guru

Re: Brightline ads broken in RAF 2.2 + Scenegraph?

"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...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...
Tags (1)
0 Kudos
tim_beynart
Channel Surfer

Re: Brightline ads broken in RAF 2.2 + Scenegraph?

Cool, thanks for all your help! I can just mark this task as "BLOCKED" and go get a cappuccino.  Smiley LOL
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!