GithubHelp home page GithubHelp logo

Comments (12)

jbartek25 avatar jbartek25 commented on June 29, 2024 4

No timeout or other workaround is needed. There's a renderer queue for that exact purpose that the player may not be loaded when the render function gets invoked. All you need is put the relevant parts or entire body of the render function in the renderer queue like this:

render: function (bid) {
  bid.renderer.push(function () {
    ...
    window.outstreamPlayer(bid, adDiv , obj);
  });
}

from prebid-outstream.

ocm-peter avatar ocm-peter commented on June 29, 2024

Thank you both for chipping in.

Unfortunately the error remains the same, but in a different way.

prebid.js:3 Prebid ERROR: Error processing Renderer command:  ReferenceError: outstreamPlayer is not defined
    at ocm.js:3
    at i.process (prebid.js:3)
    at Array.callback (prebid.js:3)
    at prebid.js:3
    at HTMLScriptElement.readyState.n.onload (prebid.js:3)

I tried with both window.outstreamPlayer and outstreamPlayer

Visit
https://www.squawka.com/en/southampton-1-3-arsenal-match-analysis-winners-losers-saka-lacazette-holding-arteta

and set

ocmpbjs.setConfig({debug: true})

in the console before scrolling (they have some issues with the query parameters, so ?ocmpbjs_debug=true won't work).

@agammathur the thing is that outstreamPlayer is never to be found through the console, even after a much longer period of time. So, definitely it's not a timing issue.

Thank you again for your feedback.

from prebid-outstream.

jbartek25 avatar jbartek25 commented on June 29, 2024

If window.outstreamPlayer never exists then it looks like the player failed to initialized. You should turn on the player logs and inspect https://github.com/prebid/prebid-outstream#Run

from prebid-outstream.

ocm-peter avatar ocm-peter commented on June 29, 2024

@jbartek25 I already hard coded the default log to 5 after my last failed attempt.
There is nothing printed in the console, unfortunately.

image

This is my built renderer https://cdn.orangeclickmedia.com/tech/libs/ocm-renderer.js

image

from prebid-outstream.

jbartek25 avatar jbartek25 commented on June 29, 2024

Turn off safeframe. The player normally needs to jump out of Google iframe and needs a friendly iframe to do so.
Screenshot 2021-01-27 at 16 29 38

from prebid-outstream.

ocm-peter avatar ocm-peter commented on June 29, 2024

That's a good catch @jbartek25.

I'll have a look at it and come back.

from prebid-outstream.

ocm-peter avatar ocm-peter commented on June 29, 2024

Hello again,

@jbartek25 this is what I got with FriendlyFrame

image

On my safeFrame line items, I use the PUC, on the non safe frame ones, I'm using the one appearing on the ss above.

Any thoughts?

Tia

from prebid-outstream.

jbartek25 avatar jbartek25 commented on June 29, 2024

@ocm-peter I took a look but you have your own JS wrapper around Prebid and it's hard for me to see what's going on. I suggest you start with vanilla Prebid test page with outsteam player and work out the difference between what your custom script is doing and what the test page does. Sorry can't help you.

from prebid-outstream.

mike-chowla avatar mike-chowla commented on June 29, 2024

@ocm-peter I think I figured out the issue

This line:

window.outstreamPlayer(bid, adDiv , obj);

should be

outstreamPlayer(bid, adDiv , obj);

Unlike Prebid.js, the outstream player is currently not creating a global object. outstreamPlayer is constructor and not an object.

I don't like this setup and think we should change the code so there is a global object.

from prebid-outstream.

ocm-peter avatar ocm-peter commented on June 29, 2024

@mike-chowla unfortunately that won't work either.

I'll try and expose the outstreamPlayer globally and get back with, hopefully, a PR.

from prebid-outstream.

ocm-peter avatar ocm-peter commented on June 29, 2024

Just noticed that the local test build runs with prebid v3.23, while I am using v4.23.

Anyone aware of any major changes to the outstream rendering from v3 to v4?

from prebid-outstream.

muuki88 avatar muuki88 commented on June 29, 2024

I guess this issue was closed with the mentioned PR

from prebid-outstream.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.