I am creating a chrome extension that automatically pauses the youtube video when I switch to another tab if the tab I am switching to is also youtube playing another video. I am looking for ways to have at least play/pause control over the native youtube player. All I could find on the internet after desperately searching is related to youtube iframe or embedding, like this one.
Is there any way I can achieve this by having direct control over the youtube player object or some other html5 browser features with javascript?
Regards.