pub struct PlayerView {
pub key: Option<KeyRef>,
pub player: Ref<Player>,
}Expand description
A player’s video, Media3’s PlayerView, laid out at its size in logical pixels, or as large as
the constraints let it be at that aspect; no room until the size is known. It shows the player
on a composition layer of its own, which the system draws the video into: the cheapest way, and
the only one protected and HDR video show in. The player shows on the view built for it last.
Over the video a SubtitleView draws the player’s cues. For a video the framework draws,
under effects a layer cannot take, see VideoFrameView.
Fields§
§key: Option<KeyRef>§player: Ref<Player>Implementations§
Source§impl PlayerView
impl PlayerView
pub fn new(player: Ref<Player>) -> PlayerView
pub fn key(self, key: KeyRef) -> PlayerView
Trait Implementations§
Source§impl Clone for PlayerView
impl Clone for PlayerView
Source§impl Debug for PlayerView
impl Debug for PlayerView
Source§impl StatelessWidget for PlayerView
impl StatelessWidget for PlayerView
Source§fn build(&self, _app: &mut App, _context: BuildContext) -> WidgetRef
fn build(&self, _app: &mut App, _context: BuildContext) -> WidgetRef
Describes the part of the user interface represented by this widget. Read more
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn debug_check_constructor(&self)
fn debug_check_constructor(&self)
Dart’s constructor asserts that relate two or more arguments. Read more
Source§fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
fn as_preferred_size_widget(&self) -> Option<&dyn PreferredSizeWidget>
Dart’s
this is PreferredSizeWidget: a widget that implements PreferredSizeWidget
answers with itself, which is what a parent asking an erased child for its preferred
size reads.Auto Trait Implementations§
impl !RefUnwindSafe for PlayerView
impl !Send for PlayerView
impl !Sync for PlayerView
impl !UnwindSafe for PlayerView
impl Forget for PlayerView
impl Freeze for PlayerView
impl Move for PlayerView
impl Unpin for PlayerView
impl UnsafeUnpin for PlayerViewwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
PhantomData<fn() -> Player>: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
The widget as a tree node, made where this is called: its
creation_location.