diff options
author | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2018-12-16 13:05:51 +0100 |
---|---|---|
committer | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2019-01-09 09:28:43 +0100 |
commit | f7eeb26f0a263b52fa984abd9a85e16ac9c0eeaf (patch) | |
tree | 7f44918c5da4bf83772f8d7ef56b3b50723b7a71 /components/script/dom/htmlmediaelement.rs | |
parent | 6c2c3f75b90f075d4f7d23b800706e745cb10f8c (diff) | |
download | servo-f7eeb26f0a263b52fa984abd9a85e16ac9c0eeaf.tar.gz servo-f7eeb26f0a263b52fa984abd9a85e16ac9c0eeaf.zip |
Force the usage of mp4 for media-element WPTs
Diffstat (limited to 'components/script/dom/htmlmediaelement.rs')
-rw-r--r-- | components/script/dom/htmlmediaelement.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs index ecbd5687bf9..b751e176fb4 100644 --- a/components/script/dom/htmlmediaelement.rs +++ b/components/script/dom/htmlmediaelement.rs @@ -314,7 +314,8 @@ impl HTMLMediaElement { .task_manager() .media_element_task_source() .queue_simple_event(self.upcast(), atom!("timeupdate"), &window); - self.next_timeupdate_event.set(time::get_time() + Duration::milliseconds(350)); + self.next_timeupdate_event + .set(time::get_time() + Duration::milliseconds(350)); } } @@ -1283,8 +1284,14 @@ impl HTMLMediaElementMethods for HTMLMediaElement { // https://html.spec.whatwg.org/multipage/#dom-navigator-canplaytype fn CanPlayType(&self, type_: DOMString) -> CanPlayTypeResult { match type_.parse::<Mime>() { + // XXX GStreamer is currently not very reliable playing OGG and most of + // the media related WPTs uses OGG if we report that we are able to + // play this type. So we report that we are unable to play it to force + // the usage of other types. + // https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/520 Ok(ref mime) - if (mime.type_() == mime::APPLICATION && mime.subtype() == mime::OCTET_STREAM) => + if (mime.type_() == mime::APPLICATION && mime.subtype() == mime::OCTET_STREAM) || + (mime.subtype() == mime::OGG) => { CanPlayTypeResult::_empty }, |