diff --git a/Package.swift b/Package.swift index 4934fde6b..d01992404 100644 --- a/Package.swift +++ b/Package.swift @@ -31,12 +31,7 @@ let package = Package( "WebRTC", "SwiftProtobuf", "Promises", .product(name: "Logging", package: "swift-log"), ], - path: "Sources", - swiftSettings: [ - // Compiler flags used to completely remove code for specific features to isolate issues. - // Not defining the flag will turn off the feature. - .define("LK_USE_LIVEKIT_WEBRTC_BUILD") - ] + path: "Sources" ), .testTarget( name: "LiveKitTests", diff --git a/Sources/LiveKit/Core/Engine+WebRTC.swift b/Sources/LiveKit/Core/Engine+WebRTC.swift index eb8a51fa4..f738e7cf8 100644 --- a/Sources/LiveKit/Core/Engine+WebRTC.swift +++ b/Sources/LiveKit/Core/Engine+WebRTC.swift @@ -72,13 +72,9 @@ internal extension Engine { static private let encoderFactory: RTCVideoEncoderFactory = { let encoderFactory = VideoEncoderFactory() - #if LK_USE_LIVEKIT_WEBRTC_BUILD return VideoEncoderFactorySimulcast(primary: encoderFactory, fallback: encoderFactory) - #else - return encoderFactory - #endif }() static private let decoderFactory = VideoDecoderFactory() @@ -96,14 +92,9 @@ internal extension Engine { logger.log("Initializing PeerConnectionFactory...", type: Engine.self) - #if LK_USE_LIVEKIT_WEBRTC_BUILD return RTCPeerConnectionFactory(bypassVoiceProcessing: bypassVoiceProcessing, encoderFactory: encoderFactory, decoderFactory: decoderFactory) - #else - return RTCPeerConnectionFactory(encoderFactory: encoderFactory, - decoderFactory: decoderFactory) - #endif }() // forbid direct access @@ -120,11 +111,7 @@ internal extension Engine { } static func createVideoSource(forScreenShare: Bool) -> RTCVideoSource { - #if LK_USE_LIVEKIT_WEBRTC_BUILD DispatchQueue.webRTC.sync { peerConnectionFactory.videoSource(forScreenCast: forScreenShare) } - #else - DispatchQueue.webRTC.sync { peerConnectionFactory.videoSource() } - #endif } static func createVideoTrack(source: RTCVideoSource) -> RTCVideoTrack {