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

Seedtag Bid Adapter : allow outstream when placement is inStream #12440

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/seedtagBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function hasMandatoryVideoParams(bid) {
switch (bid.params.placement) {
// instream accept only video format
case 'inStream':
return isValid && videoParams.context === 'instream';
return isValid && (videoParams.context === 'instream' || videoParams.context === 'outstream');
// outstream accept banner/native/video format
default:
return (
Expand Down
67 changes: 49 additions & 18 deletions test/spec/modules/seedtagBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,21 @@ describe('Seedtag Adapter', function () {
}
);

it(
placement +
' shouldn\'t be valid when has only video mediatypes, and video context is outstream',
function () {
const isBidRequestValid = spec.isBidRequestValid(
createBannerSlotConfig(placement, {
video: {
context: 'outstream',
playerSize: [[600, 200]],
},
})
);
expect(isBidRequestValid).to.equal(false);
}
);
it(
placement +
" shouldn't be valid when has display and video mediatypes, and video context is instream",
Expand Down Expand Up @@ -155,15 +170,41 @@ describe('Seedtag Adapter', function () {
const isBidRequestValid = spec.isBidRequestValid(slotConfig);
expect(isBidRequestValid).to.equal(false);
});
it('should return false, when video context is outstream', function () {
const slotConfig = createInStreamSlotConfig({
video: {
context: 'outstream',
playerSize: [[600, 200]],

it('should return true when placement is inStream and video context is outstream', function () {
const slotConfig = getSlotConfigs(
{
video: {
context: 'instream',
playerSize: [[600, 200]],
},
},
});
{
publisherId: PUBLISHER_ID,
adUnitId: ADUNIT_ID,
placement: 'inStream',
}
);
const isBidRequestValid = spec.isBidRequestValid(slotConfig);
expect(isBidRequestValid).to.equal(false);
expect(isBidRequestValid).to.equal(true);
});

it('should return true when placement is inStream and video context is instream', function () {
const slotConfig = getSlotConfigs(
{
video: {
context: 'outstream',
playerSize: [[600, 200]],
},
},
{
publisherId: PUBLISHER_ID,
adUnitId: ADUNIT_ID,
placement: 'inStream',
}
);
const isBidRequestValid = spec.isBidRequestValid(slotConfig);
expect(isBidRequestValid).to.equal(true);
});
});
});
Expand Down Expand Up @@ -224,17 +265,7 @@ describe('Seedtag Adapter', function () {
);
expect(isBidRequestValid).to.equal(false);
});
it('is outstream ', function () {
const isBidRequestValid = spec.isBidRequestValid(
createInStreamSlotConfig({
video: {
context: 'outstream',
playerSize: [[600, 200]],
},
})
);
expect(isBidRequestValid).to.equal(false);
});

describe('order does not matter', function () {
it('when video is not the first slot', function () {
const isBidRequestValid = spec.isBidRequestValid(
Expand Down