| Crates.io | egui_player |
| lib.rs | egui_player |
| version | 0.1.2 |
| created_at | 2025-07-05 21:24:09.089623+00 |
| updated_at | 2025-07-06 11:35:02.849179+00 |
| description | A player for rust using egui. Currently audio playback and transcription are supported |
| homepage | |
| repository | https://github.com/AravDesai/egui-player |
| max_upload_size | |
| id | 1739479 |
| size | 194,027 |
https://github.com/user-attachments/assets/f2dc0ac1-1248-46c2-8619-f9e413a9c515
First, add Player to your App variables. Insert the path to the file to be played in new()
struct MyApp {
player: Player,
}
impl Default for MyApp {
fn default() -> Self {
Self {
player: Player::new("assets/Dreamweaver.mp3"),
}
}
}
For transcriptions: Set up an async block to allow for asynchronous tokio functions
fn main() {
let rt = Runtime::new().unwrap();
let _ = rt.block_on(async {
eframe::run_native(
"Player Example",
NativeOptions::default(),
Box::new(|_| Ok(Box::new(MyApp::default()))),
)
});
}
Now, under the update function, add this line to display the player:
self.player.ui(ui);
For faster transcription, run with the release flag
To play your own files, clone/download this repository and use:
cargo run --examples main --release
| Format | Playback | Transcription |
|---|---|---|
| mp3 | ✅ | ✅ |
| m4a | ✅ | ✅ |
| wav | ✅ | ✅ |
| flac | ✅ | ❌ |
Currently working on support
Dreamweaver.mp3 track in demo assets made by @romms921