diff --git a/example/ios/Podfile b/example/ios/Podfile index 6b92776..b865af3 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -4,8 +4,8 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ platform :ios, '14.7' target 'BigBlueButtonMobileSdkBroadcastExample' do - pod 'bigbluebutton-mobile-sdk-common', :path => '../../common' - pod 'bigbluebutton-mobile-sdk-broadcast-upload-extension', :path => '../../broadcast-upload-extension' + pod 'bigbluebutton-mobile-sdk-common', :path => '../../ios-common' + pod 'bigbluebutton-mobile-sdk-broadcast-upload-extension', :path => '../../ios-broadcast-upload-extension' end target 'BigbluebuttonMobileSdkExample' do @@ -14,7 +14,7 @@ target 'BigbluebuttonMobileSdkExample' do use_react_native!(:path => config["reactNativePath"]) pod 'bigbluebutton-mobile-sdk', :path => '../..' - pod 'bigbluebutton-mobile-sdk-common', :path => '../../common' + pod 'bigbluebutton-mobile-sdk-common', :path => '../../ios-common' # Enables Flipper. # diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 810a709..a3206fc 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -261,8 +261,8 @@ PODS: DEPENDENCIES: - bigbluebutton-mobile-sdk (from `../..`) - - bigbluebutton-mobile-sdk-broadcast-upload-extension (from `../../broadcast-upload-extension`) - - bigbluebutton-mobile-sdk-common (from `../../common`) + - bigbluebutton-mobile-sdk-broadcast-upload-extension (from `../../ios-broadcast-upload-extension`) + - bigbluebutton-mobile-sdk-common (from `../../ios-common`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) @@ -302,9 +302,9 @@ EXTERNAL SOURCES: bigbluebutton-mobile-sdk: :path: "../.." bigbluebutton-mobile-sdk-broadcast-upload-extension: - :path: "../../broadcast-upload-extension" + :path: "../../ios-broadcast-upload-extension" bigbluebutton-mobile-sdk-common: - :path: "../../common" + :path: "../../ios-common" DoubleConversion: :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" FBLazyVector: @@ -394,6 +394,6 @@ SPEC CHECKSUMS: WebRTC-lib: 508fe02efa0c1a3a8867082a77d24c9be5d29aeb Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6 -PODFILE CHECKSUM: f1ee5698b5774661de3a42d8c9f39f10a1cfd1b3 +PODFILE CHECKSUM: 1cef60f4fb4cef93dc6de3cb3b53463e5f48a9bc COCOAPODS: 1.11.2 diff --git a/broadcast-upload-extension/ios/Classes/BBBSampleHandler.swift b/ios-broadcast-upload-extension/Classes/BBBSampleHandler.swift similarity index 100% rename from broadcast-upload-extension/ios/Classes/BBBSampleHandler.swift rename to ios-broadcast-upload-extension/Classes/BBBSampleHandler.swift diff --git a/broadcast-upload-extension/bigbluebutton-mobile-sdk-broadcast-upload-extension.podspec b/ios-broadcast-upload-extension/bigbluebutton-mobile-sdk-broadcast-upload-extension.podspec similarity index 100% rename from broadcast-upload-extension/bigbluebutton-mobile-sdk-broadcast-upload-extension.podspec rename to ios-broadcast-upload-extension/bigbluebutton-mobile-sdk-broadcast-upload-extension.podspec diff --git a/common/ios/Classes/BBBSharedData.swift b/ios-common/Classes/BBBSharedData.swift similarity index 100% rename from common/ios/Classes/BBBSharedData.swift rename to ios-common/Classes/BBBSharedData.swift diff --git a/common/ios/Classes/UserDefaults.swift b/ios-common/Classes/UserDefaults.swift similarity index 100% rename from common/ios/Classes/UserDefaults.swift rename to ios-common/Classes/UserDefaults.swift diff --git a/common/ios/Classes/WebRTCClient.swift b/ios-common/Classes/WebRTCClient.swift similarity index 94% rename from common/ios/Classes/WebRTCClient.swift rename to ios-common/Classes/WebRTCClient.swift index ab3e3ce..58764c5 100644 --- a/common/ios/Classes/WebRTCClient.swift +++ b/ios-common/Classes/WebRTCClient.swift @@ -48,7 +48,8 @@ final class WebRTCClient: NSObject { config.sdpSemantics = .unifiedPlan // gatherContinually will let WebRTC to listen to any network changes and send any new candidates to the other client - config.continualGatheringPolicy = .gatherContinually + // gatherOnce will get candidates only on beginning (this is how BBB expect to have it for now, so we use this one) + config.continualGatheringPolicy = .gatherOnce // Define media constraints. DtlsSrtpKeyAgreement is required to be true to be able to connect with web browsers. let constraints = RTCMediaConstraints(mandatoryConstraints: nil, @@ -61,8 +62,8 @@ final class WebRTCClient: NSObject { self.peerConnection = peerConnection super.init() - createMediaSenders() - configureAudioSession() + // createMediaSenders() + // configureAudioSession() self.peerConnection.delegate = self } @@ -88,13 +89,13 @@ final class WebRTCClient: NSObject { // MARK: Media - func push(videoFrame: RTCVideoFrame) { + /*func push(videoFrame: RTCVideoFrame) { guard videoCapturer != nil, videoSource != nil else { return } videoSource!.capturer(videoCapturer!, didCapture: videoFrame) print("RTCVideoFrame pushed to server.") - } + }*/ - private func configureAudioSession() { + /*private func configureAudioSession() { self.rtcAudioSession.lockForConfiguration() do { try self.rtcAudioSession.setCategory(AVAudioSession.Category.playAndRecord.rawValue) @@ -103,9 +104,9 @@ final class WebRTCClient: NSObject { debugPrint("Error changing AVAudioSession category: \(error)") } self.rtcAudioSession.unlockForConfiguration() - } + }*/ - private func createMediaSenders() { + /*private func createMediaSenders() { let streamId = "stream" // Audio @@ -116,23 +117,23 @@ final class WebRTCClient: NSObject { let videoTrack = self.createVideoTrack() self.localVideoTrack = videoTrack self.peerConnection.add(videoTrack, streamIds: [streamId]) - } + }*/ - private func createAudioTrack() -> RTCAudioTrack { + /*private func createAudioTrack() -> RTCAudioTrack { let audioConstrains = RTCMediaConstraints(mandatoryConstraints: nil, optionalConstraints: nil) let audioSource = WebRTCClient.factory.audioSource(with: audioConstrains) let audioTrack = WebRTCClient.factory.audioTrack(with: audioSource, trackId: "audio0") return audioTrack - } + }*/ - private func createVideoTrack() -> RTCVideoTrack { + /*private func createVideoTrack() -> RTCVideoTrack { videoSource = WebRTCClient.factory.videoSource(forScreenCast: true) videoCapturer = RTCVideoCapturer(delegate: videoSource!) videoSource!.adaptOutputFormat(toWidth: 600, height: 800, fps: 15) let videoTrack = WebRTCClient.factory.videoTrack(with: videoSource!, trackId: "video0") videoTrack.isEnabled = true return videoTrack - } + }*/ } // MARK: RTCPeerConnectionDelegate Methods diff --git a/common/README.md b/ios-common/README.md similarity index 100% rename from common/README.md rename to ios-common/README.md diff --git a/common/bigbluebutton-mobile-sdk-common.podspec b/ios-common/bigbluebutton-mobile-sdk-common.podspec similarity index 100% rename from common/bigbluebutton-mobile-sdk-common.podspec rename to ios-common/bigbluebutton-mobile-sdk-common.podspec