release 0.1

This commit is contained in:
jazzfool 2024-02-19 14:56:09 +11:00
parent e347a9b324
commit 30a643e237
3 changed files with 58 additions and 2 deletions

View file

@ -1,3 +1,46 @@
//! # Iced Video Player
//!
//! A convenient video player widget for Iced.
//!
//! To get started, load a video from a URI (e.g., a file path prefixed with `file:///`) using [`Video::new`](crate::Video::new),
//! then use it like any other Iced widget in your `view` function by creating a [`VideoPlayer`].
//!
//! Example:
//! ```rust
//! use iced_video_player::{Video, VideoPlayer};
//! use iced::{Sandbox, Element};
//!
//! fn main() {
//! App::run(Default::default());
//! }
//!
//! struct App {
//! video: Video,
//! }
//!
//! impl Sandbox for App {
//! type Message = ();
//!
//! fn new() -> Self {
//! App {
//! video: Video::new(&url::Url::parse("file:///C:/my_video.mp4").unwrap()).unwrap(),
//! }
//! }
//!
//! fn title(&self) -> String {
//! String::from("Video Player")
//! }
//!
//! fn update(&mut self, _message: ()) {}
//!
//! fn view(&mut self) -> Element<()> {
//! VideoPlayer::new(&self.video).into()
//! }
//! }
//! ```
//!
//! You can programmatically control the video (e.g., seek, pause, loop, grab thumbnails) by accessing various methods on [`Video`].
mod pipeline;
mod video;
mod video_player;