https://github.com/devsdocs/bunny_dart
https://github.com/devsdocs/bunny_dart
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/devsdocs/bunny_dart
- Owner: devsdocs
- License: mit
- Created: 2025-03-16T13:59:57.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-26T01:49:05.000Z (about 1 year ago)
- Last Synced: 2025-08-01T06:37:08.827Z (11 months ago)
- Language: Dart
- Size: 260 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
(WIP) Dart Wrapper for [Bunny.net](https://docs.bunny.net/reference) APIs
[](https://pub.dev/packages/bunny_dart)
Supporting various endpoints, including TUS Resumable Upload for efficient video uploads, ensuring seamless integration and enhanced performance.
``` dart
import 'package:bunny_dart/bunny_dart.dart';
const streamKey = 'YOUR_BUNNY_STREAM_KEY';
const libraryId = 12345;
void main() async {
final bunnyStreamLibrary = BunnyStream(streamKey).library(libraryId);
final store = BunnyTusFileStore('tus/fingerprint/path');
final upload = await bunnyStreamLibrary.createVideoWithTusUpload(
title: 'Video Title',
videoFile: XFile('path/to/video.mp4'),
store: store,
maxChunkSize: 512 * 1024,
);
await upload!.startUpload(
onStart: (p0, p1) {},
onProgress: (sended, total, speed, eta) {},
onComplete: () {},
measureUploadSpeed: true,
forceNewUpload: attempt > 3, // Force new upload on retry
);
}
```
Credit: https://github.com/tomassasovsky/tus_client