From 296b9915989abf22dc2a3b6bf3fbcdbeeef9c44b Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Thu, 24 Mar 2011 11:28:57 +1300 Subject: [PATCH] Bug 628665 - Fire a 'waiting' event when play() is called on a media element with readyState HAVE_NOTHING. r=roc --- content/html/content/src/nsHTMLMediaElement.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp index 126bece8190..1544159e295 100644 --- a/content/html/content/src/nsHTMLMediaElement.cpp +++ b/content/html/content/src/nsHTMLMediaElement.cpp @@ -1382,6 +1382,9 @@ NS_IMETHODIMP nsHTMLMediaElement::Play() if (mPaused) { DispatchAsyncEvent(NS_LITERAL_STRING("play")); switch (mReadyState) { + case nsIDOMHTMLMediaElement::HAVE_NOTHING: + DispatchAsyncEvent(NS_LITERAL_STRING("waiting")); + break; case nsIDOMHTMLMediaElement::HAVE_METADATA: case nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA: FireTimeUpdate(PR_FALSE);