Skip to content

Commit

Permalink
fix: don't reset video element on ios if it is playing
Browse files Browse the repository at this point in the history
  • Loading branch information
ordyakov committed May 27, 2021
1 parent 2d16314 commit 015508a
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 015508a

Please sign in to comment.