先采集再加入频道
This commit is contained in:
parent
136a3f023a
commit
05fb261275
|
|
@ -118,12 +118,12 @@ const Meeting: React.FC = () => {
|
|||
if (isInit) {
|
||||
let userInfo = JSON.parse(storage.getItem('user') as string)
|
||||
agora.init()
|
||||
agora.setCameraCapture(VideoSourceType.VideoSourceCameraPrimary)
|
||||
agora.setJoinChannel({
|
||||
channelId: state.channelId,
|
||||
userid: userInfo.account,
|
||||
token: state.token,
|
||||
})
|
||||
agora.setCameraCapture(VideoSourceType.VideoSourceCameraPrimary)
|
||||
setCurrentVideoId(userInfo.account)
|
||||
setUser(userInfo)
|
||||
setIsInit(false)
|
||||
|
|
|
|||
|
|
@ -153,8 +153,8 @@ const agora = {
|
|||
rtcEngine.muteLocalVideoStream(mute)
|
||||
},
|
||||
// 摄像头采集
|
||||
setCameraCapture: (sourceType: number) => {
|
||||
rtcEngine.startCameraCapture(VideoSourceType.VideoSourceCamera, {})
|
||||
setCameraCapture:async (sourceType: number) => {
|
||||
await rtcEngine.startCameraCapture(VideoSourceType.VideoSourceCamera, {})
|
||||
},
|
||||
// 加入频道
|
||||
setJoinChannel: (data: any) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue