Class Sound#setMuted
Sound
- Defined in: sound.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Sound#setMuted(successCallback, errorCallback, options)
mute on/off
|
Class Detail
Sound#setMuted(successCallback, errorCallback, options)
mute on/off
// Javascript code
function setMuted () {
var options = {
muted : true
};
function successCb() {
// Do something
}
function failureCb(cbObject) {
var errorCode = cbObject.errorCode;
var errorText = cbObject.errorText;
console.log ("Error Code [" + errorCode + "]: " + errorText);
}
var sound = new Sound();
sound.setMuted(successCb, failureCb, options);
}
- Parameters:
- {Function} successCallback
- success callback function.
- {Function} errorCallback
- failure callback function.
- {Object} options
Property Type Description Required muted Boolean true: mute on / false: mute off required
- Since:
- 1.0
- Returns:
If the method is successfully executed, call the success callback function without a parameter. If an error occurs, failure callback function is called with failure callback object as a parameter.
- See:
- Sound.getSoundStatus()