Skip to content

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

feat(conference): add helper function to check for audio-only muted status

Saúl Ibarra Corretgéf62288ae1723
diff --git a/react/features/base/media/functions.js b/react/features/base/media/functions.js
index cc3d86fa48..f4064ee18a 100644
--- a/react/features/base/media/functions.js
+++ b/react/features/base/media/functions.js
@@ -17,6 +17,18 @@ export function shouldRenderVideoTrack(videoTrack, waitForVideoStarted) {
&& (!waitForVideoStarted || videoTrack.videoStarted));
}
+/**
+ * Checks if video is currently muted by the audio-only authority.
+ *
+ * @param {Object} store - The redux store instance.
+ * @returns {boolean}
+ */
+export function isVideoMutedByAudioOnly({ getState }) {
+ return Boolean(
+ getState()['features/base/media'] // eslint-disable-line no-bitwise
+ .video.muted & VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY);
+}
+
/**
* Checks if video is currently muted by the user authority.
*