Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.

Implement proper livestream example app#525

Merged
anna1901 merged 2 commits intomainfrom
FCE-2047/fix-videoplayer-example
Dec 3, 2025
Merged

Implement proper livestream example app#525
anna1901 merged 2 commits intomainfrom
FCE-2047/fix-videoplayer-example

Conversation

@anna1901
Copy link
Contributor

@anna1901 anna1901 commented Dec 2, 2025

Description

Improve video-player example app so that it actually allows to stream and view streams.

Motivation and Context

The video-player example was not working. Now it shows how to use livestreaming functionality.

Documentation impact

  • Documentation update required
  • Documentation updated in another PR
  • No documentation update required

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)

Copilot AI review requested due to automatic review settings December 2, 2025 11:36
@linear
Copy link

linear bot commented Dec 2, 2025

Copy link

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 PR refactors the video-player example app to properly demonstrate livestreaming functionality by splitting viewer and streamer capabilities into separate components and adding a UI for switching between modes.

Key Changes:

  • Split monolithic FishjamPlayer component into separate FishjamPlayerViewer and FishjamPlayerStreamer components
  • Added interactive UI with room name input and mode selection (stream vs view)
  • Added required iOS and Android permissions for camera and microphone access

Reviewed changes

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

Show a summary per file
File Description
FishjamPlayerViewer.tsx New component implementing viewer-only functionality for watching livestreams
FishjamPlayerStreamer.tsx New component implementing streamer functionality for broadcasting livestreams
FishjamPlayer.tsx Original component removed and functionality split into viewer/streamer components
app.json Added camera/microphone permissions for iOS and Android platforms
App.tsx Updated with new UI for room selection and toggling between streamer/viewer modes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 55 to 63
export default FishjamPlayerViewer;

const styles = StyleSheet.create({
playerContentContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
}
});
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

The styles constant is defined after the component export. Move the StyleSheet definition before the component export statement (line 55) to follow conventional component organization patterns where constants are defined before exports.

Suggested change
export default FishjamPlayerViewer;
const styles = StyleSheet.create({
playerContentContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
}
});
const styles = StyleSheet.create({
playerContentContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
}
});
export default FishjamPlayerViewer;

Copilot uses AI. Check for mistakes.
const { streamerToken } = await getSandboxLivestream(roomName, false);
await connect(streamerToken);
} catch (err) {
console.log(err);
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

Error logging uses console.log instead of console.error. Change to console.error(err) to properly categorize error output, matching the pattern used in FishjamPlayerViewer.tsx line 29.

Suggested change
console.log(err);
console.error(err);

Copilot uses AI. Check for mistakes.
"NSAllowsArbitraryLoads": true
},
"NSCameraUsageDescription": "We need to access your camera for video calls.",
"NSMicrophoneUsageDescription": "We need to access your microphone so you can talk during calls.",
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

Removed trailing comma that would cause JSON parsing error in infoPlist configuration.

Suggested change
"NSMicrophoneUsageDescription": "We need to access your microphone so you can talk during calls.",
"NSMicrophoneUsageDescription": "We need to access your microphone so you can talk during calls."

Copilot uses AI. Check for mistakes.
@anna1901 anna1901 merged commit af6bfb9 into main Dec 3, 2025
4 checks passed
@anna1901 anna1901 deleted the FCE-2047/fix-videoplayer-example branch December 3, 2025 11:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments