-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor websockets and other membranewebrtc remains #70
Conversation
@@ -57,8 +57,11 @@ target 'FishjamExample' do | |||
:mac_catalyst_enabled => false | |||
) | |||
end | |||
pod 'FishjamClient', :git => 'https://github.com/fishjam-dev/ios-client-sdk.git', :commit => '9d22ecaf75cc563a24212c13e15cd83a3f76ac0f' |
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.
Before merging it should be changed to some semantic versioned version.
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.
We should figure out some better way to sync our three libraries together...
end | ||
|
||
|
||
|
||
target 'ScreenBroadcast' do |
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.
same as above
ios/RNFishjamClientModule.swift
Outdated
self.sendEvent(eventName, data) | ||
} | ||
|
||
AsyncFunction("create") { | ||
try membraneWebRTC.create() | ||
AsyncFunction("connect") { (url: String, peerToken: String, promise: Promise ) in |
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.
why connect does not now take endpont metadata as an argument?
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.
old membrane webrtc was really a RTC Engine client so:
- the user took care of connecting to the websocket (or something else - it's up to the user)
- connect function took endpoint metadata and it was joining to the room
Now that we have only fishjam client user no longer needs to care about websockets - we do it for them
So: - the connect function connects to the websocket and authenticates so it takes url and peerToken
- the joinRoom function is like the old connect function and joins the room with peer metadata
example/hooks/useJoinRoom.ts
Outdated
@@ -1,6 +1,6 @@ | |||
import { | |||
useCamera, | |||
useFishjamClient, | |||
joinRoom as jsJoinRoom, |
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.
Is isJoinRoom
expected name here?
@@ -57,8 +57,11 @@ target 'FishjamExample' do | |||
:mac_catalyst_enabled => false | |||
) | |||
end | |||
pod 'FishjamClient', :git => 'https://github.com/fishjam-dev/ios-client-sdk.git', :commit => '9d22ecaf75cc563a24212c13e15cd83a3f76ac0f' |
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.
We should figure out some better way to sync our three libraries together...
ios/RNFishjamClient.swift
Outdated
try ensureConnected() | ||
membraneRTC?.receiveMediaEvent(mediaEvent: data as SerializedMediaEvent) | ||
|
||
func onSocketClose(code: UInt16, reason: String) { |
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.
I think we still do not have swift-lint
configured for this repo. But in meantime I think you can fix indentations here to match rest of file
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.
Can you restore Podfile
linking to avoid having linked specific commit?
target 'ScreenBroadcast' do | ||
pod 'FishjamClient/Broadcast' | ||
pod 'FishjamClient/Broadcast', :git => 'https://github.com/fishjam-dev/ios-client-sdk.git', :commit => '9d22ecaf75cc563a24212c13e15cd83a3f76ac0f' |
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.
👀
@@ -1,6 +1,6 @@ | |||
import { | |||
useCamera, | |||
useFishjamClient, | |||
joinRoom as fjJoinRoom, |
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.
I still don't like this name 😞 But I guess we have to leave it as it is for now, and maybe update example logic in future to avoid such case.
Maybe we can move useJoinRoom
hook from example to library? 🤔
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.
👍
Description
Refactor websockets and other membranewebrtc remains. So SDK will be fully related to fishjam server, not old membrane code
Motivation and Context
Code cleanup
How has this been tested?
Please describe in detail how you tested your changes. Include details of your
testing environment, devices (ex. Iphone XYZ ios X.X.X & Samsung XYZ android
X.X.X)
Types of changes
not work as expected)
Checklist:
Screenshots (if appropriate)