summaryrefslogtreecommitdiff
path: root/dom/base/test/file_pluginAudio.html
blob: 02ef8bd02bd45962eeec60ea48e1df31b165b172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!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) {
  var Ci = SpecialPowers.Ci;
  var utils = SpecialPowers.wrap(window).top
                           .QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIDOMWindowUtils);
  utils.audioMuted = muted;
}
</script>