Skip to main content
Version: 3.x

Taro.onAudioInterruptionBegin(callback)

Listens on the event that audio interruption starts due to system occupation. This event is triggered by the following scenarios: alarm, phone call, FaceTime call, WeChat voice chat, and WeChat video chat. After the event is triggered, all audio files in the Mini Program are paused.

Reference

Type

(callback: (res: CallbackResult) => void) => void

Parameters

ParameterTypeDescription
callback(res: CallbackResult) => voidThe callback function for the event that audio interruption starts due to system occupation.

API Support

APIWeChat Mini-ProgramH5React Native
Taro.onAudioInterruptionBegin✔️