timii/Snapper

Before overlay is created, get all currently played videos and only pause them

timii opened this issue · 0 comments

timii commented

Currently, all videos on the page are paused when the overlay is active AND all videos are unpaused when the overlay is exited.

Potential problem with this approach:
When there are multiple videos on the page and only one is playing, every other video is being unpaused when exiting the overlay.

Solution to the problem:
When creating the overlay, get only videos that are currently playing, save them in an array and only pause and unpause the videos in the array.