Просмотр исходного кода

创建了独立的"屏幕分享"区域

yourname 7 месяцев назад
Родитель
Сommit
99e823a453
1 измененных файлов с 11 добавлено и 6 удалено
  1. 11 6
      client/mobile/pages_classroom.tsx

+ 11 - 6
client/mobile/pages_classroom.tsx

@@ -1187,12 +1187,6 @@ export const ClassroomPage = () => {
                   className="w-full h-48 bg-black"
                 ></video>
                 <div className="absolute bottom-2 right-2 flex space-x-2">
-                  <button
-                    onClick={toggleScreenShare}
-                    className={`px-3 py-1 rounded-md ${isScreenSharing ? 'bg-red-600' : 'bg-blue-600'} text-white`}
-                  >
-                    {isScreenSharing ? '停止分享' : '分享屏幕'}
-                  </button>
                   <button
                     onClick={toggleCamera}
                     className={`px-3 py-1 rounded-md ${isCameraOn ? 'bg-red-600' : 'bg-blue-600'} text-white`}
@@ -1215,6 +1209,17 @@ export const ClassroomPage = () => {
               </div>
             </div>
             
+            <div className="mb-4">
+              <h4 className="text-lg font-medium mb-2">屏幕分享</h4>
+              <div className="relative">
+                <video
+                  id="screenPreviewer"
+                  muted
+                  className="w-full h-48 bg-black hidden"
+                ></video>
+              </div>
+            </div>
+
             <div>
               <h4 className="text-lg font-medium mb-2">远程视频</h4>
               <div