Bug 1194197: [MSE] Properly propagate decoding and network errors to media element. r=cpearce

This is not 100% per spec, however neither is our handling of those errors in the media element.
This commit is contained in:
Jean-Yves Avenard 2015-08-14 12:02:57 +10:00
parent 626ed9af14
commit 768fea2352

View File

@ -308,14 +308,10 @@ MediaSource::EndOfStream(const Optional<MediaSourceEndOfStreamError>& aError, Er
}
switch (aError.Value()) {
case MediaSourceEndOfStreamError::Network:
// TODO: If media element has a readyState of:
// HAVE_NOTHING -> run resource fetch algorithm
// > HAVE_NOTHING -> run "interrupted" steps of resource fetch
mDecoder->NetworkError();
break;
case MediaSourceEndOfStreamError::Decode:
// TODO: If media element has a readyState of:
// HAVE_NOTHING -> run "unsupported" steps of resource fetch
// > HAVE_NOTHING -> run "corrupted" steps of resource fetch
mDecoder->DecodeError();
break;
default:
aRv.Throw(NS_ERROR_DOM_INVALID_ACCESS_ERR);