pub struct PlayerStatus {
pub state: PlayerState,
pub position: f64,
pub duration: Option<f64>,
pub volume: f32,
pub muted: bool,
pub shuffle: bool,
pub repeat: RepeatMode,
pub backend: VideoBackend,
pub use_html5_element: bool,
pub merged_media: Option<MergedMediaItem>,
pub merged_is_playing: bool,
pub merged_volume: f32,
}Expand description
Response for player state queries
Fields§
§state: PlayerState§position: f64§duration: Option<f64>§volume: f32§muted: bool§shuffle: bool§repeat: RepeatMode§backend: VideoBackendBackend being used (native = ExoPlayer/libmpv, html5 = fallback)
use_html5_element: boolWhether frontend should render HTML5 video element
merged_media: Option<MergedMediaItem>Media item from either local queue or remote session
merged_is_playing: boolPlaying state from either local player or remote session
merged_volume: f32Volume from either local player or remote session (0-1 normalized)
Trait Implementations§
Source§impl Debug for PlayerStatus
impl Debug for PlayerStatus
Source§impl NamedType for PlayerStatus
impl NamedType for PlayerStatus
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
this is equivalent to [Type::inline] but returns a [NamedDataType] instead.
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
this is equivalent to [Type::definition] but returns a [NamedDataType] instead.
Source§impl Serialize for PlayerStatus
impl Serialize for PlayerStatus
Source§impl Type for PlayerStatus
impl Type for PlayerStatus
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Returns the definition of a type using the provided generics. Read more
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
Generates a datatype corresponding to a reference to this type,
as determined by its category. Getting a reference to a type implies that
it should belong in the type map (since it has to be referenced from somewhere),
so the output of
definition will be put into the type map.impl Flatten for PlayerStatus
Auto Trait Implementations§
impl Freeze for PlayerStatus
impl RefUnwindSafe for PlayerStatus
impl Send for PlayerStatus
impl Sync for PlayerStatus
impl Unpin for PlayerStatus
impl UnsafeUnpin for PlayerStatus
impl UnwindSafe for PlayerStatus
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<T> FunctionArg for Twhere
T: Type,
impl<T> FunctionArg for Twhere
T: Type,
§fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
Gets the type of an argument as a [
DataType]. Read more