Prevents auto-play HTML5 videos in new tabs on any page (not just YouTube) and pauses videos when leave/switch/change the current tab, to prevent any video playing in the background. This auto play blocker is an alternative to Click-to-Play / click to play. On some times like YouTube, click twice to begin first playback — From Dan Moorehead (xeonx1), developer of PowerAccess™ (http://PowerAccessDB.com)
< Feedback on AutoPlay Disabled for HTML5 Videos + Pause on Switch Tab
Play not working with spacebar on youtube
If you pause the video when you try to resume it pressing spacebar in youtube it's inmediately paused again by this script for some reason.