pub enum AudioSession {
Default,
Playback,
MixWithOthers,
}Expand description
What a video’s sound does to the rest of the device’s audio while it
plays: whether it plays in silent mode, whether other apps’ audio pauses,
and whether the system treats it as speech. iOS sets the shared
AVAudioSession while such a video plays and restores it after; Android
marks the sound as speech and holds audio focus for Playback.
Variants§
Default
The app’s audio settings (the platform’s for video unless the app, or the app embedding NSH, set others): nothing is changed.
Playback
Plays speech: audible in silent mode, other apps’ audio pauses while
it plays (Apple’s playback category, spokenAudio mode; Android’s
speech content type with transient audio focus).
MixWithOthers
Plays speech over other apps’ audio, which keeps playing
(Apple’s playback category with mixWithOthers; Android’s speech
content type without audio focus).
Trait Implementations§
Source§impl Clone for AudioSession
impl Clone for AudioSession
impl Copy for AudioSession
Source§impl Debug for AudioSession
impl Debug for AudioSession
Source§impl Default for AudioSession
impl Default for AudioSession
impl Eq for AudioSession
Source§impl HostValue for AudioSession
impl HostValue for AudioSession
Source§impl JsValue for AudioSession
impl JsValue for AudioSession
Source§impl PartialEq for AudioSession
impl PartialEq for AudioSession
Source§impl PropEnum for AudioSession
impl PropEnum for AudioSession
impl StructuralPartialEq for AudioSession
Auto Trait Implementations§
impl Forget for AudioSession
impl Freeze for AudioSession
impl Move for AudioSession
impl RefUnwindSafe for AudioSession
impl Send for AudioSession
impl Sync for AudioSession
impl Unpin for AudioSession
impl UnsafeUnpin for AudioSession
impl UnwindSafe for AudioSession
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> CallbackArgs for Twhere
T: Ret,
impl<T> CallbackArgs for Twhere
T: Ret,
Source§fn ts_params(types: &mut TsTypes, names: &[&str]) -> String
fn ts_params(types: &mut TsTypes, names: &[&str]) -> String
names (name: string, amount: number), or without names value for one and a, b, … for
several.