const TUICallKit = uni.requireNativePlugin('TencentCloud-TUICallKit');const tempFilePath = './static/rain.mp3'; // Locally stored audio fileslet musicFilePath = '';uni.saveFile({tempFilePath: tempFilePath,success: (res) => {console.warn(JSON.stringify(res));musicFilePath = res.savedFilePath;musicFilePath = plus.io.convertLocalFileSystemURL(musicFilePath);// Set ringtoneTUICallKit.setCallingBell(musicFilePath, (res) => {if (res.code === 0) {console.log('setCallingBell success');} else {console.log(`setCallingBell failed, error message = ${res.msg}`);}});},fail: (err) => {console.error(err);},});
const TUICallKit = uni.requireNativePlugin('TencentCloud-TUICallKit');const enable = true;TUICallKit.enableMuteMode(enable);
Feedback