Skip to content

Commit

Permalink
Use custom WebRTC (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
testableapple authored Dec 4, 2024
1 parent cd5da32 commit 45f8ee2
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@
repositoryURL = "https://github.com/GetStream/stream-video-noise-cancellation-swift";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.9.1;
minimumVersion = 1.0.1;
};
};
40FFDC722B63F767004DA7A2 /* XCRemoteSwiftPackageReference "stream-chat-swiftui" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ fileprivate func content() {
}
}
}

container {
// Get a call object
let call = streamVideo.call(callType: "default", callId: UUID().uuidString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ final class UnsecureRepository: VoIPTokenHandler {
func save(voIPPushToken: String?) {

}

func currentVoIPPushToken() -> String? {
nil
}
Expand Down Expand Up @@ -279,7 +279,7 @@ protocol VoIPTokenHandler {
}

final class CallKitService {

func reportIncomingCall(
callCid: String,
displayName: String,
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.18.0"),
.package(url: "https://github.com/GetStream/stream-video-swift-webrtc.git", exact: "114.5735.08")
.package(url: "https://github.com/GetStream/stream-video-swift-webrtc.git", exact: "125.6422.064")
],
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ final class StreamRTCAudioSession: AudioSessionProtocol {
/// - Parameter mode: The audio mode to set.
/// - Throws: An error if setting the mode fails.
func setMode(_ mode: String) throws {
try source.setMode(mode)
try source.setMode(AVAudioSession.Mode(rawValue: mode))
}

/// Configures the audio category and category options for the session.
Expand All @@ -73,7 +73,7 @@ final class StreamRTCAudioSession: AudioSessionProtocol {
_ category: String,
with categoryOptions: AVAudioSession.CategoryOptions
) throws {
try source.setCategory(category, with: categoryOptions)
try source.setCategory(AVAudioSession.Category(rawValue: category), with: categoryOptions)
}

/// Activates or deactivates the audio session.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class VideoCapturer: CameraVideoCapturing {
#else
let handler = StreamVideoCaptureHandler(source: videoSource, filters: videoFilters)
videoCaptureHandler = handler
videoCapturer = RTCCameraVideoCapturer(delegate: handler)
videoCapturer = RTCCameraVideoCapturer(delegate: handler, captureSession: AVCaptureSession())
checkForBackgroundCameraAccess()
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion StreamVideo-XCFramework.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Pod::Spec.new do |spec|

spec.prepare_command = <<-CMD
mkdir -p Frameworks/
curl -sL "https://github.com/GetStream/stream-video-swift-webrtc/releases/download/114.5735.08/StreamWebRTC.zip" -o Frameworks/StreamWebRTC.zip
curl -sL "https://github.com/GetStream/stream-video-swift-webrtc/releases/download/125.6422.064/StreamWebRTC.xcframework.zip" -o Frameworks/StreamWebRTC.zip
unzip -o Frameworks/StreamWebRTC.zip -d Frameworks/
rm Frameworks/StreamWebRTC.zip
CMD
Expand Down
2 changes: 1 addition & 1 deletion StreamVideo.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Pod::Spec.new do |spec|

spec.prepare_command = <<-CMD
mkdir -p Frameworks/
curl -sL "https://github.com/GetStream/stream-video-swift-webrtc/releases/download/114.5735.08/StreamWebRTC.zip" -o Frameworks/StreamWebRTC.zip
curl -sL "https://github.com/GetStream/stream-video-swift-webrtc/releases/download/125.6422.064/StreamWebRTC.xcframework.zip" -o Frameworks/StreamWebRTC.zip
unzip -o Frameworks/StreamWebRTC.zip -d Frameworks/
rm Frameworks/StreamWebRTC.zip
CMD
Expand Down
2 changes: 1 addition & 1 deletion StreamVideo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8852,7 +8852,7 @@
repositoryURL = "https://github.com/GetStream/stream-video-swift-webrtc";
requirement = {
kind = exactVersion;
version = 114.5735.8;
version = 125.6422.64;
};
};
8423B7542950BB0A00012F8D /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ final class StreamRTCAudioSession_Tests: XCTestCase {

func test_category_returnsCorrectCategory() throws {
rtcAudioSession.lockForConfiguration()
try rtcAudioSession.setCategory(AVAudioSession.Category.playAndRecord.rawValue)
try rtcAudioSession.setCategory(AVAudioSession.Category.playAndRecord)
rtcAudioSession.unlockForConfiguration()

// Then
Expand Down

0 comments on commit 45f8ee2

Please sign in to comment.