UNPKG

@tarojs/taro-h5

Version:
65 lines (64 loc) 2.99 kB
/// <reference types="types/api" /> import Taro from '@tarojs/api'; import { CallbackManager } from '../../../utils/handler'; export declare class BackgroundAudioManager implements Taro.BackgroundAudioManager { Instance?: HTMLAudioElement; errorStack: CallbackManager; stopStack: CallbackManager; __startTime: number; constructor(); set src(e: string); get src(): string; set startTime(e: number); get startTime(): number; set title(e: string); get title(): string; set epname(e: string); get epname(): string; set singer(e: string); get singer(): string; set coverImgUrl(e: string); get coverImgUrl(): string; set webUrl(e: string); get webUrl(): string; set protocol(e: string); get protocol(): string; set playbackRate(e: number); get playbackRate(): number; get duration(): number; get currentTime(): number; get paused(): boolean; get buffered(): number; set referrerPolicy(e: string); get referrerPolicy(): string; private setProperty; private dataset; play: () => Promise<void> | undefined; pause: () => void | undefined; seek: (position: number) => void; stop: () => void; onCanplay: (callback?: () => void) => void | undefined; onWaiting: (callback?: () => void) => void | undefined; onError: (callback?: ((res: Taro.InnerAudioContext.onErrorDetail) => void)) => void; onPlay: (callback?: () => void) => void | undefined; onPause: (callback?: () => void) => void | undefined; onSeeking: (callback?: () => void) => void | undefined; onSeeked: (callback?: () => void) => void | undefined; onEnded: (callback?: () => void) => void | undefined; onStop: (callback?: () => void) => void; onTimeUpdate: (callback?: () => void) => void | undefined; onPrev: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>; onNext: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>; offCanplay: (callback?: () => void) => void | undefined; offWaiting: (callback?: () => void) => void | undefined; offError: (callback?: () => void) => void; offPlay: (callback?: () => void) => void | undefined; offPause: (callback?: () => void) => void | undefined; offSeeking: (callback?: () => void) => void | undefined; offSeeked: (callback?: () => void) => void | undefined; offEnded: (callback?: () => void) => void | undefined; offStop: (callback?: () => void) => void; offTimeUpdate: (callback?: () => void) => void | undefined; offPrev: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>; offNext: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>; }