Mute iframe audio when page/tab visibility becomes hidden
It'd be great to automatically mute audio that plays within an iframe when page/tab visibility becomes hidden (on any content type).
Use case : I've recently used the Interactive Video type to build a simple interface for a portfolio - a full screen video plays in the background with a simple menu that uses transparent hotspots on text to navigate forward in time to the corresponding content with each section having around a 1min run time. Content thumbnails then link through to external content using Go to on Click URL and opens in a new window. Simple but effective.
Unfortunately the video continues to play in the background window, including the audio with sound. It'd be fantastic to be able to mute the contents of the iframe with hidden visiblity, either from a button or automagically, then unmute when we return back to the H5P. A similar functioning example is here : link (hit audio play then change tabs to hear audio pause).
This could also functionally work by pausing and unpausing the video within the Interactive Video and Branching video content types when visibility changes?