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
impl VideoPlayer
pub(super) fn track_popover(self: &Rc<Self>, info: &PlayMediaInfo) -> Popover
fn add_audio_tracks(self: &Rc<Self>, content: &Box, audio: &[PlayAudioInfo])
fn add_subtitle_tracks( self: &Rc<Self>, content: &Box, subtitles: &[PlaySubtitleInfo], )
Source§impl VideoPlayer
impl VideoPlayer
pub(super) fn new( badge: &Button, volume: f64, muted: bool, hooks: VideoHooks, ) -> Result<Rc<Self>, String>
pub(super) fn surface(&self) -> &Picture
pub(super) fn controls(&self) -> &Revealer
pub(super) fn volume(&self) -> f64
pub(super) fn muted(&self) -> bool
pub(super) fn bind_compact(&self, split: &OverlaySplitView)
pub(super) fn prepare(self: &Rc<Self>, available: bool)
pub(super) fn load(&self, source: VideoSource)
pub(super) fn toggle_play(&self)
pub(super) fn pause(&self)
pub(super) fn stop(&self)
pub(super) fn skip(&self, forward: bool)
pub(super) fn step_frame(&self, forward: bool)
pub(super) fn toggle_mute(&self)
pub(super) fn set_fullscreen(&self, fullscreen: bool)
fn is_playing(&self) -> bool
fn active_position(&self) -> Option<ClockTime>
fn handle_message(self: &Rc<Self>, message: &Message)
fn on_state_changed(self: &Rc<Self>, state: PlayState)
fn on_end_of_stream(&self)
fn apply_state(self: &Rc<Self>)
fn apply_speed(&self)
fn speed_index(&self) -> usize
fn show_position(&self, position: Option<ClockTime>)
fn set_position(&self, position: ClockTime)
fn show_duration(&self, duration: Option<ClockTime>)
fn seek_to(&self, seconds: f64)
fn show_media_info(self: &Rc<Self>, info: &PlayMediaInfo)
fn connect_volume(self: &Rc<Self>)
fn connect_pointer(self: &Rc<Self>)
fn on_click<F: Fn(&Rc<Self>) + 'static>( self: &Rc<Self>, f: F, ) -> impl Fn(&Button) + use<F>
fn on_picked<F: Fn(&Rc<Self>) + 'static>( self: &Rc<Self>, f: F, ) -> impl Fn(&CheckButton) + use<F>
fn update_volume_icon(&self)
fn reveal_controls(&self)
fn bump_controls(self: &Rc<Self>)
fn arm_hide(self: &Rc<Self>, delay: Duration)
fn controls_in_use(&self) -> bool
Auto Trait Implementations§
impl !Freeze for VideoPlayer
impl !RefUnwindSafe for VideoPlayer
impl !Send for VideoPlayer
impl !Sync for VideoPlayer
impl !UnwindSafe for VideoPlayer
impl Unpin for VideoPlayer
impl UnsafeUnpin for VideoPlayer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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