Class Sound#getSoundStatus

Sound

Class Summary
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}
PropertyTypeDescription
levelNumbervolume level (0~100)
mutedBooleantrue: mute on / false: mute off
externalSpeakerBooleantrue : enabled / false : disabled
See:
Sound.setVolumeLevel(), Sound.setExternalSpeaker()