File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ function MeetingButton() {
1313 const { isOnGoing, setIsOnGoing } = MeetingContext ;
1414
1515 const onClick = ( ) => {
16- if ( isOnGoing ) {
17- socket . emit ( 'bye' ) ;
18- }
1916 if ( isOnGoing ) {
2017 socket . emit ( 'bye' ) ;
2118 }
Original file line number Diff line number Diff line change @@ -3,4 +3,5 @@ export default {
33 GITHUB_CLIENT_SECRET : import . meta. env . VITE_GITHUB_CLIENT_SECRET ,
44 SERVER_PATH : import . meta. env . VITE_SERVER_PATH ,
55 SERVER_URL : import . meta. env . VITE_SERVER_URL ,
6+ WEBRTC_VIDEO_BITRATE : import . meta. env . VITE_WEBRTC_VIDEO_BITRATE ,
67} ;
Original file line number Diff line number Diff line change 11import { WORKSPACE_EVENT } from '@wabinar/constants/socket-message' ;
2+ import env from 'config' ;
23import { Socket } from 'socket.io-client' ;
34
45type onMediaConnectedCb = ( socketId : string , remoteStream : MediaStream ) => void ;
56type onMediaDisconnectedCb = ( socketId : string ) => void ;
67
78class RTC {
8- static BITRATE = 30000 ;
9+ static BITRATE = Number ( env . WEBRTC_VIDEO_BITRATE ) ;
910 private socket : Socket ;
1011 private iceServerUrls : string [ ] ;
1112 private userMediaStream : MediaStream ;
@@ -108,6 +109,8 @@ class RTC {
108109 const answer = await pc . createAnswer ( ) ;
109110 await pc . setLocalDescription ( answer ) ;
110111
112+ this . #setVideoBitrate( pc , RTC . BITRATE ) ;
113+
111114 this . socket . emit ( WORKSPACE_EVENT . SEND_ANSWER , answer , remoteSocketId ) ;
112115 } ,
113116 ) ;
@@ -121,6 +124,8 @@ class RTC {
121124 }
122125
123126 await pc . setRemoteDescription ( answer ) ;
127+
128+ this . #setVideoBitrate( pc , RTC . BITRATE ) ;
124129 } ,
125130 ) ;
126131
You can’t perform that action at this time.
0 commit comments