视频大小流测试
This commit is contained in:
parent
0cda0e7842
commit
b4618bbf38
|
|
@ -6,7 +6,9 @@ import {
|
||||||
ScreenCaptureSourceType,
|
ScreenCaptureSourceType,
|
||||||
RenderModeType,
|
RenderModeType,
|
||||||
ChannelProfileType,
|
ChannelProfileType,
|
||||||
AudioAinsMode
|
AudioAinsMode,
|
||||||
|
SimulcastStreamMode,
|
||||||
|
VideoStreamType
|
||||||
} from "agora-electron-sdk";
|
} from "agora-electron-sdk";
|
||||||
import { GetRoomRtcToken } from "@/api/Home/Index";
|
import { GetRoomRtcToken } from "@/api/Home/Index";
|
||||||
import { storage } from '@/utils';
|
import { storage } from '@/utils';
|
||||||
|
|
@ -127,6 +129,19 @@ export const agora = {
|
||||||
// // 用户音量提示回调。
|
// // 用户音量提示回调。
|
||||||
onAudioVolumeIndication: async (_connection: any, speakers: any, _speakerNumber: any, _totalVolume: any,) => {
|
onAudioVolumeIndication: async (_connection: any, speakers: any, _speakerNumber: any, _totalVolume: any,) => {
|
||||||
await onAudioVolumeIndication(speakers)
|
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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -209,6 +224,16 @@ export const agora = {
|
||||||
joinChannel: async () => {
|
joinChannel: async () => {
|
||||||
await rtcEngine.enableAudioVolumeIndication(100, 1, true)
|
await rtcEngine.enableAudioVolumeIndication(100, 1, true)
|
||||||
await rtcEngine.joinChannel(option.token, option.channelId, option.uid);
|
await rtcEngine.joinChannel(option.token, option.channelId, option.uid);
|
||||||
|
await rtcEngine.setDualStreamMode(
|
||||||
|
SimulcastStreamMode.EnableSimulcastStream,
|
||||||
|
{
|
||||||
|
dimensions: {
|
||||||
|
width: 160,
|
||||||
|
height: 160
|
||||||
|
},
|
||||||
|
framerate: 5,
|
||||||
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
// 更新频道配置
|
// 更新频道配置
|
||||||
updateChannelMediaOptions: async (bool: boolean) => {
|
updateChannelMediaOptions: async (bool: boolean) => {
|
||||||
|
|
@ -220,6 +245,23 @@ export const agora = {
|
||||||
publishCameraTrack: true,//设置是否发布摄像头采集的视频
|
publishCameraTrack: true,//设置是否发布摄像头采集的视频
|
||||||
publishScreenTrack: false,//设置是否发布屏幕采集的视频
|
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,
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
// 共享屏幕单独用户
|
// 共享屏幕单独用户
|
||||||
joinChannelEx: async (uid: any) => {
|
joinChannelEx: async (uid: any) => {
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,9 @@ export default defineConfig({
|
||||||
ScreenCaptureSourceType,
|
ScreenCaptureSourceType,
|
||||||
VideoSourceType,
|
VideoSourceType,
|
||||||
VideoViewSetupMode,
|
VideoViewSetupMode,
|
||||||
AudioAinsMode
|
AudioAinsMode,
|
||||||
|
SimulcastStreamMode,
|
||||||
|
VideoStreamType
|
||||||
} = require("agora-electron-sdk")
|
} = require("agora-electron-sdk")
|
||||||
export {
|
export {
|
||||||
createAgoraRtcEngine,
|
createAgoraRtcEngine,
|
||||||
|
|
@ -71,7 +73,9 @@ export default defineConfig({
|
||||||
ScreenCaptureSourceType,
|
ScreenCaptureSourceType,
|
||||||
VideoSourceType,
|
VideoSourceType,
|
||||||
VideoViewSetupMode,
|
VideoViewSetupMode,
|
||||||
AudioAinsMode
|
AudioAinsMode,
|
||||||
|
SimulcastStreamMode,
|
||||||
|
VideoStreamType
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue