mirror of
https://github.com/danbulant/cushy_video
synced 2026-05-19 04:18:46 +00:00
23 lines
573 B
Rust
23 lines
573 B
Rust
use cushy::{widget::MakeWidget, Run};
|
|
use cushy_video::{player::VideoPlayer, video::Video};
|
|
|
|
fn main() -> cushy::Result {
|
|
VideoPlayer::new(
|
|
Video::new(
|
|
&url::Url::from_file_path(
|
|
std::path::PathBuf::from(file!())
|
|
.parent()
|
|
.unwrap()
|
|
.join("../media/big-buck-bunny-480p-30sec.mp4")
|
|
.canonicalize()
|
|
.unwrap(),
|
|
)
|
|
.unwrap(),
|
|
)
|
|
.unwrap(),
|
|
)
|
|
.contain()
|
|
.pad()
|
|
.expand()
|
|
.run()
|
|
}
|