Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Add muteAudio function to load test JS. (#8802)

Jonathan Lennox226581a81a95
diff --git a/resources/load-test/load-test-participant.js b/resources/load-test/load-test-participant.js
index b7c4a671ac..ddb3508a44 100644
--- a/resources/load-test/load-test-participant.js
+++ b/resources/load-test/load-test-participant.js
@@ -39,6 +39,20 @@ window.APP = {
},
getConnectionState() {
return room && room.getConnectionState();
+ },
+ muteAudio(mute) {
+ // Note: will have no effect if !autoCreateLocalAudio
+ localAudio = mute;
+ for (let i = 0; i < localTracks.length; i++) {
+ if (localTracks[i].getType() === 'audio') {
+ if (mute) {
+ localTracks[i].mute();
+ }
+ else {
+ localTracks[i].unmute();
+ }
+ }
+ }
}
},