New issue
Advanced search Search tips

Issue 749355 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

All src= loading errors before HAVE_METADATA roll up into MediaFormatError which limits utility.

Project Member Reported by dalecur...@chromium.org, Jul 27 2017

Issue description

One of the top errors seen for progressive playbacks on YouTube is:

"MEDIA_ELEMENT_ERROR: Format error"

This is the top issue because everything that fails before we have metadata fails with this error:

  if (ready_state_ == WebMediaPlayer::kReadyStateHaveNothing) {
    // Any error that occurs before reaching ReadyStateHaveMetadata should
    // be considered a format error.
    SetNetworkState(WebMediaPlayer::kNetworkStateFormatError);
  }

https://cs.chromium.org/chromium/src/media/blink/webmediaplayer_impl.cc?l=1308

We should probably at least include the network error code or some other bit of information if we can. I.e. 403, 404, etc.

Matt or hubbe, do one of you want to take a look? Matt any insight into this choice?
 
HTMLMediaElement::MediaLoadingFailed() uses WMPI's GetErrorMessage() (if it's not empty) in populating MediaError.message for kNetworkStateFormatError while kLoadingFromSrcAttr (either src= or MSE, but not loading from <source> children of a media element -- kNetworkStateFormatError in <source> loads before HAVE_METADATA reached simply await/try the next <source> child).

src= loading failures before HAVE_METADATA need to populate a precise, safe-to-expose-to-web-app, MediaLogEvent::MEDIA_ERROR_LOG_ENTRY, to WMPI's |media_log_| prior to WMPI::OnError().

It looks to me like the src= load failure leading to "MEDIA_ELEMENT_ERROR: Format error" currently passes through https://cs.chromium.org/chromium/src/media/blink/webmediaplayer_impl.cc?rcl=9135c735d76c2dfc2509c1015b3c2b68a37b0250&l=1810

I also don't see where WMPI::OnError() results from WMPI::DataSourceInitialized(false) -- this means no RAPPOR or PIPELINE_ERROR event logging (and inclusion in error message), nor UMA reporting of appropriate pipeline error.

If MultiBufferDataSource emitted appropriate MEDIA_LOG(ERROR, media_log_) << "..." message before signaling failed initialization, then the first message logged there would be included in the resulting HTMLMediaElement.error's MediaError.message (along with PIPELINE_ERROR event message, which must exist, but it looks like it's also missing in WMPI::DataSourceInitialized(false) path... (see https://cs.chromium.org/chromium/src/content/renderer/media/render_media_log.cc?dr&l=127).

tl;dr: WMPI::DataSourceInitialized(false) error handling looks like it's missing the necessary MediaLog'ing of PIPELINE_ERROR, and MultiBufferDataSource looks like it's missing the necessary MediaLog'ing of MEDIA_ERROR_LOG_ENTRY error details. RAPPOR and UMA may also currently be missing reports for WMPI::DataSourceInitialized(false) -- or does WMPI::OnError() actually get called somehow in this case?
hubbe@, is this enough info for you to proceed with a fix?
(This bit of c#1 might not actually be true, *if* MultiBufferDataSource does the logging of PIPELINE_ERROR internally: " PIPELINE_ERROR event logging (and inclusion in error message), nor UMA reporting of appropriate pipeline error.
"). However, even so, if WMPI::OnError() doesn't occur on WMPI::DataSourceInitialized(false) path, then RAPPOR of the pipeline error doesn't occur.
Components: -Internals>Media Internals>Media>Network
Owner: hubbe@chromium.org
Status: Assigned (was: Available)
Summary: All src= loading errors roll up into MediaFormatError which limits utility. (was: All loading errors roll up into MediaFormatError which limits utility.)
Summary: All src= loading errors before HAVE_METADATA roll up into MediaFormatError which limits utility. (was: All src= loading errors roll up into MediaFormatError which limits utility.)
Cc: -hubbe@chromium.org
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment