Skip to content

Commit

Permalink
chore(dependency): upgrade to HaishinKit 1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Jun 6, 2024
1 parent fbbd00b commit 4a57e86
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 26 deletions.
5 changes: 2 additions & 3 deletions ApiVideoLiveStream.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion ApiVideoLiveStream.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand All @@ -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"
}
}
],
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "shogo4405/HaishinKit.swift" ~> 1.7.3
github "shogo4405/HaishinKit.swift" ~> 1.8.1
8 changes: 4 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/shogo4405/HaishinKit.swift",
"state" : {
"revision" : "0fdd6b0046964161e3a7d263685ac1737e57a341",
"version" : "1.7.3"
"revision" : "42535bd481aac034385f09878be2747566c01706",
"version" : "1.8.1"
}
},
{
"identity" : "logboard",
"kind" : "remoteSourceControl",
"location" : "https://github.com/shogo4405/Logboard.git",
"state" : {
"revision" : "6a7cbf54553936103084ed72cfb6d6f836758229",
"version" : "2.4.1"
"revision" : "272976e1f3e8873e60ffe4b08fe50df48a93751b",
"version" : "2.5.0"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
24 changes: 12 additions & 12 deletions Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -392,7 +392,7 @@ public class ApiVideoLiveStream {
}

public func stopPreview() {
self.rtmpStream.attachCamera(nil, channel: 0)
self.rtmpStream.attachCamera(nil)
self.rtmpStream.attachAudio(nil)
}

Expand Down

0 comments on commit 4a57e86

Please sign in to comment.