videojs / videojs-contrib-ads

A Tool for Building Video.js Ad Plugins
http://videojs.github.io/videojs-contrib-ads/
Other
384 stars 257 forks source link

set contentresuming before calling adBreak.end #418

Closed marguinbc closed 6 years ago

marguinbc commented 6 years ago

On IE11, we can potentially receive a play event before adBreak.end() completes and thus before we set this.contentResuming = true;. This results in that play event being prefixed as an ad-play event since contentResuming is still false until after end completes.

This fix simply moves this.contentResuming = true; above the AdBreak.end() call which is in line with what we are also doing in Midroll.js.

Logically, this makes sense because we are adding thevjs-ad-content-resuming class to the player as a signal to the UI that we are done playing ads.

Tested on IE11 on Win7 and on Mac OS X Chrome 67.

apadhye commented 6 years ago

QA LGTM.