gecko-dev/dom/base/test/file_pluginAudio.html
Abdoulaye O. Ly 55e51c578b Bug 1562990 - Remove 'audioMuted' and 'audioVolume' properties from nsIDOMWindowUtils. r=NeilDeakin,alwu,farre
While working on porting the (audio-playback indicators) bug 1562990 to fission, we saw the potential to delete some methods in nsIDOMWindowUtils because they were not used anymore in our codebase except in a couple of tests files. So now, we should only mute/unmute or change the volume in the parent process. As such, interfaces are added in SpecialPowers to change media muted or volume state from content processes.

Differential Revision: https://phabricator.services.mozilla.com/D41782

--HG--
extra : moz-landing-system : lando
2019-08-19 21:17:21 +00:00

18 lines
411 B
HTML

<!DOCTYPE html>
<embed type="application/x-test" width="200" height="200"></embed>
<script>
var plugin = document.querySelector("embed");
onload = function() {
plugin.startAudioPlayback();
};
function stopAudio() {
plugin.stopAudioPlayback();
}
function pluginMuted() {
return plugin.audioMuted();
}
function toggleMuteState(muted) {
return SpecialPowers.toggleMuteState(muted, window.top);
}
</script>