跳到主要内容

bn.setInnerAudioOption

setInnerAudioOption(options): Promise<void>

description Set the options of InnerAudioContext. Set to take effect globally for the current Mini Program

Parameters

NameTypeDescription
optionsSetInnerAudioOptionInnerAudioContext options

Returns

Promise<void>

Interface: SetInnerAudioOption

NameTypeDescription
mixWithOther?booleanTo mix with other audio, set to true After that, the music in other apps will not be terminated.
obeyMuteSwitch?booleanWhether to follow the "Mute" switch. It is true by default. If it is set to false, the audio file still sounds even if the "Mute" switch is on
speakerOn?booleantrue - playing on speakerphone, false - earpiece speaker, default is true