haishin_kit 0.20.0
haishin_kit: ^0.20.0 copied to clipboard
A Flutter plugin for capturing, mixing, publishing, and playing audio and video with RTMP, SRT, WHIP, and WHEP.
๐ก HaishinKit Plugin #
A Flutter interface to HaishinKit's native streaming libraries for Android, iOS, and macOS. Capture, compose, preview, publish, and play audio/video with RTMP, RTMPS, SRT, WHIP, and WHEP.
API reference ยท pub.dev ยท Example app
๐จ Features #
- Camera and microphone capture through a common
MediaMixerinterface. - RTMP/RTMPS and SRT publishing/playback, WHIP publishing, and WHEP playback.
- Text, image, and video compositions, snapshots, and ScreenObject editing APIs.
- Local video asset composition and portable scene files with embedded media.
- Native video textures for Flutter previews and playback.
- OS video encoder selection, including AV1/VP8/VP9 for Android RTMP.
- HLG capture and native HDR previews on supported iOS and Android devices.
- A common
StreamSessionlifecycle across supported platforms.
๐ฆ Installation #
Add the published package to your app's pubspec.yaml:
dependencies:
haishin_kit: ^0.20.0
flutter pub get
Use Flutter 3.44+ and Dart 3.12+. Platform requirements:
| Platform | Minimum |
|---|---|
| Android | Android 7 / API 24 with Flutter 3.44; compile SDK 37+ |
| iOS | iOS 15; Xcode 26+ |
| macOS | macOS 12; Xcode 26+ |
The Android app minimum follows Flutter's SDK minimum; the native bridge declares API 23. Android WHIP audio publishing requires an Opus encoder, provided by Android 10+.
Apple builds use Swift Package Manager. Enable it before building:
flutter config --enable-swift-package-manager
See the integration guide in the library documentation for permissions, Android build properties, Apple setup, and session lifecycle.
๐ Documentation #
Use the generated dartdoc reference for capture, composition, stream sessions, and protocol integration.
The library documentation source includes a versioned Swift/Kotlin feature comparison and tracks which native features Flutter exposes.
The install example targets 0.20.0. The main branch may include changes
ahead of the published package or API reference; use a matching release tag when
working with a published version.
๐พ Examples #
The Flutter sample demonstrates camera publishing, playback, text/image overlays, optional picture-in-picture camera capture, and touch editing. Its studio interface keeps the preview clear, with camera tools in a bottom sheet.
Flutter example running on Android (English, Pixel 5a):
From a repository checkout:
cd example
flutter pub get
flutter run
A reachable streaming server is required for publishing/playback. See the example guide for endpoint settings and platform setup.
๐ Native projects #
- HaishinKit.swift โ Apple platforms.
- HaishinKit.kt โ Android.
๐ Support #
Community discussion is open to everyone following the code of conduct. Technical support is available to contributors, academic researchers, and sponsors. The $50/month sponsorship tier includes priority support through Issues/Discussions.
๐ License #
BSD 3-Clause. Native dependencies carry their own licenses; see the native projects for third-party notices.