-
-
Notifications
You must be signed in to change notification settings - Fork 652
Moving from 2.0.x APIs to 2.1.0
shogo4405 edited this page Aug 16, 2025
·
5 revisions
In this version, we have restructured the module configuration. The RTMP-related features that were previously in HaishinKit have been moved to RTMPHaishinKit.
Several classes that were previously at the public level have been changed to package-level and are no longer exposed.
import HaishinKit
let connection = RTMPConnection()
import HaishinKit
import RTMPHaishinKit
let connection = RTMPConnection()
As previously announced, support for CocoaPods has been discontinued.
- CocoaPods
- SwiftPM
- SwiftPM
Since around iOS 18, when attaching a device during capture with AVCaptureMultiCamSession, the application’s UI becomes locked for several seconds. To address this, we have changed the behavior to start capture manually.
import HaishinKit
let mixer = MediaMixer()
// Capture was automatically started under certain conditions.
await mixer.attachVideo(AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back))
await mixer.addOutput(view)
import HaishinKit
let mixer = MediaMixer()
await mixer.attachVideo(AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back))
await mixer.addOutput(view)
// Calling startRunning() is now required.
await mixer.startRunning()
Frame rate specification has been changed to allow separate settings for output configuration and camera input.
await mixer.setFrameRate(fps)
// Sets to video camera capture frameRate.
try? await mixer.configuration(video: 0) { video in
do {
try video.setFrameRate(fps)
} catch {
logger.error(error)
}
}
// Sets to output frameRate.
try await mixer.setFrameRate(fps)
HaishinKit.swift | 🇬🇧 HaishinKit.kt | 🇯🇵 Zenn