title: Taro.onAudioInterruptionBegin(callback)

sidebar_label: onAudioInterruptionBegin

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

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

Parameters

Parameter Type Description
callback (res: CallbackResult) => void The callback function for the event that audio interruption starts due to system occupation.

API Support

API WeChat Mini-Program H5 React Native
Taro.onAudioInterruptionBegin ✔️