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

feat: add audio output level controls #831

Closed
wants to merge 32 commits into from

Conversation

MartinCupela
Copy link
Contributor

@MartinCupela MartinCupela commented Jul 20, 2023

Goal

Start tracking the audio output level in a call.

Specification

Client

  • The level is tracked on a Call level state as well as for each participant.
  • The value is in range 0 - 1.
  • The default audio output level value is set to 1.
  • Call class exposes method to change the audio output level for a specific participant or for all participants and the default.
  • To determine the audio output level for a audio element, use condition participant.audioOutputLevel ?? masterAudioOutputLevel

Bindings

  • A new hook useMasterAudioOutputLevel has been added. The value emitted by this hook is a fallback, if StreamVideoParticipant.audioOutputLevel is undefined.

React SDK

  • Audio component now accepts optional volume prop that changes the volume of the underlying audio element
  • AudioOutputLevelSlider component has been added to control the level of audio output + its styles in styling package. The slider is draggable.
  • ToggleAudioOutputButton has been enabled to turn on and off the audio output for all the users / participants
  • ParticipantsActionsContextMenu allows to change the audio output level for each participant
  • Added useDraggable hook to the SDK hooks

React Dogfood

  • ToggleAudioOutputButton has been added to the MeetingUI
  • AudioOutputLevelSlider has been added to menu for ToggleAudioOutputButton
image image image image image

packages/client/src/store/CallState.ts Outdated Show resolved Hide resolved
packages/client/src/Call.ts Outdated Show resolved Hide resolved
packages/client/src/Call.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@szuperaz szuperaz left a comment

Choose a reason for hiding this comment

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

packages/client/src/Call.ts Outdated Show resolved Hide resolved
packages/client/src/store/CallState.ts Outdated Show resolved Hide resolved
packages/react-bindings/src/hooks/call.ts Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Aug 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

24.6% 24.6% Coverage
0.0% 0.0% Duplication

@oliverlaz oliverlaz deleted the feat/client/audio-output-level branch August 30, 2024 15:07
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.

3 participants