mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
55e51c578b
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
18 lines
411 B
HTML
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>
|