Sound Management & Audio Atmosphere
Control the audio landscape of your virtual spaces to create immersive, engaging environments. Sound management is crucial for creating believable virtual experiences, from ambient environmental sounds to interactive audio feedback.
isAmbientSoundMuted
isAmbientSoundMuted([callback: Function])
Returns the current mute state of ambient environmental sounds in the virtual space.
api.isAmbientSoundMuted(function(isMuted){
console.log('Ambient sound muted:', isMuted); // true/false
});
2
3
unmuteAmbientSound
unmuteAmbientSound([callback: Function])
Enables ambient environmental sounds to enhance the atmospheric immersion of your virtual space.
api.unmuteAmbientSound(function(){
console.log('Ambient sounds enabled');
});
2
3
muteAmbientSound
muteAmbientSound([callback: Function])
Disables ambient environmental sounds. Useful for creating quiet environments or when audio conflicts with other media.
api.muteAmbientSound(function(){
console.log('Ambient sounds muted');
});
2
3
areAllSoundsMuted
areAllSoundsMuted([callback: Function])
Returns whether all audio sources in the virtual space are currently muted.
api.areAllSoundsMuted(function(allMuted){
console.log('All sounds muted:', allMuted); // true/false
});
2
3
muteAllSound
muteAllSound([callback: Function])
Mutes all audio sources in the virtual space, including ambient sounds, object sounds, videos, and voice chat.
api.muteAllSound(function(){
console.log('All sounds muted');
});
2
3
unmuteAllSound
unmuteAllSound([callback: Function])
Deprecated: This function is deprecated. Use unmuteSpace()
instead.
Enables all audio sources in the virtual space.
api.unmuteAllSound(function(){
console.log('All sounds enabled (deprecated - use unmuteSpace)');
});
2
3
muteSpace
muteSpace([callback: Function])
Mutes all space-related audio including ambient sounds, object sounds, videos, live streams, playlists, and voice chat. This provides comprehensive audio control for the entire virtual environment.
api.muteSpace(function(){
console.log('All space audio muted');
});
2
3
unmuteSpace
unmuteSpace([callback: Function])
Enables all space-related audio sources, restoring the full audio experience of the virtual environment.
api.unmuteSpace(function(){
console.log('All space audio enabled');
});
2
3
getIsSpaceMuted
getIsSpaceMuted([callback: Function])
Returns the current mute state of all space audio sources.
api.getIsSpaceMuted(function(isMuted){
console.log('Space audio muted:', isMuted); // true/false
if (isMuted) {
// Show unmute button in UI
} else {
// Show mute button in UI
}
});
2
3
4
5
6
7
8
9
Audio Best Practices
Creating Immersive Environments:
- Use ambient sounds to establish atmosphere and location context
- Consider user preferences and provide audio controls
- Balance audio levels to avoid overwhelming the visual experience
Performance Considerations:
- Mute audio when the space is not in focus to save bandwidth
- Use
muteSpace()
for comprehensive audio control - Monitor audio state with getter functions for UI synchronization