mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 11:15:34 +00:00
Bug 784932 - Allow HTMLMediaElement.buffered to be read when readyState > HAVE_NOTHING instead of > HAVE_METADATA. r=roc
This commit is contained in:
parent
0bb2ab1660
commit
e0a0b091c1
@ -3429,7 +3429,7 @@ nsHTMLMediaElement::CopyInnerTo(nsGenericElement* aDest)
|
|||||||
nsresult nsHTMLMediaElement::GetBuffered(nsIDOMTimeRanges** aBuffered)
|
nsresult nsHTMLMediaElement::GetBuffered(nsIDOMTimeRanges** aBuffered)
|
||||||
{
|
{
|
||||||
nsRefPtr<nsTimeRanges> ranges = new nsTimeRanges();
|
nsRefPtr<nsTimeRanges> ranges = new nsTimeRanges();
|
||||||
if (mReadyState >= nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA && mDecoder) {
|
if (mReadyState > nsIDOMHTMLMediaElement::HAVE_NOTHING && mDecoder) {
|
||||||
// If GetBuffered fails we ignore the error result and just return the
|
// If GetBuffered fails we ignore the error result and just return the
|
||||||
// time ranges we found up till the error.
|
// time ranges we found up till the error.
|
||||||
mDecoder->GetBuffered(ranges);
|
mDecoder->GetBuffered(ranges);
|
||||||
|
Loading…
Reference in New Issue
Block a user