This commit is contained in:
zhutao
2025-12-01 16:00:16 +08:00
parent c67bc730af
commit f5ce40063f
14 changed files with 66 additions and 31 deletions

View File

@@ -54,15 +54,18 @@ class TeacherVideo extends StatelessWidget {
Positioned(
top: 30,
left: 10,
child: Container(
width: 200,
color: Colors.black,
child: AspectRatio(
aspectRatio: 16 / 9,
child: AgoraVideoView(
controller: VideoViewController(
rtcEngine: vm.engine!,
canvas: const VideoCanvas(uid: 0),
child: Visibility(
visible: !vm.cameraClose,
child: Container(
width: 200,
color: Colors.black,
child: AspectRatio(
aspectRatio: 16 / 9,
child: AgoraVideoView(
controller: VideoViewController(
rtcEngine: vm.engine!,
canvas: const VideoCanvas(uid: 0),
),
),
),
),

View File

@@ -103,6 +103,7 @@ class StuRoomVM extends ChangeNotifier {
//启动连接
await _ws.connect();
//
_sub?.cancel();
_sub = _ws.stream.listen((msg) {
//自习室人员变化,同时也设置房间是否开了
if (msg.event == RoomEvent.changeUser) {