Skip to main content

VideoPlayer

Struct VideoPlayer 

Source
pub(super) struct VideoPlayer {
Show 17 fields play: Play, api_key: Arc<Mutex<Option<String>>>, _bus_watch: BusWatchGuard, surface: Picture, badge: Button, controls: Controls, hooks: VideoHooks, state: Cell<PlayState>, available: Cell<bool>, loaded: Cell<bool>, restarting: Cell<bool>, last_seek: Cell<Option<Instant>>, frame: Cell<ClockTime>, track_counts: Cell<(u32, u32)>, pointer: Cell<(f64, f64)>, hide_at: Cell<Instant>, hide_armed: Cell<bool>,
}

Fields§

§play: Play§api_key: Arc<Mutex<Option<String>>>§_bus_watch: BusWatchGuard§surface: Picture§badge: Button§controls: Controls§hooks: VideoHooks§state: Cell<PlayState>§available: Cell<bool>§loaded: Cell<bool>§restarting: Cell<bool>§last_seek: Cell<Option<Instant>>§frame: Cell<ClockTime>§track_counts: Cell<(u32, u32)>§pointer: Cell<(f64, f64)>§hide_at: Cell<Instant>§hide_armed: Cell<bool>

Implementations§

Source§

impl VideoPlayer

Source

pub(super) fn track_popover(self: &Rc<Self>, info: &PlayMediaInfo) -> Popover

Source

fn add_audio_tracks(self: &Rc<Self>, content: &Box, audio: &[PlayAudioInfo])

Source

fn add_subtitle_tracks( self: &Rc<Self>, content: &Box, subtitles: &[PlaySubtitleInfo], )

Source§

impl VideoPlayer

Source

pub(super) fn new( badge: &Button, volume: f64, muted: bool, hooks: VideoHooks, ) -> Result<Rc<Self>, String>

Source

pub(super) fn surface(&self) -> &Picture

Source

pub(super) fn controls(&self) -> &Revealer

Source

pub(super) fn volume(&self) -> f64

Source

pub(super) fn muted(&self) -> bool

Source

pub(super) fn bind_compact(&self, split: &OverlaySplitView)

Source

pub(super) fn prepare(self: &Rc<Self>, available: bool)

Source

pub(super) fn load(&self, source: VideoSource)

Source

pub(super) fn toggle_play(&self)

Source

pub(super) fn pause(&self)

Source

pub(super) fn stop(&self)

Source

pub(super) fn skip(&self, forward: bool)

Source

pub(super) fn step_frame(&self, forward: bool)

Source

pub(super) fn toggle_mute(&self)

Source

pub(super) fn set_fullscreen(&self, fullscreen: bool)

Source

fn is_playing(&self) -> bool

Source

fn active_position(&self) -> Option<ClockTime>

Source

fn handle_message(self: &Rc<Self>, message: &Message)

Source

fn on_state_changed(self: &Rc<Self>, state: PlayState)

Source

fn on_end_of_stream(&self)

Source

fn apply_state(self: &Rc<Self>)

Source

fn apply_speed(&self)

Source

fn speed_index(&self) -> usize

Source

fn show_position(&self, position: Option<ClockTime>)

Source

fn set_position(&self, position: ClockTime)

Source

fn show_duration(&self, duration: Option<ClockTime>)

Source

fn seek_to(&self, seconds: f64)

Source

fn show_media_info(self: &Rc<Self>, info: &PlayMediaInfo)

Source

fn connect_buttons(self: &Rc<Self>)

Source

fn connect_volume(self: &Rc<Self>)

Source

fn connect_pointer(self: &Rc<Self>)

Source

fn on_click<F: Fn(&Rc<Self>) + 'static>( self: &Rc<Self>, f: F, ) -> impl Fn(&Button) + use<F>

Source

fn on_picked<F: Fn(&Rc<Self>) + 'static>( self: &Rc<Self>, f: F, ) -> impl Fn(&CheckButton) + use<F>

Source

fn update_volume_icon(&self)

Source

fn reveal_controls(&self)

Source

fn bump_controls(self: &Rc<Self>)

Source

fn arm_hide(self: &Rc<Self>, delay: Duration)

Source

fn controls_in_use(&self) -> bool

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more