Skip to content

fix: viewer livestream muting issue in SDK #1882

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

santhoshvai
Copy link
Member

@santhoshvai santhoshvai commented Aug 8, 2025

💡 Overview

This pull request updates the livestream viewer and layout components to improve audio muting and video dimension handling, while simplifying the way livestream calls are rendered in the sample app. The most important changes are grouped below:

Audio Muting Logic Improvements:

  • The ViewerLivestreamControls component now mutes/unmutes the dominant speaker's audio by adjusting the audio track volume directly, instead of toggling the speakerphone via InCallManager. This provides more precise control over audio muting in livestreams. [1] [2] [3]

Livestream Layout and Video Dimension Handling:

  • The LivestreamLayout component now uses a new VideoTrackDimensionsRenderLessComponent that leverages the useTrackDimensions hook to accurately track and update video dimensions for both the presenter (during screen share) and the current speaker. This replaces the previous approach based on call stats reports. [1] [2] [3] [4]
  • The logic for setting the objectFit property on VideoRenderer has been simplified, and the property is now consistently passed for both presenter and current speaker video tracks. [1] [2]

Sample App Simplification:

  • The sample app's ViewLiveStreamChildren component no longer manually creates and manages the call object, and instead directly renders the LivestreamPlayer component, reducing complexity.

# Conflicts:
#	packages/react-native-sdk/src/components/Livestream/LivestreamControls/ViewerLivestreamControls.tsx
@santhoshvai santhoshvai self-assigned this Aug 8, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request fixes audio muting issues in the livestream viewer by changing how audio control works and improves video dimension tracking for better layout handling.

  • Audio muting now controls the volume of the dominant speaker's audio track directly instead of using InCallManager for speakerphone control
  • Video dimension tracking is improved using a new hook-based approach that tracks dimensions per participant and track type
  • Sample app is simplified by removing manual call object creation and management

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
ViewLiveStream.tsx Simplifies component by removing manual call creation and directly rendering LivestreamPlayer
LivestreamLayout.tsx Replaces stats-based dimension tracking with hook-based approach and adds objectFit to all VideoRenderer instances
ViewerLivestreamControls.tsx Changes audio muting from InCallManager speakerphone control to direct audio track volume manipulation

@santhoshvai santhoshvai requested a review from oliverlaz August 8, 2025 15:42
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.

2 participants