|
@@ -1,3 +1,4 @@
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
import { reactive, ref, Ref } from 'vue'
|
|
|
import * as RongIMLib from '@rongcloud/imlib-next'
|
|
|
import * as RTC from '@rongcloud/plugin-rtc'
|
|
@@ -380,7 +381,11 @@ export const joinRoom = async (roomId: string, type: RTC.RCLivingType, listenEve
|
|
|
*/
|
|
|
|
|
|
export const startLive = async (resetTime = true) => {
|
|
|
- if (runtime.videoStatus !== 'stream') throw Error('当前无视频流')
|
|
|
+ if (runtime.videoStatus !== 'stream') {
|
|
|
+ const errorMessage = '请确定摄像头已经开启'
|
|
|
+ ElMessage.error(errorMessage)
|
|
|
+ throw Error(errorMessage)
|
|
|
+ }
|
|
|
const room = runtime.joinedRoom
|
|
|
if (room) {
|
|
|
// const microphoneAudioTrack = await getTrack('microphone')
|