You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

functions.js 613B

12345678910111213141516
  1. /**
  2. * Determines whether a specific videoTrack should be rendered.
  3. *
  4. * @param {Track} videoTrack - The video track which is to be rendered.
  5. * @param {boolean} waitForVideoStarted - True if the specified videoTrack
  6. * should be rendered only after its associated video has started;
  7. * otherwise, false.
  8. * @returns {boolean} True if the specified videoTrack should be renderd;
  9. * otherwise, false.
  10. */
  11. export function shouldRenderVideoTrack(videoTrack, waitForVideoStarted) {
  12. return (
  13. videoTrack
  14. && !videoTrack.muted
  15. && (!waitForVideoStarted || videoTrack.videoStarted));
  16. }