-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Video Module: Local cache for video bids #12502
base: master
Are you sure you want to change the base?
Conversation
@mkomorski how do the blobs go away over time? Is there a risk of running out of storage? |
@patmmccann They just get cleaned up when document scope is gone, so they will live till the user close the browser/tab. I don't think there is a limited memory pool dedicated for blobs so it's most likely matter of browser memory. But it can actually be a bit more efficient to also explicitly revoke not needed ones (lost bids) when auction ends up. good call |
Maybe when the ttl expires instead? They might enter the cache |
video:{"context":"outstream"} | ||
video:{ | ||
"context":"outstream", | ||
playerSize: [640, 360] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
playerSize shouldn't be required; the Video Module should be populating this, not the publisher. The Video Module is the source of truth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkomorski why was playerSize
in all the demos, this should be populated by the Video Module already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@karimMourra so it seems that it's not populated for some reason, at least in all the demos. without the publisher explicitly setting playerSize to adUnit, none of the examples works. I'm not very familiar with the details of the video module, but maybe this means there is some issue? Here's the example that I was basing on - Removing playerSize from this example's code breaks it as well
const { url, useLocal } = config.getConfig('cache') || {}; | ||
if ((!url && !useLocal) && bid.vastXml && !bid.vastUrl) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there ever a case where url
would be defined and useLocal
would be set to true ? Do we need a safeguard against this ?
if (!config.getConfig('cache.useLocal')) { | ||
url.searchParams.append(UUID_MARKER, uuid); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why wouldn't we append the UUID Marker when the url is local ? The idea is to know that the ad from the bid actually rendered. This is most importantly for when the bid competes in the ad server auction, but without a marker we'll never know if the ad from the bid actually rendered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that local Blob URLs can be modified in any way, adding query parameters to it will make it no longer point to the current blob and return 404. We might think of some alternative for handling this tracking in case of using local cache
Co-authored-by: Karim Mourra <karim@jwplayer.com>
Co-authored-by: Karim Mourra <karim@jwplayer.com>
Tread carefully! This PR adds 3 linter errors (possibly disabled through directives):
|
1 similar comment
Tread carefully! This PR adds 3 linter errors (possibly disabled through directives):
|
Type of change
Bugfix
Feature
New bidder adapter
Updated bidder adapter
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Does this change affect user-facing APIs or examples documented on http://prebid.org?
Other
Description of change
Other information
#11393