Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

mc.setInnerAudioOption(Object object)

设置 InnerAudioContext 的播放选项。设置之后对当前应用全局生效。

Object object 参数

属性类型默认值必填说明
mixWithOtherBooleantrue否是否与其他音频混播,设置为 true 之后,不会终止其他应用的音乐
obeyMuteSwitchBooleantrue否(仅在 iOS 生效)是否遵循静音开关,设置为 false 之后,即使是在静音模式下,也能播放声音
speakerOnBooleantrue否true 代表用扬声器播放,false 代表听筒播放,默认值为 true。
successfunction否接口调用成功的回调函数
failfunction否接口调用失败的回调函数
completefunction否接口调用结束的回调函数(调用成功、失败都会执行)