Skip to content
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

AppNexus Bid Adapter : plcmt and startdelay mapping function not returning correct values #11400

Closed
weylandjung opened this issue Apr 26, 2024 · 1 comment · Fixed by #11403
Closed
Assignees
Labels

Comments

@weylandjung
Copy link

weylandjung commented Apr 26, 2024

function getContextFromPlcmt(ortbPlcmt, ortbStartDelay) {
if (!ortbPlcmt) {
return;
}
if (ortbPlcmt === 2) {
if (!ortbStartDelay) {
return;
}
if (ortbStartDelay === 0) {
return 'accompanying_content_pre_roll';
} else if (ortbStartDelay === -1) {
return 'accompanying_content_mid_roll';
} else if (ortbStartDelay === -2) {
return 'accompanying_content_post_roll';
}
} else if (ortbPlcmt === 3) {
return 'interstitial';
} else if (ortbPlcmt === 4) {
return 'outstream';
}
}

In the getContextFromPlcmt function, when plcmt is 2 and getContextFromPlcmt is 0, it returns out, rather than returning accompanying_content_pre_roll as expected.

That's because (!ortbStartDelay) in line 1021 evaluates to true, so the function just exits. This may need to be (typeof ortbStartDelay !== undefined).

@jsnellbaker
Copy link
Collaborator

Thanks for reporting this; I'll take a look and put together a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

3 participants