diff options
author | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2018-09-21 17:49:13 +0200 |
---|---|---|
committer | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2018-10-08 16:12:03 +0200 |
commit | dba61ad1df38edd4a0d6fd911d61bbe26295d167 (patch) | |
tree | 22481041fc8d451d30cc54cc88318e3067afb44e /components/script/dom/htmlmediaelement.rs | |
parent | 5bbd09769c3d8910a11d014ed512a0e40f093c18 (diff) | |
download | servo-dba61ad1df38edd4a0d6fd911d61bbe26295d167.tar.gz servo-dba61ad1df38edd4a0d6fd911d61bbe26295d167.zip |
Do not set metadata until we have enough data
Diffstat (limited to 'components/script/dom/htmlmediaelement.rs')
-rw-r--r-- | components/script/dom/htmlmediaelement.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs index df29a860a3f..3a573fa0b81 100644 --- a/components/script/dom/htmlmediaelement.rs +++ b/components/script/dom/htmlmediaelement.rs @@ -969,7 +969,7 @@ impl HTMLMediaElement { fn handle_player_event(&self, event: &PlayerEvent) { match *event { PlayerEvent::MetadataUpdated(ref metadata) => { - if !self.have_metadata.get() { + if !self.have_metadata.get() && metadata.duration.is_some() { // https://html.spec.whatwg.org/multipage/#media-data-processing-steps-list // => "Once enough of the media data has been fetched to determine the duration..." // Step 1. |