mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Simplify the code by using a bitfied instead of a couple of boolean flags. This allows us to mute the video from multiple places and only make the unmute effective once they have all unmuted. Alas, this cannot be applied to the web without a massive refactor, because it uses the track muted state as the source of truth instead of the media state.
45 lines
689 B
JavaScript
45 lines
689 B
JavaScript
/**
|
|
* The set of facing modes for camera.
|
|
*
|
|
* @enum {string}
|
|
*/
|
|
export const CAMERA_FACING_MODE = {
|
|
ENVIRONMENT: 'environment',
|
|
USER: 'user'
|
|
};
|
|
|
|
/**
|
|
* The set of media types.
|
|
*
|
|
* @enum {string}
|
|
*/
|
|
export const MEDIA_TYPE = {
|
|
AUDIO: 'audio',
|
|
VIDEO: 'video'
|
|
};
|
|
|
|
/* eslint-disable no-bitwise */
|
|
|
|
/**
|
|
* The types of authorities which may mute/unmute the local video.
|
|
*
|
|
* @enum {number}
|
|
*/
|
|
export const VIDEO_MUTISM_AUTHORITY = {
|
|
AUDIO_ONLY: 1 << 0,
|
|
BACKGROUND: 1 << 1,
|
|
USER: 1 << 2
|
|
};
|
|
|
|
/* eslint-enable no-bitwise */
|
|
|
|
/**
|
|
* The types of video tracks.
|
|
*
|
|
* @enum {string}
|
|
*/
|
|
export const VIDEO_TYPE = {
|
|
CAMERA: 'camera',
|
|
DESKTOP: 'desktop'
|
|
};
|