update lib docs
This commit is contained in:
parent
f649ec93da
commit
5d87dbdf88
1 changed files with 7 additions and 15 deletions
22
src/lib.rs
22
src/lib.rs
|
@ -8,33 +8,25 @@
|
||||||
//! Example:
|
//! Example:
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use iced_video_player::{Video, VideoPlayer};
|
//! use iced_video_player::{Video, VideoPlayer};
|
||||||
//! use iced::{Sandbox, Element};
|
|
||||||
//!
|
//!
|
||||||
//! # #![allow(clippy::needless_doctest_main)]
|
//! fn main() -> iced::Result {
|
||||||
//! fn main() {
|
//! iced::run("Video Player", (), App::view)
|
||||||
//! App::run(Default::default());
|
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
//! struct App {
|
//! struct App {
|
||||||
//! video: Video,
|
//! video: Video,
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
//! impl Sandbox for App {
|
//! impl Default for App {
|
||||||
//! type Message = ();
|
//! fn default() -> Self {
|
||||||
//!
|
|
||||||
//! fn new() -> Self {
|
|
||||||
//! App {
|
//! App {
|
||||||
//! video: Video::new(&url::Url::parse("file:///C:/my_video.mp4").unwrap()).unwrap(),
|
//! video: Video::new(&url::Url::parse("file:///C:/my_video.mp4").unwrap()).unwrap(),
|
||||||
//! }
|
//! }
|
||||||
//! }
|
//! }
|
||||||
|
//! }
|
||||||
//!
|
//!
|
||||||
//! fn title(&self) -> String {
|
//! impl App {
|
||||||
//! String::from("Video Player")
|
//! fn view(&self) -> iced::Element<()> {
|
||||||
//! }
|
|
||||||
//!
|
|
||||||
//! fn update(&mut self, _message: ()) {}
|
|
||||||
//!
|
|
||||||
//! fn view(&mut self) -> Element<()> {
|
|
||||||
//! VideoPlayer::new(&self.video).into()
|
//! VideoPlayer::new(&self.video).into()
|
||||||
//! }
|
//! }
|
||||||
//! }
|
//! }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue