Skip to content

Commit

Permalink
Merge pull request #17 from ordyakov/fix-ios-behaviour
Browse files Browse the repository at this point in the history
fix: don't reset video element on ios if it is playing
  • Loading branch information
andrepolischuk authored May 27, 2021
2 parents 2d16314 + 015508a commit 5b6d6dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runner/runWaterfall.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const runWaterfall = (adTag, placeholder, options) => {
onRunFinish: callbackHandler(options.onRunFinish)
};

if (options.videoElement && isIOS()) {
if (options.videoElement && options.videoElement.paused && isIOS()) {
/*
It seems that if the video doesn't load synchronously inside a touchend or click event handler, the user gesture breaks on iOS and it won't allow a play.
*/
Expand Down

0 comments on commit 5b6d6dc

Please sign in to comment.