-
Notifications
You must be signed in to change notification settings - Fork 27
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: use the shared sfu call object in react native #60
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # packages/client/src/rtc/Call.ts # packages/react-native-dogfood/src/components/Meeting/Meeting.tsx # packages/react-native-dogfood/src/contexts/AppContext.tsx # packages/react-native-dogfood/src/hooks/useCreateStreamVideoClient.ts
…use global polyfilling
# Conflicts: # packages/client/src/rtc/Call.ts
oliverlaz
reviewed
Nov 9, 2022
szuperaz
approved these changes
Nov 9, 2022
oliverlaz
approved these changes
Nov 9, 2022
ANDROID ONLY - I found a bug:
|
vanGalilea
reviewed
Nov 10, 2022
Comment on lines
+1
to
+12
diff --git a/src/RTCPeerConnection.ts b/src/RTCPeerConnection.ts | ||
index 20de0069ce6137c1a10f65c2164084cf124c7ffe..46d89f399f65af135789b23ecd51258ce9df94f7 100644 | ||
--- a/src/RTCPeerConnection.ts | ||
+++ b/src/RTCPeerConnection.ts | ||
@@ -497,6 +497,7 @@ export default class RTCPeerConnection extends defineCustomEventTarget(...PEER_C | ||
|
||
if (oldTransceiver) { | ||
transceiver = oldTransceiver; | ||
+ transceiver._receiver._track = new MediaStreamTrack(transceiver._receiver._track); | ||
track = transceiver._receiver._track; | ||
transceiver._mid = ev.transceiver.mid; | ||
transceiver._currentDirection = ev.transceiver.currentDirection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's create a PR in the RN webrtc lib.
vanGalilea
approved these changes
Nov 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Known issues
joinWithCombinedStream
andpublishWithCombinedStream
are temporary methods added to the SDK until we work on splitting audio and video streams on react-native.How to test the react-native app
Connect your android device or ios device with USB to your machine. Don't use emulators as video streams are not sent from there.
You need Xcode installed for iOS and/or Android SDK for running Android. Details: https://reactnative.dev/docs/environment-setup
Note: Running on iOS device may be prompt you with signing problems (contact me if so)
yarn
, there is a manual patch that needs to be installed.yarn build:client
to build the js clientcd packages/react-native-dogfood/
npx pod-install
adb reverse tcp:8081 tcp:8081
to connect device.npm install -g ios-deploy && npx react-native run-ios --device
for iOS and/oryarn start android
to run the app on your deviceOpen a call in the web dogfood app. Enter the same call-id on the react native app. You should receive the video streams on both sides 🤞