提交 9e9e128b 编写于 作者: D DCloud_LXH

chore(App): getBackgroundAudioManager

上级 2c800299
......@@ -21,7 +21,7 @@ export * from './protocols/base/canIUse'
export * from './protocols/context/context'
export * from './protocols/context/canvas'
export * from './protocols/context/backgroundAudio'
export * from './protocols/context/getBackgroundAudioManager'
export * from './protocols/device/makePhoneCall'
export * from './protocols/device/setClipboardData'
......
export const API_BACKGROUND_AUDIO = 'getBackgroundAudioManager'
export type API_TYPE_BACKGROUND_AUDIO = typeof uni.getBackgroundAudioManager
export const API_GET_BACKGROUND_AUDIO_MANAGER = 'getBackgroundAudioManager'
export type API_TYPE_GET_BACKGROUND_AUDIO_MANAGER =
typeof uni.getBackgroundAudioManager
import { extend } from '@vue/shared'
import {
defineSyncApi,
API_BACKGROUND_AUDIO,
API_TYPE_BACKGROUND_AUDIO,
API_GET_BACKGROUND_AUDIO_MANAGER,
API_TYPE_GET_BACKGROUND_AUDIO_MANAGER,
} from '@dcloudio/uni-api'
import { once } from '@dcloudio/uni-shared'
import { getRealPath } from '@dcloudio/uni-platform'
......@@ -441,8 +441,8 @@ class BackgroundAudioManager implements UniApp.BackgroundAudioManager {
let backgroundAudioManager: BackgroundAudioManager
export const getBackgroundAudioManager =
defineSyncApi<API_TYPE_BACKGROUND_AUDIO>(
API_BACKGROUND_AUDIO,
defineSyncApi<API_TYPE_GET_BACKGROUND_AUDIO_MANAGER>(
API_GET_BACKGROUND_AUDIO_MANAGER,
() =>
backgroundAudioManager ||
(backgroundAudioManager = new BackgroundAudioManager())
......
......@@ -20,7 +20,7 @@ export * from './network/request'
export * from './network/socket'
export * from './context/createInnerAudioContext'
export * from './context/backgroundAudio'
export * from './context/getBackgroundAudioManager'
export * from './location/getLocation'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册