This commit is contained in:
parent
b4618bbf38
commit
954da4a220
|
|
@ -14,7 +14,7 @@ import { agora } from '@/utils/package/agora'
|
|||
import { onInvoke, onSignalr, offSignalr, onStart } from '@/utils/package/signalr';
|
||||
import dayjs from 'dayjs';
|
||||
import durationPlugin from 'dayjs/plugin/duration';
|
||||
import { VideoSourceType } from 'agora-electron-sdk';
|
||||
import { VideoSourceType, VideoStreamType } from 'agora-electron-sdk';
|
||||
import Avatar from '@/components/Avatar';
|
||||
import SharedFilesModel from '@/components/SharedFilesModel';
|
||||
import StupWizard from '@/components/StupWizard';
|
||||
|
|
@ -248,6 +248,16 @@ const Meeting: React.FC = () => {
|
|||
}
|
||||
}, [isShare, roomUserList]);
|
||||
|
||||
useEffect(() => {
|
||||
roomUserList.forEach(async (item: any) => {
|
||||
if (item.uid === currentVideoId) {
|
||||
await agora.setRemoteVideoStreamType(item.uid, VideoStreamType.VideoStreamHigh)
|
||||
} else {
|
||||
await agora.setRemoteVideoStreamType(item.uid, VideoStreamType.VideoStreamLow)
|
||||
}
|
||||
});
|
||||
}, [currentVideoId]);
|
||||
|
||||
useEffect(() => {
|
||||
onSignalr(async (item: any) => {
|
||||
switch (item.key) {
|
||||
|
|
|
|||
|
|
@ -129,19 +129,6 @@ export const agora = {
|
|||
// // 用户音量提示回调。
|
||||
onAudioVolumeIndication: async (_connection: any, speakers: any, _speakerNumber: any, _totalVolume: any,) => {
|
||||
await onAudioVolumeIndication(speakers)
|
||||
},
|
||||
onVideoSizeChanged: async (connection: any,
|
||||
sourceType: VideoSourceType,
|
||||
uid: number,
|
||||
width: number,
|
||||
height: number,
|
||||
rotation: number) => {
|
||||
console.log(connection,
|
||||
sourceType,
|
||||
uid,
|
||||
width,
|
||||
height,
|
||||
rotation);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -245,23 +232,13 @@ export const agora = {
|
|||
publishCameraTrack: true,//设置是否发布摄像头采集的视频
|
||||
publishScreenTrack: false,//设置是否发布屏幕采集的视频
|
||||
})
|
||||
// if (bool) {
|
||||
// setTimeout(() => {
|
||||
// rtcEngine.setRemoteVideoStreamType(
|
||||
// Number(option.uid),
|
||||
// VideoStreamType.VideoStreamHigh,
|
||||
// )
|
||||
// console.log(111111);
|
||||
// setTimeout(() => {
|
||||
// rtcEngine.setRemoteVideoStreamType(
|
||||
// Number(option.uid),
|
||||
// VideoStreamType.VideoStreamLow,
|
||||
// )
|
||||
// console.log(222222);
|
||||
// }, 10000);
|
||||
// }, 10000);
|
||||
// // VideoStreamType.VideoStreamHigh,
|
||||
// }
|
||||
},
|
||||
// 设置接收大小流
|
||||
setRemoteVideoStreamType: async (uid: number, type: VideoStreamType) => {
|
||||
await rtcEngine.setRemoteVideoStreamType(
|
||||
Number(uid),
|
||||
type,
|
||||
)
|
||||
},
|
||||
// 共享屏幕单独用户
|
||||
joinChannelEx: async (uid: any) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue