jackson 11 сар өмнө
parent
commit
db67f6524d

+ 3 - 1
example/src/RoomPage.tsx

@@ -59,6 +59,7 @@ export const RoomPage = () => {
       const msg = encoder.encode(textField.value);
       currentRoom.localParticipant.publishData(msg, 0);
       chat.innerHTML += `<div style="color:yellow">${currentRoom.localParticipant.identity} (me): ${textField.value}</div>`;
+      chat.scrollTop = chat.scrollHeight;
       textField.value = '';
     }
   };
@@ -70,6 +71,7 @@ export const RoomPage = () => {
       from = participant.identity;
     }
     chat.innerHTML += `<div>${from}: ${str}</div>`;
+    chat.scrollTop = chat.scrollHeight;
   };
   // 新增代码结束
 
@@ -78,7 +80,7 @@ export const RoomPage = () => {
       <div className="video-chat">
         <div className="roomContainer">
           <div className="topBar">
-            <h2>LiveKit Video</h2>
+            <h2>Zoom Video</h2>
             <div className="right">
               <div>
                 <input