Comments (12)
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.
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
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.
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.
@jbartek25 I already hard coded the default log to 5 after my last failed attempt.
There is nothing printed in the console, unfortunately.
This is my built renderer https://cdn.orangeclickmedia.com/tech/libs/ocm-renderer.js
from prebid-outstream.
Turn off safeframe. The player normally needs to jump out of Google iframe and needs a friendly iframe to do so.
from prebid-outstream.
That's a good catch @jbartek25.
I'll have a look at it and come back.
from prebid-outstream.
Hello again,
@jbartek25 this is what I got with FriendlyFrame
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.
@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.
@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.
@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.
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.
I guess this issue was closed with the mentioned PR
from prebid-outstream.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prebid-outstream.