34 lines
777 B
JavaScript
34 lines
777 B
JavaScript
//
|
|
// muteTest.js
|
|
//
|
|
// Created by Rebecca Stankus on 06/21/18
|
|
// Copyright 2018 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
|
|
/* global AccountServices */
|
|
|
|
(function() {
|
|
print("made it to mute test");
|
|
var DO_NOT_MUTE = ['philip', 'theextendedmind'];
|
|
|
|
var ignore;
|
|
|
|
if ((DO_NOT_MUTE.indexOf(AccountServices.username) <= 0) || Audio.muted) {
|
|
print("do not mute");
|
|
ignore = true;
|
|
} else {
|
|
print("mute");
|
|
}
|
|
|
|
if (!ignore) {
|
|
Audio.muted = true;
|
|
}
|
|
|
|
this.unload = function() {
|
|
if (!ignore) {
|
|
Audio.muted = false;
|
|
}
|
|
};
|
|
});
|