aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Jiménez Moreno <ferjmoreno@gmail.com>2018-12-17 23:50:39 +0100
committerFernando Jiménez Moreno <ferjmoreno@gmail.com>2019-01-17 10:01:38 +0100
commitf5581a78ab5a2581922a719f54037ca2577ed1ad (patch)
treedc17f5bb92c16a0536d7b1eb20b33482a2c7081e
parentc558db97372ce4bafe2bd74a0b42bbfedff752bd (diff)
downloadservo-f5581a78ab5a2581922a719f54037ca2577ed1ad.tar.gz
servo-f5581a78ab5a2581922a719f54037ca2577ed1ad.zip
Add media cache and implement HTMLMediaElement.buffering
-rw-r--r--Cargo.lock101
-rw-r--r--components/script/dom/htmlmediaelement.rs11
-rw-r--r--components/script/dom/timeranges.rs7
-rw-r--r--components/script/dom/webidls/HTMLMediaElement.webidl2
-rw-r--r--tests/wpt/metadata/html/dom/interfaces.https.html.ini33
5 files changed, 83 insertions, 71 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 948637ea7f0..63671acf85e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1393,6 +1393,17 @@ dependencies = [
]
[[package]]
+name = "gobject-subclass"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "gobject-sys"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1403,6 +1414,24 @@ dependencies = [
]
[[package]]
+name = "gst-plugin"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gobject-subclass 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-base 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-base-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "gstreamer"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1412,7 +1441,7 @@ dependencies = [
"glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
"muldiv 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1432,7 +1461,7 @@ dependencies = [
"gstreamer-app-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1443,7 +1472,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1460,7 +1489,7 @@ dependencies = [
"gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-audio-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1471,7 +1500,7 @@ dependencies = [
"glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1487,7 +1516,7 @@ dependencies = [
"gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1497,7 +1526,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1513,7 +1542,7 @@ dependencies = [
"gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-player-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1525,7 +1554,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1533,7 +1562,7 @@ dependencies = [
[[package]]
name = "gstreamer-sys"
-version = "0.6.0"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1554,7 +1583,7 @@ dependencies = [
"gstreamer 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1567,7 +1596,7 @@ dependencies = [
"glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1850,7 +1879,7 @@ dependencies = [
"hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2289,7 +2318,7 @@ dependencies = [
"string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
"thin-slice 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_api 0.57.2 (git+https://github.com/servo/webrender)",
"xml5ever 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2596,7 +2625,7 @@ dependencies = [
"tokio 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-openssl 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_api 0.57.2 (git+https://github.com/servo/webrender)",
"ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2639,7 +2668,7 @@ dependencies = [
"servo_url 0.0.1",
"std_test_override 0.0.1",
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_api 0.57.2 (git+https://github.com/servo/webrender)",
]
@@ -3303,7 +3332,7 @@ dependencies = [
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
"tinyfiledialogs 3.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_api 0.57.2 (git+https://github.com/servo/webrender)",
@@ -3392,7 +3421,7 @@ dependencies = [
"servo_url 0.0.1",
"style_traits 0.0.1",
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_api 0.57.2 (git+https://github.com/servo/webrender)",
"webvr_traits 0.0.1",
]
@@ -3515,7 +3544,7 @@ dependencies = [
[[package]]
name = "servo-media"
version = "0.1.0"
-source = "git+https://github.com/servo/media#c8cc491c850b18393586500233cc55e29800146c"
+source = "git+https://github.com/servo/media#4bed1cdc9dc9cc825080ae2d8d1dfa776b042199"
dependencies = [
"servo-media-audio 0.1.0 (git+https://github.com/servo/media)",
"servo-media-gstreamer 0.1.0 (git+https://github.com/servo/media)",
@@ -3525,7 +3554,7 @@ dependencies = [
[[package]]
name = "servo-media-audio"
version = "0.1.0"
-source = "git+https://github.com/servo/media#c8cc491c850b18393586500233cc55e29800146c"
+source = "git+https://github.com/servo/media#4bed1cdc9dc9cc825080ae2d8d1dfa776b042199"
dependencies = [
"boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byte-slice-cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3542,26 +3571,32 @@ dependencies = [
[[package]]
name = "servo-media-gstreamer"
version = "0.1.0"
-source = "git+https://github.com/servo/media#c8cc491c850b18393586500233cc55e29800146c"
+source = "git+https://github.com/servo/media#4bed1cdc9dc9cc825080ae2d8d1dfa776b042199"
dependencies = [
"byte-slice-cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glib-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gobject-subclass 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gst-plugin 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-app 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-audio 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-player 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-media-audio 0.1.0 (git+https://github.com/servo/media)",
"servo-media-player 0.1.0 (git+https://github.com/servo/media)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"zip 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "servo-media-player"
version = "0.1.0"
-source = "git+https://github.com/servo/media#c8cc491c850b18393586500233cc55e29800146c"
+source = "git+https://github.com/servo/media#4bed1cdc9dc9cc825080ae2d8d1dfa776b042199"
dependencies = [
"ipc-channel 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3630,7 +3665,7 @@ dependencies = [
"servo_geometry 0.0.1",
"servo_url 0.0.1",
"std_test_override 0.0.1",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -3648,7 +3683,7 @@ dependencies = [
[[package]]
name = "servo_media_derive"
version = "0.1.0"
-source = "git+https://github.com/servo/media#c8cc491c850b18393586500233cc55e29800146c"
+source = "git+https://github.com/servo/media#4bed1cdc9dc9cc825080ae2d8d1dfa776b042199"
dependencies = [
"proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3681,7 +3716,7 @@ dependencies = [
"malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_rand 0.0.1",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -4367,7 +4402,7 @@ dependencies = [
[[package]]
name = "url"
-version = "1.7.1"
+version = "1.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4381,7 +4416,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -4516,7 +4551,7 @@ dependencies = [
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -4541,7 +4576,7 @@ dependencies = [
"serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_config 0.0.1",
"servo_url 0.0.1",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"webdriver 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -4726,7 +4761,7 @@ dependencies = [
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -4941,7 +4976,9 @@ dependencies = [
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum glutin 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "535c6eda58adbb227604b2db10a022ffd6339d7ea3e970f338e7d98aeb24fcc3"
"checksum glx 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "52ec1845f1defffd4e469ff2e3a38b2e042345a0f80a82e84ee508ba5f1e11d6"
+"checksum gobject-subclass 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23a365ac97171d914fc0f2ccf86f3a05ae4ee870427eee9c82f6bb95bbf201b6"
"checksum gobject-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08475e4a08f27e6e2287005950114735ed61cec2cb8c1187682a5aec8c69b715"
+"checksum gst-plugin 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3225ac2bfebc921ec5a11f52bb95e1b30d48b80d3ebde3d1ce7a800405d1b8e5"
"checksum gstreamer 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df451f98ea8b987b5fc1b647b9f038ca6ea106b08c3bccc1ef3126d4f0a687c1"
"checksum gstreamer-app 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f4f865cf7f22c66907372a2e3b0f0ced3d3fedab823641d6667d2568be71408"
"checksum gstreamer-app-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f0b8319fe7a8a015412a76a56b248a3c68561a39225a3fa0fcbb58aab8e12392"
@@ -4951,7 +4988,7 @@ dependencies = [
"checksum gstreamer-base-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1eb57a7d013604ab7af2b843b62b13b8fb30f22d066919f7e198f528c3296cd0"
"checksum gstreamer-player 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1144c6c5c3af25dd1f89b4f9d2762f1c2d8789e65cdc79e2451dd24350d84dd2"
"checksum gstreamer-player-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f0e642cb58d3733e2724def7186101bb00144fc97d45b2c379eba6d0c0662dec"
-"checksum gstreamer-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18e3ff41a9e0bc96d345f25b1dd00cfda31edcab2aa19535af5312fdb80d062b"
+"checksum gstreamer-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "548bbd6a222826340953d2c1d50c3695463719cfb6414499300de5909a6ba1ea"
"checksum gstreamer-video 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0c1f04816d7e183714830da26274f97e7aeff09ae6641058538d21443b4ec07d"
"checksum gstreamer-video-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e2efb301a0b94fa4af503122faa04247085936dd888fd59fa4e21eab3cbd37"
"checksum gvr-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1334b94d8ce67319ddc44663daef53d8c1538629a11562530c981dbd9085b9a"
@@ -5169,7 +5206,7 @@ dependencies = [
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
-"checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6"
+"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a"
"checksum url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e7d099f1ee52f823d4bdd60c93c3602043c728f5db3b97bdb548467f7bddea"
"checksum utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6f923c601c7ac48ef1d66f7d5b5b2d9a7ba9c51333ab75a3ddf8d0309185a56"
"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs
index b38c0e9255f..6faa718a0a9 100644
--- a/components/script/dom/htmlmediaelement.rs
+++ b/components/script/dom/htmlmediaelement.rs
@@ -1657,6 +1657,17 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
TimeRanges::new(self.global().as_window(), self.played.clone())
}
+ // https://html.spec.whatwg.org/multipage/#dom-media-buffered
+ fn Buffered(&self) -> DomRoot<TimeRanges> {
+ let mut buffered = TimeRangesContainer::new();
+ if let Ok(ranges) = self.player.buffered() {
+ for range in ranges {
+ let _ = buffered.add(range.start as f64, range.end as f64);
+ }
+ }
+ TimeRanges::new(self.global().as_window(), Rc::new(DomRefCell::new(buffered)))
+ }
+
// https://html.spec.whatwg.org/multipage/#dom-media-texttracks
fn TextTracks(&self) -> DomRoot<TextTrackList> {
let window = window_from_node(self);
diff --git a/components/script/dom/timeranges.rs b/components/script/dom/timeranges.rs
index c82daac23a7..645de7b5799 100644
--- a/components/script/dom/timeranges.rs
+++ b/components/script/dom/timeranges.rs
@@ -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 {
diff --git a/components/script/dom/webidls/HTMLMediaElement.webidl b/components/script/dom/webidls/HTMLMediaElement.webidl
index d083b80ffff..0acd2a2c9a6 100644
--- a/components/script/dom/webidls/HTMLMediaElement.webidl
+++ b/components/script/dom/webidls/HTMLMediaElement.webidl
@@ -23,7 +23,7 @@ interface HTMLMediaElement : HTMLElement {
const unsigned short NETWORK_NO_SOURCE = 3;
readonly attribute unsigned short networkState;
[CEReactions] attribute DOMString preload;
- // readonly attribute TimeRanges buffered;
+ readonly attribute TimeRanges buffered;
void load();
CanPlayTypeResult canPlayType(DOMString type);
diff --git a/tests/wpt/metadata/html/dom/interfaces.https.html.ini b/tests/wpt/metadata/html/dom/interfaces.https.html.ini
index 8799fae2688..714d41cd428 100644
--- a/tests/wpt/metadata/html/dom/interfaces.https.html.ini
+++ b/tests/wpt/metadata/html/dom/interfaces.https.html.ini
@@ -6765,9 +6765,6 @@
[HTMLMediaElement interface: document.createElement("video") must inherit property "crossOrigin" with the proper type]
expected: FAIL
- [HTMLMediaElement interface: document.createElement("video") must inherit property "buffered" with the proper type]
- expected: FAIL
-
[HTMLMediaElement interface: document.createElement("video") must inherit property "getStartDate()" with the proper type]
expected: FAIL
@@ -6798,9 +6795,6 @@
[HTMLMediaElement interface: document.createElement("audio") must inherit property "crossOrigin" with the proper type]
expected: FAIL
- [HTMLMediaElement interface: document.createElement("audio") must inherit property "buffered" with the proper type]
- expected: FAIL
-
[HTMLMediaElement interface: document.createElement("audio") must inherit property "getStartDate()" with the proper type]
expected: FAIL
@@ -6831,9 +6825,6 @@
[HTMLMediaElement interface: new Audio() must inherit property "crossOrigin" with the proper type]
expected: FAIL
- [HTMLMediaElement interface: new Audio() must inherit property "buffered" with the proper type]
- expected: FAIL
-
[HTMLMediaElement interface: new Audio() must inherit property "getStartDate()" with the proper type]
expected: FAIL
@@ -6861,9 +6852,6 @@
[HTMLMediaElement interface: attribute crossOrigin]
expected: FAIL
- [HTMLMediaElement interface: attribute buffered]
- expected: FAIL
-
[HTMLMediaElement interface: operation getStartDate()]
expected: FAIL
@@ -9536,27 +9524,6 @@
[TextTrack interface: document.createElement("track").track must inherit property "inBandMetadataTrackDispatchType" with the proper type]
expected: FAIL
- [TimeRanges must be primary interface of document.createElement("video").buffered]
- expected: FAIL
-
- [Stringification of document.createElement("video").buffered]
- expected: FAIL
-
- [TimeRanges interface: document.createElement("video").buffered must inherit property "length" with the proper type]
- expected: FAIL
-
- [TimeRanges interface: document.createElement("video").buffered must inherit property "start(unsigned long)" with the proper type]
- expected: FAIL
-
- [TimeRanges interface: calling start(unsigned long) on document.createElement("video").buffered with too few arguments must throw TypeError]
- expected: FAIL
-
- [TimeRanges interface: document.createElement("video").buffered must inherit property "end(unsigned long)" with the proper type]
- expected: FAIL
-
- [TimeRanges interface: calling end(unsigned long) on document.createElement("video").buffered with too few arguments must throw TypeError]
- expected: FAIL
-
[TrackEvent interface: existence and properties of interface object]
expected: FAIL