aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/htmlmediaelement.rs2
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.