目录

System Event

Starting from version 1078, the API prefix has been changed from hbs to qg. The original prefix hbs is still supported.

Definition

API

Description

qg.onAudioInterruptionBegin(function callback)

Listens for the start of an audio interruption. This event occurs when the system takes over the audio channel, such as during an alarm, an incoming phone call, or a FaceTime call. When this event is triggered, game audios will be paused.

qg.offAudioInterruptionBegin(function callback)

Stops listening for the start of an audio interruption.

qg.onAudioInterruptionEnd(function callback)

Listens for the end of an audio interruption. A quick game pauses audio playback when receiving an onAudioInterruptionBegin event and resumes audio playback when receiving an audio interruption end event.

qg.offAudioInterruptionEnd(function callback)

Stops listening for the end of an audio interruption.

qg.onError(function callback)

Listens for a global error event.

qg.offError(function callback)

Stops listening for a global error event.

[h2]qg.onAudioInterruptionBegin(function callback)

[h2]qg.offAudioInterruptionBegin(function callback)

[h2]qg.onAudioInterruptionEnd(function callback)

[h2]qg.offAudioInterruptionEnd(function callback)

[h2]qg.onError(function callback)

[h2]qg.offError(function callback)