pub struct Videos { /* private fields */ }Expand description
The videos drawn in a context, by id: what the video.* commands and the
videos collector reach, and the viewer’s video page.
Implementations§
Source§impl Videos
impl Videos
Sourcepub fn state(&self, video: &str) -> Option<Json>
pub fn state(&self, video: &str) -> Option<Json>
What a video holds: its state, position (position_ms), length
(duration_ms), volume, whether it plays, loops or is muted, its
picture’s size, a note or an error.
Sourcepub fn describe(&self) -> Json
pub fn describe(&self) -> Json
What the videos collector shows: every video with an id, the one
that last had the focus, and how many have none.
Sourcepub fn toggle(&self, video: Option<&str>) -> Result<Json, String>
pub fn toggle(&self, video: Option<&str>) -> Result<Json, String>
Plays or pauses a video: video by its id, else the one whose picture
last had the focus, else the only one with an id. From its end, it
plays from the start.
pub fn play(&self, video: Option<&str>) -> Result<Json, String>
pub fn pause(&self, video: Option<&str>) -> Result<Json, String>
Sourcepub fn seek_to(&self, video: Option<&str>, seconds: f64) -> Result<Json, String>
pub fn seek_to(&self, video: Option<&str>, seconds: f64) -> Result<Json, String>
Moves to a position in seconds, kept within the video.
Sourcepub fn seek_by(&self, video: Option<&str>, seconds: f64) -> Result<Json, String>
pub fn seek_by(&self, video: Option<&str>, seconds: f64) -> Result<Json, String>
Moves forward, or back with a negative number.
Sourcepub fn set_volume(
&self,
video: Option<&str>,
volume: f32,
) -> Result<Json, String>
pub fn set_volume( &self, video: Option<&str>, volume: f32, ) -> Result<Json, String>
Sets the volume, from 0 to 1, and gives the sound back.
Sourcepub fn volume_by(&self, video: Option<&str>, by: f32) -> Result<Json, String>
pub fn volume_by(&self, video: Option<&str>, by: f32) -> Result<Json, String>
Changes the volume heard by an amount.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Videos
impl !RefUnwindSafe for Videos
impl Send for Videos
impl Sync for Videos
impl Unpin for Videos
impl UnsafeUnpin for Videos
impl !UnwindSafe for Videos
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more