mediaelement / mediaelement-plugins

Plugins for the main mediaelement project
406 stars 138 forks source link

'Jump Forward' plugin allows you to skip ads #51

Closed jonathanex closed 7 years ago

jonathanex commented 7 years ago

Hi,

The update in 2.2.1 to stop interacting with progress/jump buttons while an ad is playing is great - but I think there may be an issue when used with the Jump Forward plugin too.

As the code to disable the buttons runs as part of the function adsPrerollStarted, it's possible before you start playing to press the 'Jump Forward' button, and it'll start playing further in (or skip the ad completely if its duration is less than your jump forward).

From a quick bit of testing - if the disable code is moved slightly earlier into the adsStartPreroll function, it seems to work fine but I don't know if this would have any other affects.

Happy to make a branch and submit a pull request for this if you'd like.

rafa8626 commented 7 years ago

As long as the call is done inside the Ads plugin, I really don't foresee any effects. I'll be happy to review your PR if you submit it. Thanks

rafa8626 commented 7 years ago

Closing issue since fix has been merged


Please star both https://github.com/mediaelement/mediaelement and https://github.com/mediaelement/mediaelement-plugins to continue improving the package and giving it more popularity; also tell your friends/coworkers/etc. that have a GitHub account to do the same to support the project, if you don't mind. It would be greatly appreciated it.