Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show a warning on unencrypted media #1912

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

robintown
Copy link
Member

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aa8ef57) 24.71% compared to head (49a5051) 24.71%.

Additional details and impacted files
@@           Coverage Diff            @@
##           livekit    #1912   +/-   ##
========================================
  Coverage    24.71%   24.71%           
========================================
  Files           48       48           
  Lines         2375     2375           
  Branches       438      438           
========================================
  Hits           587      587           
  Misses        1737     1737           
  Partials        51       51           
Flag Coverage Δ
unittests 24.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fkwp fkwp merged commit 59387e5 into element-hq:livekit Nov 21, 2023
3 checks passed
Comment on lines +129 to +132
const muted = audioInfo.isMuted !== false;
const encrypted =
audioInfo.publication?.isEncrypted !== false &&
videoInfo.publication?.isEncrypted !== false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a matter of style/preference, but I'd prefer to explicitly handle undefined instead of performing a comparison that would "convert" it into boolean.

Suggested change
const muted = audioInfo.isMuted !== false;
const encrypted =
audioInfo.publication?.isEncrypted !== false &&
videoInfo.publication?.isEncrypted !== false;
const muted = audioInfo.isMuted ?? false;
const encrypted =
audioInfo.publication?.isEncrypted ?? false &&
videoInfo.publication?.isEncrypted ?? false;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants