mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add media cache and implement HTMLMediaElement.buffering
This commit is contained in:
parent
c558db9737
commit
f5581a78ab
5 changed files with 83 additions and 71 deletions
|
@ -14,7 +14,7 @@ use dom_struct::dom_struct;
|
|||
use std::fmt;
|
||||
use std::rc::Rc;
|
||||
|
||||
#[derive(JSTraceable, MallocSizeOf)]
|
||||
#[derive(Clone, JSTraceable, MallocSizeOf)]
|
||||
struct TimeRange {
|
||||
start: f64,
|
||||
end: f64,
|
||||
|
@ -57,7 +57,7 @@ pub enum TimeRangesError {
|
|||
OutOfRange,
|
||||
}
|
||||
|
||||
#[derive(Debug, JSTraceable, MallocSizeOf)]
|
||||
#[derive(Clone, Debug, JSTraceable, MallocSizeOf)]
|
||||
pub struct TimeRangesContainer {
|
||||
ranges: Vec<TimeRange>,
|
||||
}
|
||||
|
@ -132,9 +132,6 @@ pub struct TimeRanges {
|
|||
ranges: Rc<DomRefCell<TimeRangesContainer>>,
|
||||
}
|
||||
|
||||
//XXX(ferjm) We'll get warnings about unused methods until we use this
|
||||
// on the media element implementation.
|
||||
#[allow(dead_code)]
|
||||
impl TimeRanges {
|
||||
fn new_inherited(ranges: Rc<DomRefCell<TimeRangesContainer>>) -> TimeRanges {
|
||||
Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue