File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,19 @@ We utilize the device's native APIs (`MediaMuxer` on Android, `AVAssetExportSess
4848``` dart
4949final controller = DlpController();
5050
51- // Listen to status updates (Extracting -> Downloading -> Merging -> Completed)
51+ // 1. Get Video Data
52+ final videoData = await engine.extract('https://tiktok.com/...');
53+
54+ // 2. Start Download (Auto-Muxing handled internally)
5255controller.state.listen((state) {
53- print('[${state.status}] ${state.message}');
54- if (state.status == DlpStatus.merging) {
55- print('Merging Video & Audio streams...');
56+ if (state.status == DlpStatus.downloading) {
57+ print('Downloading... ${state.progress?.percentage.toStringAsFixed(1)}%');
58+ } else if (state.status == DlpStatus.completed) {
59+ print('Done! File at: ${state.message}');
5660 }
5761});
5862
59- // Start the Magic (Auto-Muxing included)
63+ await controller.startDownload(videoData, '/downloads/');
6064final path = await controller.startDownload(videoData, '/storage/emulated/0/Download');
6165print('Saved to: $path');
6266```
You can’t perform that action at this time.
0 commit comments