Skip to main content
Version: 1.x

Taro.stopVoice()

结束播放语音。

示例代码

import Taro from '@tarojs/taro'

Taro.startRecord(params)
.then(res => {
const filePath = res.tempFilePath
Taro.playVoice({ filePath })

setTimeout(Taro.stopVoice, 5000)
})

API支持度

API微信小程序H5React Native支付宝小程序百度小程序
Taro.stopVoice✔️