@@ -55,6 +55,8 @@ let roomId: string;
5555let openIdToken : IOpenIDCredentials ;
5656let roomName : string ;
5757let startAudioOnly : boolean ;
58+ let startWithAudioMuted : boolean | undefined ;
59+ let startWithVideoMuted : boolean | undefined ;
5860let isVideoChannel : boolean ;
5961let supportsScreensharing : boolean ;
6062let language : string ;
@@ -80,6 +82,13 @@ const setupCompleted = (async (): Promise<string | void> => {
8082 }
8183 return vals [ 0 ] ;
8284 } ;
85+ const parseBooleanOrUndefined = ( value : string | undefined ) : boolean | undefined => {
86+ if ( value === undefined ) {
87+ return undefined ;
88+ }
89+
90+ return value === "true" ;
91+ } ;
8392
8493 // If we have these params, expect a widget API to be available (ie. to be in an iframe
8594 // inside a matrix client). Otherwise, assume we're on our own, eg. have been popped
@@ -197,6 +206,8 @@ const setupCompleted = (async (): Promise<string | void> => {
197206 roomId = qsParam ( "roomId" , true ) ;
198207 roomName = qsParam ( "roomName" , true ) ;
199208 startAudioOnly = qsParam ( "isAudioOnly" , true ) === "true" ;
209+ startWithAudioMuted = parseBooleanOrUndefined ( qsParam ( "startWithAudioMuted" , true ) ) ;
210+ startWithVideoMuted = parseBooleanOrUndefined ( qsParam ( "startWithVideoMuted" , true ) ) ;
200211 isVideoChannel = qsParam ( "isVideoChannel" , true ) === "true" ;
201212 supportsScreensharing = qsParam ( "supportsScreensharing" , true ) === "true" ;
202213
@@ -388,8 +399,8 @@ function joinConference(audioInput?: string | null, videoInput?: string | null):
388399 configOverwrite : {
389400 subject : roomName ,
390401 startAudioOnly,
391- startWithAudioMuted : audioInput === null ,
392- startWithVideoMuted : videoInput === null ,
402+ startWithAudioMuted : audioInput === null ? true : startWithAudioMuted ,
403+ startWithVideoMuted : videoInput === null ? true : startWithVideoMuted ,
393404 // Request some log levels for inclusion in rageshakes
394405 // Ideally we would capture all possible log levels, but this can
395406 // cause Jitsi Meet to try to post various circular data structures
0 commit comments