mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
implement MediaSession.setPositionState method
This commit is contained in:
parent
83bb96740d
commit
274d4d2303
3 changed files with 78 additions and 2 deletions
|
@ -1925,6 +1925,18 @@ impl HTMLMediaElement {
|
|||
|
||||
media_session.send_event(event);
|
||||
}
|
||||
|
||||
pub fn set_duration(&self, duration: f64) {
|
||||
self.duration.set(duration);
|
||||
}
|
||||
|
||||
pub fn reset(&self) {
|
||||
if let Some(ref player) = *self.player.borrow() {
|
||||
if let Err(e) = player.lock().unwrap().stop() {
|
||||
eprintln!("Could not stop player {:?}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// XXX Placeholder for [https://github.com/servo/servo/issues/22293]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue