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

fix(FEC-7184): remove setDisableCustomPlaybackForIOS10Plus flag #16

Merged
merged 3 commits into from
Sep 25, 2017
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
1 change: 0 additions & 1 deletion src/ima.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ export default class Ima extends BasePlugin {
this._sdk.settings.setPlayerVersion(VERSION);
this._sdk.settings.setVpaidAllowed(true);
this._sdk.settings.setVpaidMode(this._sdk.ImaSdkSettings.VpaidMode.ENABLED);
this._sdk.settings.setDisableCustomPlaybackForIOS10Plus(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dan-ziv if we have playsinline config then this is required, so let's make this somewhere in the form of:
this._sdk.settings.setDisableCustomPlaybackForIOS10Plus(config.playsinline);

need to make sure playback preformance with regards to the user gesture restriction in this case as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OrenMe
From my checks this flag is not mandatory and IOS10Plus playback works just fine

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what I meant in my comment - if player is set to work inline iOS10 then we need to set this as well, so need to align to player config, and also enable passing other options if we are on the subject, like the vpaidAllowed and vpaidMode.

Copy link
Contributor Author

@dan-ziv dan-ziv Sep 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to set this, playsinline on ios10plus works without this flag

}

/**
Expand Down
21 changes: 21 additions & 0 deletions test/src/ima.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,4 +329,25 @@ describe('Ima Plugin', function () {
});
player.play();
});

it('should play ads and then content with preload="auto"', (done) => {
let adPlayed = false;
player = loadPlayerWithAds(targetId, {
adTagUrl: 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator='
}, {
preload: "auto"
});
ima = player._pluginManager.get('ima');
player.addEventListener(player.Event.AD_STARTED, () => {
adPlayed = true;
});
player.addEventListener(player.Event.PLAYING, () => {
if (adPlayed) {
done();
} else {
done(new Error("Content start without ads"));
}
});
player.play();
});
});