gecko-dev/dom/base/test/file_pluginAudioNonAutoStart.html
Alastor Wu 797bf55dc0 Bug 1276119 - part2: add test.
MozReview-Commit-ID: 4fRCzlJXK41
2016-05-31 10:17:53 +08:00

26 lines
592 B
HTML

<!DOCTYPE html>
<embed type="application/x-test" width="200" height="200"></embed>
<script>
var plugin = document.querySelector("embed");
function startAudio() {
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>