pub struct VideoAudioOptions {
pub policy: VideoAudioPolicy,
pub activation: VideoAudioActivation,
pub mix_with_others: bool,
pub duck_others: bool,
pub ios: IosVideoAudioOptions,
}Expand description
Audio-session behavior requested by a Video widget.
This describes product intent independently from any single host API. Shells translate the policy into their native platform API where one exists, and ignore unsupported fields rather than changing the product default globally.
Fields§
§policy: VideoAudioPolicyCross-platform audio-session policy.
activation: VideoAudioActivationWhen the shell should activate the platform audio session.
mix_with_others: boolWhether this video may mix with other active audio where supported.
duck_others: boolWhether this video may temporarily duck other active audio where supported.
ios: IosVideoAudioOptionsiOS-specific AVAudioSession overrides.
Implementations§
Source§impl VideoAudioOptions
impl VideoAudioOptions
Sourcepub fn system_default() -> Self
pub fn system_default() -> Self
Uses the platform’s default audio-session behavior.
This is Fission’s default because whether video should ignore the iOS silent switch, mix with background audio, or claim exclusive playback is a product decision.
Sourcepub fn ambient() -> Self
pub fn ambient() -> Self
Requests ambient media behavior: mixable, non-disruptive playback that respects platform silent/mute conventions where supported.
Sourcepub fn playback() -> Self
pub fn playback() -> Self
Requests foreground playback behavior for a primary media player.
On iOS this maps to AVAudioSessionCategoryPlayback, so it may play
even when the silent switch is engaged.
Sourcepub fn mix_with_others(self, value: bool) -> Self
pub fn mix_with_others(self, value: bool) -> Self
Adds the platform “mix with others” hint.
Sourcepub fn duck_others(self, value: bool) -> Self
pub fn duck_others(self, value: bool) -> Self
Adds the platform “duck others” hint.
Sourcepub fn activation(self, activation: VideoAudioActivation) -> Self
pub fn activation(self, activation: VideoAudioActivation) -> Self
Overrides the default activation behavior.
Sourcepub fn ios(self, ios: IosVideoAudioOptions) -> Self
pub fn ios(self, ios: IosVideoAudioOptions) -> Self
Adds iOS-specific AVAudioSession overrides.
Trait Implementations§
Source§impl Clone for VideoAudioOptions
impl Clone for VideoAudioOptions
Source§fn clone(&self) -> VideoAudioOptions
fn clone(&self) -> VideoAudioOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VideoAudioOptions
impl Debug for VideoAudioOptions
Source§impl Default for VideoAudioOptions
impl Default for VideoAudioOptions
Source§impl<'de> Deserialize<'de> for VideoAudioOptions
impl<'de> Deserialize<'de> for VideoAudioOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for VideoAudioOptions
impl PartialEq for VideoAudioOptions
Source§impl Serialize for VideoAudioOptions
impl Serialize for VideoAudioOptions
impl StructuralPartialEq for VideoAudioOptions
Auto Trait Implementations§
impl Freeze for VideoAudioOptions
impl RefUnwindSafe for VideoAudioOptions
impl Send for VideoAudioOptions
impl Sync for VideoAudioOptions
impl Unpin for VideoAudioOptions
impl UnsafeUnpin for VideoAudioOptions
impl UnwindSafe for VideoAudioOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.