diff --git a/.gitignore b/.gitignore index 9a73f4b..c12b0a6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # Xcode build/ +.build/ *.pbxuser !default.pbxuser *.mode1v3 @@ -18,6 +19,8 @@ profile DerivedData *.hmap *.ipa +.swiftpm/ +Package.resolved # Bundler .bundle diff --git a/.travis.yml b/.travis.yml index 757ef56..5d929ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,3 @@ language: objective-c # - pod install --project-directory=Example script: - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/WKWebViewRTC.xcworkspace -scheme WKWebViewRTC-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -- pod lib lint --allow-warnings diff --git a/Example/Podfile b/Example/Podfile deleted file mode 100644 index e1200dc..0000000 --- a/Example/Podfile +++ /dev/null @@ -1,6 +0,0 @@ -use_frameworks! - -target 'WKWebViewRTC_Example' do - pod 'WKWebViewRTC', :path => '../' - -end diff --git a/Example/WKWebViewRTC.xcodeproj/project.pbxproj b/Example/WKWebViewRTC.xcodeproj/project.pbxproj index 4cd1a5e..1ba4319 100644 --- a/Example/WKWebViewRTC.xcodeproj/project.pbxproj +++ b/Example/WKWebViewRTC.xcodeproj/project.pbxproj @@ -13,7 +13,7 @@ 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 7EE10A56265802BC002106AB /* WKWebViewRTC_ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EE10A55265802BC002106AB /* WKWebViewRTC_ExampleTests.swift */; }; - C66545EAFAA6C35DB6CA2184 /* Pods_WKWebViewRTC_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE6027618E5326D15BB46FD8 /* Pods_WKWebViewRTC_Example.framework */; }; + /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -28,8 +28,7 @@ /* Begin PBXFileReference section */ 081BDE7624D12628001896C7 /* WKWebViewRTC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = WKWebViewRTC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0BBF29669602AC4D9879027C /* Pods-WKWebViewRTC_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WKWebViewRTC_Tests.debug.xcconfig"; path = "Target Support Files/Pods-WKWebViewRTC_Tests/Pods-WKWebViewRTC_Tests.debug.xcconfig"; sourceTree = ""; }; - 30FBF30DE83E0C823AB35DF3 /* Pods-WKWebViewRTC_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WKWebViewRTC_Tests.release.xcconfig"; path = "Target Support Files/Pods-WKWebViewRTC_Tests/Pods-WKWebViewRTC_Tests.release.xcconfig"; sourceTree = ""; }; + 607FACD01AFB9204008FA782 /* WKWebViewRTC_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WKWebViewRTC_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -41,11 +40,9 @@ 7EE10A55265802BC002106AB /* WKWebViewRTC_ExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WKWebViewRTC_ExampleTests.swift; sourceTree = ""; }; 7EE10A57265802BC002106AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8AEFE6B0E7BA7E2E33BE4AAE /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - A0EDBD4CCC0BEDDAEE236367 /* Pods-WKWebViewRTC_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WKWebViewRTC_Example.release.xcconfig"; path = "Target Support Files/Pods-WKWebViewRTC_Example/Pods-WKWebViewRTC_Example.release.xcconfig"; sourceTree = ""; }; - B35BA54F2CDD708693E71D05 /* WKWebViewRTC.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = WKWebViewRTC.podspec; path = ../WKWebViewRTC.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - BE6027618E5326D15BB46FD8 /* Pods_WKWebViewRTC_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WKWebViewRTC_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DB050538E6A08CA58E6DAF4E /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; - EE6CE03A4ED4077B0CE8B3D6 /* Pods-WKWebViewRTC_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WKWebViewRTC_Example.debug.xcconfig"; path = "Target Support Files/Pods-WKWebViewRTC_Example/Pods-WKWebViewRTC_Example.debug.xcconfig"; sourceTree = ""; }; + /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -53,7 +50,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C66545EAFAA6C35DB6CA2184 /* Pods_WKWebViewRTC_Example.framework in Frameworks */, + ); runOnlyForDeploymentPostprocessing = 0; }; @@ -70,11 +67,10 @@ 607FACC71AFB9204008FA782 = { isa = PBXGroup; children = ( - 607FACF51AFB993E008FA782 /* Podspec Metadata */, + 607FACF51AFB993E008FA782 /* Package Metadata */, 607FACD21AFB9204008FA782 /* Example for WKWebViewRTC */, 7EE10A54265802BC002106AB /* WKWebViewRTC_ExampleTests */, 607FACD11AFB9204008FA782 /* Products */, - 7D4535BB2E06396403CCBF10 /* Pods */, 9FCA6F8BBA28C27F5334B33B /* Frameworks */, ); sourceTree = ""; @@ -110,25 +106,13 @@ name = "Supporting Files"; sourceTree = ""; }; - 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { + 607FACF51AFB993E008FA782 /* Package Metadata */ = { isa = PBXGroup; children = ( - B35BA54F2CDD708693E71D05 /* WKWebViewRTC.podspec */, 8AEFE6B0E7BA7E2E33BE4AAE /* README.md */, DB050538E6A08CA58E6DAF4E /* LICENSE */, ); - name = "Podspec Metadata"; - sourceTree = ""; - }; - 7D4535BB2E06396403CCBF10 /* Pods */ = { - isa = PBXGroup; - children = ( - EE6CE03A4ED4077B0CE8B3D6 /* Pods-WKWebViewRTC_Example.debug.xcconfig */, - A0EDBD4CCC0BEDDAEE236367 /* Pods-WKWebViewRTC_Example.release.xcconfig */, - 0BBF29669602AC4D9879027C /* Pods-WKWebViewRTC_Tests.debug.xcconfig */, - 30FBF30DE83E0C823AB35DF3 /* Pods-WKWebViewRTC_Tests.release.xcconfig */, - ); - path = Pods; + name = "Package Metadata"; sourceTree = ""; }; 7EE10A54265802BC002106AB /* WKWebViewRTC_ExampleTests */ = { @@ -144,7 +128,6 @@ isa = PBXGroup; children = ( 081BDE7624D12628001896C7 /* WKWebViewRTC.framework */, - BE6027618E5326D15BB46FD8 /* Pods_WKWebViewRTC_Example.framework */, ); name = Frameworks; sourceTree = ""; @@ -156,11 +139,9 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "WKWebViewRTC_Example" */; buildPhases = ( - ACD4151662C2B72D1B85D536 /* [CP] Check Pods Manifest.lock */, 607FACCC1AFB9204008FA782 /* Sources */, 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, - 55107F4E49D480B326A84FA8 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -251,48 +232,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 55107F4E49D480B326A84FA8 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-WKWebViewRTC_Example/Pods-WKWebViewRTC_Example-frameworks.sh", - "${PODS_ROOT}/GoogleWebRTC/Frameworks/frameworks/WebRTC.framework", - "${BUILT_PRODUCTS_DIR}/WKWebViewRTC/WKWebViewRTC.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebRTC.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WKWebViewRTC.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WKWebViewRTC_Example/Pods-WKWebViewRTC_Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - ACD4151662C2B72D1B85D536 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-WKWebViewRTC_Example-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -444,7 +383,6 @@ }; 607FACF01AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EE6CE03A4ED4077B0CE8B3D6 /* Pods-WKWebViewRTC_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = ""; @@ -453,7 +391,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_BUNDLE_IDENTIFIER = "com.combined-public-communications.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.2; @@ -462,7 +400,6 @@ }; 607FACF11AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A0EDBD4CCC0BEDDAEE236367 /* Pods-WKWebViewRTC_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = ""; @@ -471,7 +408,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_BUNDLE_IDENTIFIER = "com.combined-public-communications.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.2; @@ -499,7 +436,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.WKWebViewRTC-ExampleTests.WKWebViewRTC-ExampleTests"; + PRODUCT_BUNDLE_IDENTIFIER = "com.combined-public-communications.WKWebViewRTC-ExampleTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_VERSION = 5.0; @@ -527,7 +464,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.WKWebViewRTC-ExampleTests.WKWebViewRTC-ExampleTests"; + PRODUCT_BUNDLE_IDENTIFIER = "com.combined-public-communications.WKWebViewRTC-ExampleTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/Example/WKWebViewRTC.xcworkspace/contents.xcworkspacedata b/Example/WKWebViewRTC.xcworkspace/contents.xcworkspacedata index 51009a9..266c202 100644 --- a/Example/WKWebViewRTC.xcworkspace/contents.xcworkspacedata +++ b/Example/WKWebViewRTC.xcworkspace/contents.xcworkspacedata @@ -4,7 +4,5 @@ - - + diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..e269ea7 --- /dev/null +++ b/Package.swift @@ -0,0 +1,41 @@ +// swift-tools-version: 5.9 +import PackageDescription + +let package = Package( + name: "WKWebViewRTC", + platforms: [ + .iOS(.v13) // Bundle.module requires iOS 13+ + ], + products: [ + .library( + name: "WKWebViewRTC", + targets: ["WKWebViewRTC"] + ), + ], + dependencies: [ + .package( + url: "https://github.com/stasel/WebRTC.git", + .upToNextMajor(from: "125.0.0") + ), + ], + targets: [ + .target( + name: "WKWebViewRTC", + dependencies: [ + .product(name: "WebRTC", package: "WebRTC") + ], + path: "WKWebViewRTC", + exclude: [ + "Assets", // empty, .gitkeep only + "Js/src", // 25 JS source files not needed in binary + "Js/package.json" // Node.js build config, not needed + // Js/.gitignore is a hidden file; SPM ignores it automatically + // Classes/.gitkeep is a hidden file; SPM ignores it automatically + ], + sources: ["Classes"], + resources: [ + .process("Js/jsWKWebViewRTC.js") // 141 KB compiled JS bridge + ] + ), + ] +) diff --git a/README.md b/README.md index fdd2e24..7b023a4 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,14 @@ # WKWebViewRTC -[![CI Status](https://img.shields.io/travis/JustDoIt9/WKWebViewRTC.svg?style=flat)](https://travis-ci.org/JustDoIt9/WKWebViewRTC) -[![Version](https://img.shields.io/cocoapods/v/WKWebViewRTC.svg?style=flat)](https://cocoapods.org/pods/WKWebViewRTC) -[![License](https://img.shields.io/cocoapods/l/WKWebViewRTC.svg?style=flat)](https://cocoapods.org/pods/WKWebViewRTC) -[![Platform](https://img.shields.io/cocoapods/p/WKWebViewRTC.svg?style=flat)](https://cocoapods.org/pods/WKWebViewRTC) +[![License](https://img.shields.io/github/license/OpenTelecom/WKWebViewRTC.svg?style=flat)](LICENSE) +[![Platform](https://img.shields.io/badge/platform-iOS-lightgrey.svg?style=flat)](https://developer.apple.com/ios/) +[![Swift](https://img.shields.io/badge/Swift-5.9-orange.svg?style=flat)](https://swift.org) WebRTC library for WKWebView for Swift on iOS (based on cordova-plugin-iosrtc: https://github.com/cordova-rtc/cordova-plugin-iosrtc) ## Example -To run the example project, clone the repo, and run `pod install` from the Example directory first. +To run the example project, clone the repo and open `Example/WKWebViewRTC.xcworkspace` in Xcode. Xcode will resolve the SPM dependencies automatically. ## Requirements @@ -21,15 +20,14 @@ In order to make this framework run into a iOS application some requirements mus ## Installation -WKWebViewRTC is available through [CocoaPods](https://cocoapods.org). To install -it, simply add the following line to your Podfile: +WKWebViewRTC is available via [Swift Package Manager](https://swift.org/package-manager/). Add it to your project in Xcode via **File → Add Package Dependencies**, or add it to your `Package.swift`: -```ruby -pod 'WKWebViewRTC' +```swift +.package(url: "https://github.com/OpenTelecom/WKWebViewRTC.git", branch: "feature/CPC-12213-update-pod-to-spm") ``` ## Dependencies - * [GoogleWebRTC](https://cocoapods.org/pods/GoogleWebRTC) => v1.1.29229 + * [stasel/WebRTC](https://github.com/stasel/WebRTC) >= 125.0.0 ## Build JS (WKWebViewRTC/Js/jsWKWebViewRTC.js) diff --git a/WKWebViewRTC.podspec b/WKWebViewRTC.podspec deleted file mode 100644 index d5d4dbe..0000000 --- a/WKWebViewRTC.podspec +++ /dev/null @@ -1,38 +0,0 @@ -# -# Be sure to run `pod lib lint WKWebViewRTC.podspec' to ensure this is a -# valid spec before submitting. -# -# Any lines starting with a # are optional, but their use is encouraged -# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html -# - -Pod::Spec.new do |s| - s.name = 'WKWebViewRTC' - s.version = '0.5.1' - s.summary = 'WebRTC library for WKWebView for Swift on iOS' - -# This description is used to generate tags and improve search results. -# * Think: What does it do? Why did you write it? What is the focus? -# * Try to keep it short, snappy and to the point. -# * Write the description between the DESC delimiters below. -# * Finally, don't worry about the indent, CocoaPods strips it! - - s.description = <<-DESC - WebRTC library for WKWebView for Swift on iOS (based on cordova-plugin-iosrtc: https://github.com/cordova-rtc/cordova-plugin-iosrtc) - DESC - - s.homepage = 'https://github.com/OpenTelecom/WKWebViewRTC' - s.license = { :type => 'MIT', :file => 'LICENSE' } - s.author = { 'OpenTelecom' => 'contact@OpenTele.com' } - s.source = { :git => 'https://github.com/OpenTelecom/WKWebViewRTC.git', :tag => s.version.to_s } - - s.swift_version = '4.2' - s.ios.deployment_target = '11.0' - - s.source_files = 'WKWebViewRTC/Classes/**/*' - s.resources = 'WKWebViewRTC/Js/jsWKWebViewRTC.js' - - s.dependency 'GoogleWebRTC', '1.1.29229' - - s.xcconfig = { 'ENABLE_BITCODE' => 'NO', 'ONLY_ACTIVE_ARCH' => 'Yes' } -end diff --git a/WKWebViewRTC/Classes/WKWebViewRTC.swift b/WKWebViewRTC/Classes/WKWebViewRTC.swift index 4c77151..1bc9c3b 100644 --- a/WKWebViewRTC/Classes/WKWebViewRTC.swift +++ b/WKWebViewRTC/Classes/WKWebViewRTC.swift @@ -50,7 +50,7 @@ public class WKWebViewRTC : NSObject { setWebView(webview: wkwebview) - if let path = Bundle(for: type(of: self)).path(forResource: "jsWKWebViewRTC", ofType: "js") { + if let path = Bundle.module.path(forResource: "jsWKWebViewRTC", ofType: "js") { if let bindingJS = try? String(contentsOfFile: path, encoding: .utf8) { let script = WKUserScript(source: bindingJS, injectionTime: .atDocumentStart, forMainFrameOnly: false) self.userContentController?.addUserScript(script) diff --git a/WKWebViewRTC/Classes/iMediaStreamRenderer.swift b/WKWebViewRTC/Classes/iMediaStreamRenderer.swift index eb30109..f632030 100644 --- a/WKWebViewRTC/Classes/iMediaStreamRenderer.swift +++ b/WKWebViewRTC/Classes/iMediaStreamRenderer.swift @@ -21,7 +21,7 @@ class iMediaStreamRenderer : NSObject, RTCVideoViewDelegate { var elementView: UIView var pluginMediaStream: iMediaStream? - var videoView: RTCEAGLVideoView + var videoView: RTCMTLVideoView var rtcAudioTrack: RTCAudioTrack? var rtcVideoTrack: RTCVideoTrack? var pluginVideoTrack: iMediaStreamTrack? @@ -45,7 +45,7 @@ class iMediaStreamRenderer : NSObject, RTCVideoViewDelegate { // The effective video view in which the the video stream is shown. // It's placed over the elementView. - self.videoView = RTCEAGLVideoView() + self.videoView = RTCMTLVideoView() self.videoView.isUserInteractionEnabled = false self.elementView.isUserInteractionEnabled = false @@ -308,7 +308,7 @@ class iMediaStreamRenderer : NSObject, RTCVideoViewDelegate { } /** - * Methods inherited from RTCEAGLVideoViewDelegate. + * Methods inherited from RTCVideoViewDelegate (RTCMTLVideoView). */ func videoView(_ videoView: RTCVideoRenderer, didChangeVideoSize size: CGSize) { diff --git a/WKWebViewRTC/Classes/iRTCPeerConnectionConfig.swift b/WKWebViewRTC/Classes/iRTCPeerConnectionConfig.swift index 3f7edeb..f0195b3 100644 --- a/WKWebViewRTC/Classes/iRTCPeerConnectionConfig.swift +++ b/WKWebViewRTC/Classes/iRTCPeerConnectionConfig.swift @@ -50,7 +50,7 @@ class iRTCPeerConnectionConfig { let sdpSemanticsConfig = pcConfig?.object(forKey: "sdpSemantics") as? String; let sdpSemantics = (sdpSemanticsConfig != nil && allowedSdpSemantics[sdpSemanticsConfig!] != nil) ? - allowedSdpSemantics[sdpSemanticsConfig!] : RTCSdpSemantics.planB + allowedSdpSemantics[sdpSemanticsConfig!] : RTCSdpSemantics.unifiedPlan rtcConfiguration.sdpSemantics = sdpSemantics!;