RecorderManager.onInterruptionEnd

2020-08-26 16:31 更新
基礎(chǔ)庫 3.120.1 開始支持,低版本需做兼容處理。

解釋: 錄音中斷結(jié)束事件。在收到 interruptionBegin 事件之后,小程序內(nèi)所有錄音會暫停,收到此事件之后才可再次錄音成功。Web 態(tài)說明: Web 態(tài)環(huán)境不支持錄音相關(guān)功能,該事件不會觸發(fā)。

方法參數(shù)

Function callback

示例 

在開發(fā)者工具中打開


圖片示例

代碼示例

Page({
    RecorderManagerStart() {
        const recorderManager = swan.getRecorderManager()
        const options = {
            duration: 10000,
            sampleRate: 44100,
            numberOfChannels: 1,
            encodeBitRate: 96000,
            format: 'aac'
        };
        recorderManager.onInterruptionEnd(function(res) {
            console.log('recorder onInterruptionEnd', res)
            swan.showModal({
                title: 'success',
                content: 'recorder onInterruptionEnd'
            })
        });
        recorderManager.start(options);
        this.recorderManager = recorderManager;
    }
});


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號