-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: window.outstreamPlayer is not a function #5
Comments
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:
|
Thank you both for chipping in. Unfortunately the error remains the same, but in a different way.
I tried with both and set
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. |
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 |
@jbartek25 I already hard coded the default log to 5 after my last failed attempt. This is my built renderer https://cdn.orangeclickmedia.com/tech/libs/ocm-renderer.js |
That's a good catch @jbartek25. I'll have a look at it and come back. |
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 |
@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. |
@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. I don't like this setup and think we should change the code so there is a global object. |
@mike-chowla unfortunately that won't work either. I'll try and expose the outstreamPlayer globally and get back with, hopefully, a PR. |
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? |
I guess this issue was closed with the mentioned PR |
Hello,
I'm trying to use the prebid-outstream player with the below configuration.
The bid is won by openx (a test bid) with the below response:
OpenX explicitly told me that they do not have their own renderer, so a custom renderer should be used.
Unfortunately, I get the error stated in the issue title.
Any feedback would be appreciated.
A url to check would be here: https://www.squawka.com/en/liverpool-0-0-manchester-united-player-ratings-thiago-shaw-fabinho-firmino?ocmpbjs_debug=true
Scroll down a bit, to lazy load the outstream ad unit.
Best,
Peter
The text was updated successfully, but these errors were encountered: