소스 검색

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

master
Saúl Ibarra Corretgé 8 년 전
부모
커밋
f62288ae17
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12
    0
      react/features/base/media/functions.js

+ 12
- 0
react/features/base/media/functions.js 파일 보기

@@ -17,6 +17,18 @@ export function shouldRenderVideoTrack(videoTrack, waitForVideoStarted) {
17 17
             && (!waitForVideoStarted || videoTrack.videoStarted));
18 18
 }
19 19
 
20
+/**
21
+ * Checks if video is currently muted by the audio-only authority.
22
+ *
23
+ * @param {Object} store - The redux store instance.
24
+ * @returns {boolean}
25
+ */
26
+export function isVideoMutedByAudioOnly({ getState }) {
27
+    return Boolean(
28
+        getState()['features/base/media'] // eslint-disable-line no-bitwise
29
+            .video.muted & VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY);
30
+}
31
+
20 32
 /**
21 33
  * Checks if video is currently muted by the user authority.
22 34
  *

Loading…
취소
저장