Skip to content

Conversation

@anna1901
Copy link
Contributor

Description

Override types related to MediaStream to include MediaStream from RN.

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)

@linear
Copy link

linear bot commented Jan 21, 2026

Copy link
Contributor

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 overrides TypeScript type definitions for MediaStream-related types in the mobile client to use the React Native WebRTC MediaStream type instead of the standard web MediaStream type. This fixes type inconsistencies where the mobile client was using MediaStreamWithURL interface workarounds.

Changes:

  • Overrides return types of hooks (useCamera, useMicrophone, useLivestreamViewer, useLivestreamStreamer, usePeers) to use RNMediaStream
  • Redefines types (Track, PeerWithTracks, StreamerInputs, ConnectStreamerConfig, UseLivestreamViewerResult) to use RNMediaStream
  • Removes MediaStreamWithURL interface workarounds from example files
  • Adds entry point configuration to video-player example app

Reviewed changes

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

Show a summary per file
File Description
packages/mobile-client/src/index.ts Overrides hook return types and redefines types to use React Native MediaStream instead of web MediaStream
examples/mobile-client/video-player/package.json Adds main entry point configuration
examples/mobile-client/video-player/index.js Creates entry point file that registers the root component
examples/mobile-client/video-player/app.json Adds main entry point to Expo configuration
examples/mobile-client/video-player/components/FishjamPlayerViewer.tsx Removes MediaStreamWithURL workaround, uses proper types
examples/mobile-client/video-player/components/FishjamPlayerStreamer.tsx Removes MediaStreamWithURL workaround, uses proper types
examples/mobile-client/minimal-react-native/components/VideosGridItem.tsx Removes MediaStreamWithURL workaround, removes TODOs, adds mirror prop
examples/mobile-client/fishjam-chat/components/VideosGrid.tsx Removes MediaStreamWithURL workaround, adds mirror prop
examples/mobile-client/fishjam-chat/app/room/preview.tsx Removes MediaStreamWithURL workaround, removes unused videoRoomEnv parameter
examples/mobile-client/fishjam-chat/app/livestream/viewer.tsx Adds mirror prop to RTCView
examples/mobile-client/fishjam-chat/app/livestream/streamer.tsx Removes MediaStreamWithURL workaround
examples/mobile-client/fishjam-chat/app/(tabs)/room.tsx Removes videoRoomEnv from navigation params

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

@MiloszFilimowski MiloszFilimowski force-pushed the FCE-2487/override-mediastream branch from cbc5eae to ef9295b Compare January 21, 2026 15:54
@MiloszFilimowski MiloszFilimowski merged commit 47182ee into main Jan 21, 2026
2 checks passed
@MiloszFilimowski MiloszFilimowski deleted the FCE-2487/override-mediastream branch January 21, 2026 20:38
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