fix resuming video playback after background audio only mode.
This commit is contained in:
@@ -80,6 +80,22 @@ pub fn update_lockscreen_metadata(_meta: &LockscreenMetadata) -> Result<(), Stri
|
||||
}
|
||||
}
|
||||
|
||||
/// Set the base offset (seconds) added to positions reported to the Android
|
||||
/// lockscreen scrubber. Used by the background-audio handoff: the audio stream
|
||||
/// starts at the handoff point (StartTimeTicks), so ExoPlayer's position is
|
||||
/// relative and must be shifted back to absolute to match the full duration.
|
||||
/// Pass 0.0 to clear on exit. No-op off Android.
|
||||
pub fn set_lockscreen_position_offset(_offset_seconds: f64) -> Result<(), String> {
|
||||
#[cfg(target_os = "android")]
|
||||
{
|
||||
return android::set_position_offset(_offset_seconds);
|
||||
}
|
||||
#[cfg(not(target_os = "android"))]
|
||||
{
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
use crate::utils::lock::MutexSafe;
|
||||
use log::{debug, error, warn};
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
Reference in New Issue
Block a user