redlib
redlib copied to clipboard
fix: only autoplay videos if visible
If autoplay is enabled, redlib will start playing all videos on the current page, at the same time.
This introduces an observer to only start autoplaying a video if it's visible, and pause it if it stops being visible. This was my expected behavior when I enabled the "autoplay" setting.
I guess this should also be fixed by #179 or #181, also added an intersectionobserver in those prs