You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
707 B

// const app = getApp();
/**
* 自定义铃声混入js
*/
// 语音播报
export function getXT(text) {
const SixUniTts = uni.requireNativePlugin("SmallSix-SixUniTts")
SixUniTts.initSixUniTts()
SixUniTts.startSpeech({ speechText: text })
// console.log('yuyin');
}
/**
* 自定义铃声调用方法
*/
// export function getXT() {
// const innerAudioContext = uni.createInnerAudioContext();
// innerAudioContext.autoplay = true;
// innerAudioContext.src = '/static/cheshi2.mp3'; //铃声文件的路径
// innerAudioContext.onPlay(() => {
// console.log('开始播放');
// });
// innerAudioContext.onError(res => {
// console.log(res.errMsg);
// console.log(res.errCode);
// });
// }