export default class TslAudioClient {
    playCall = null;
    pauseCall = null;
    audioLoadCall = null;

    constructor() {
        if (!TslAudioClient.instance) {
            TslAudioClient.instance = this
        }

        return TslAudioClient.instance
    }

    static getInstance() {
        if (!this.instance) {
            this.instance = new TslAudioClient()
        }

        return this.instance
    }

    // 播放
    audioPlay(url, text) {
        this.playCall(url, text)
    }

    // 暂停
    audioPause() {
        this.pauseCall()
    }

    // 重置播放进度
    audioLoad() {
        this.audioLoadCall()
    }
}