diff --git a/ApiVideoLiveStream.podspec b/ApiVideoLiveStream.podspec index b4f449d..5dfdb62 100644 --- a/ApiVideoLiveStream.podspec +++ b/ApiVideoLiveStream.podspec @@ -16,14 +16,13 @@ Pod::Spec.new do |spec| spec.author = { "Ecosystem Team" => "ecosystem@api.video" } spec.social_media_url = "https://x.com/api_video" - spec.platform = :ios, "12.0" - spec.ios.deployment_target = "12.0" + spec.ios.deployment_target = "13.0" spec.source = { :git => "https://github.com/apivideo/api.video-swift-live-stream.git", :tag => "v" + spec.version.to_s } spec.source_files = "Sources/**/*.{h,m,swift}" spec.exclude_files = "Sources/Exclude" - spec.dependency "HaishinKit", "1.7.3" + spec.dependency "HaishinKit", "1.8.1" end diff --git a/ApiVideoLiveStream.xcodeproj/project.pbxproj b/ApiVideoLiveStream.xcodeproj/project.pbxproj index 8c08fa4..4b03eec 100644 --- a/ApiVideoLiveStream.xcodeproj/project.pbxproj +++ b/ApiVideoLiveStream.xcodeproj/project.pbxproj @@ -840,7 +840,7 @@ repositoryURL = "https://github.com/shogo4405/HaishinKit.swift"; requirement = { kind = exactVersion; - version = 1.7.3; + version = 1.8.1; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/ApiVideoLiveStream.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ApiVideoLiveStream.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5e75a76..64eebfd 100644 --- a/ApiVideoLiveStream.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ApiVideoLiveStream.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/shogo4405/HaishinKit.swift", "state" : { - "revision" : "0fdd6b0046964161e3a7d263685ac1737e57a341", - "version" : "1.7.3" + "revision" : "42535bd481aac034385f09878be2747566c01706", + "version" : "1.8.1" } }, { @@ -24,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/shogo4405/Logboard.git", "state" : { - "revision" : "c6328f9751627287bcddcf0106eb54e5ca6b9ef8", - "version" : "2.4.2" + "revision" : "272976e1f3e8873e60ffe4b08fe50df48a93751b", + "version" : "2.5.0" } } ], diff --git a/ApiVideoLiveStream.xcodeproj/project.xcworkspace/xcuserdata/thibault.xcuserdatad/UserInterfaceState.xcuserstate b/ApiVideoLiveStream.xcodeproj/project.xcworkspace/xcuserdata/thibault.xcuserdatad/UserInterfaceState.xcuserstate index 7e97cad..c568a93 100644 Binary files a/ApiVideoLiveStream.xcodeproj/project.xcworkspace/xcuserdata/thibault.xcuserdatad/UserInterfaceState.xcuserstate and b/ApiVideoLiveStream.xcodeproj/project.xcworkspace/xcuserdata/thibault.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Cartfile b/Cartfile index 551e290..b972cb4 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "shogo4405/HaishinKit.swift" ~> 1.7.3 +github "shogo4405/HaishinKit.swift" ~> 1.8.1 diff --git a/Package.resolved b/Package.resolved index 623a1a7..5a48bb1 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/shogo4405/HaishinKit.swift", "state" : { - "revision" : "0fdd6b0046964161e3a7d263685ac1737e57a341", - "version" : "1.7.3" + "revision" : "42535bd481aac034385f09878be2747566c01706", + "version" : "1.8.1" } }, { @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/shogo4405/Logboard.git", "state" : { - "revision" : "6a7cbf54553936103084ed72cfb6d6f836758229", - "version" : "2.4.1" + "revision" : "272976e1f3e8873e60ffe4b08fe50df48a93751b", + "version" : "2.5.0" } } ], diff --git a/Package.swift b/Package.swift index c1cd5f9..96f791c 100644 --- a/Package.swift +++ b/Package.swift @@ -18,7 +18,7 @@ let package = Package( dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), - .package(url: "https://github.com/shogo4405/HaishinKit.swift", exact: "1.7.3") + .package(url: "https://github.com/shogo4405/HaishinKit.swift", exact: "1.8.1") ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift b/Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift index 0077121..647f17d 100644 --- a/Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift +++ b/Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift @@ -89,10 +89,10 @@ public class ApiVideoLiveStream { /// Mutes or unmutes audio capture. public var isMuted: Bool { get { - !self.rtmpStream.hasAudio + !self.rtmpStream.audioMixerSettings.isMuted } set(newValue) { - self.rtmpStream.hasAudio = !newValue + self.rtmpStream.audioMixerSettings.isMuted = !newValue } } @@ -242,7 +242,7 @@ public class ApiVideoLiveStream { /// - initialVideoConfig: The ApiVideoLiveStream's new VideoConfig /// - initialCamera: The ApiVideoLiveStream's initial camera device public convenience init( - preview: IOStreamDrawable, + preview: IOStreamView, initialAudioConfig: AudioConfig? = AudioConfig(), initialVideoConfig: VideoConfig? = VideoConfig(), initialCamera: AVCaptureDevice? = AVCaptureDevice.default( @@ -278,7 +278,7 @@ public class ApiVideoLiveStream { private func attachCamera(_ camera: AVCaptureDevice?) { self.lastCamera = camera - self.rtmpStream.attachCamera(camera, channel: 0) { videoCaptureUnit, error in + self.rtmpStream.attachCamera(camera) { videoCaptureUnit, error in if let error { print("======== Camera error ==========") print(error) @@ -335,17 +335,17 @@ public class ApiVideoLiveStream { } private func attachAudio() { - self.rtmpStream.attachAudio(AVCaptureDevice.default(for: AVMediaType.audio)) { error in - print("======== Audio error ==========") - print(error) - self.delegate?.audioError(error) + self.rtmpStream.attachAudio(AVCaptureDevice.default(for: AVMediaType.audio)) { _, error in + if let error { + print("======== Audio error ==========") + print(error) + self.delegate?.audioError(error) + } } } private func prepareAudio(audioConfig: AudioConfig) { - self.rtmpStream.audioSettings = AudioCodecSettings( - bitRate: audioConfig.bitrate - ) + self.rtmpStream.audioSettings.bitRate = audioConfig.bitrate self.isAudioConfigured = true } @@ -392,7 +392,7 @@ public class ApiVideoLiveStream { } public func stopPreview() { - self.rtmpStream.attachCamera(nil, channel: 0) + self.rtmpStream.attachCamera(nil) self.rtmpStream.attachAudio(nil) }