1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//! # Tauri Plugin Use FFmpeg
//!
//! 一个为 Tauri v2 桌面应用提供使用 FFmpeg 功能的插件,支持自动下载和管理 FFmpeg 二进制文件。
//!
//! ## 功能特性
//!
//! - ✅ 无需预装 FFmpeg
//! - ✅ 自动下载并解压 FFmpeg
//! - ✅ 支持桌面平台:macOS、Windows、Linux
//! - ✅ 实时下载进度监听
//! - ✅ FFmpeg 可用性检查(包含路径和版本信息)
//! - ✅ 执行任意 FFmpeg 命令
//! - ✅ 删除已下载的 FFmpeg
//! - ✅ 完整的 TypeScript 类型支持
//!
//! ## 使用方法
//!
//! ### 初始化插件
//!
//! ```rust,ignore
//! use tauri_plugin_use_ffmpeg::init;
//!
//! fn main() {
//! tauri::Builder::default()
//! .plugin(init())
//! .run(tauri::generate_context!())
//! .expect("error while running tauri application");
//! }
//! ```
//!
//! ### 权限配置
//!
//! 在 `src-tauri/capabilities/default.json` 中添加:
//!
//! ```json
//! {
//! "permissions": [
//! "core:default",
//! "use-ffmpeg:default"
//! ]
//! }
//! ```
use ;
pub use *;
pub use ;
use Ffmpeg;
/// Extensions to [`tauri::App`], [`tauri::AppHandle`] and [`tauri::Window`] to access the ffmpeg APIs.
/// Initializes the plugin.
///
/// # Example
///
/// ```rust,ignore
/// use tauri_plugin_use_ffmpeg::init;
///
/// fn main() {
/// tauri::Builder::default()
/// .plugin(init())
/// .run(tauri::generate_context!())
/// .expect("error while running tauri application");
/// }
/// ```