setOutputMuted(_:)
Sets a Boolean value to inform the system to mute the session’s output audio. The default value is false (unmuted).
Declaration
func setOutputMuted(_ muted: Bool) throwsDiscussion
This property is supported with all categories and modes, except for playAndRecord where it is only supported with default. Changing the mode to non-default mode with playAndRecord category will cause the session to unmute.
Changes in output mute state can be observed via outputMuteStateChangeNotification. If this value is set to true, userIntentToUnmuteOutputNotification may be sent when a user hints to unmute by changing the volume.
muted: A Boolean value to set the audio output to the desired muted state.error: A pointer to an error object. If an error occurs, the framework sets the pointer to an error object that describes the failure.