jiti-meet/react/features/base/media/functions.js

17 lines
613 B
JavaScript
Raw Normal View History

/**
* Determines whether a specific videoTrack should be rendered.
*
* @param {Track} videoTrack - The video track which is to be rendered.
* @param {boolean} waitForVideoStarted - True if the specified videoTrack
* should be rendered only after its associated video has started;
* otherwise, false.
* @returns {boolean} True if the specified videoTrack should be renderd;
* otherwise, false.
*/
export function shouldRenderVideoTrack(videoTrack, waitForVideoStarted) {
return (
videoTrack
&& !videoTrack.muted
&& (!waitForVideoStarted || videoTrack.videoStarted));
}