Class Sound#getSoundStatus
Sound
- Defined in: sound.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Sound#getSoundStatus(successCallback, errorCallback)
Gets sound information
|
Class Detail
Sound#getSoundStatus(successCallback, errorCallback)
Gets sound information
// Javascript code
function getSoundStatus () {
function successCb(cbObject) {
console.log("cbObject : " + JSON.stringify(cbObject));
console.log("level : " + cbObject.level);
console.log("muted : " + cbObject.muted);
console.log("externalSpeaker : " + cbObject.externalSpeaker);
// Do something
...
}
function failureCb(cbObject) {
var errorCode = cbObject.errorCode;
var errorText = cbObject.errorText;
console.log ("Error Code [" + errorCode + "]: " + errorText);
}
var sound = new Sound();
sound.getSoundStatus(successCb, failureCb);
}
- Parameters:
- {Function} successCallback
- success callback function.
- {Function} errorCallback
- failure callback function.
- Since:
- 1.0
- Returns:
- {Object}
Property Type Description level Number volume level (0~100) muted Boolean true: mute on / false: mute off externalSpeaker Boolean true : enabled / false : disabled - See:
- Sound.setVolumeLevel(),
Sound.setExternalSpeaker()