New issue
Advanced search Search tips

Issue 601086 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 538318



Sign in to add a comment

Add MediaError field with informative text for PIPELINE_ERROR and MEDIA_ERROR_LOG_ENTRY errors

Project Member Reported by wolenetz@chromium.org, Apr 6 2016

Issue description

As of https://codereview.chromium.org/1858073002/, some of these errors can be exposed to devtools console (and later, perhaps, as a message attribute on MediaError to web-apps).

This bug tracks improving the quality of information reported by replacing numeric error codes with informative text.


 
Labels: Needs-BlinkMediaTriage
Labels: -Needs-BlinkMediaTriage

Comment 3 by foolip@chromium.org, Nov 11 2016

Cc: foolip@chromium.org

Comment 4 by foolip@chromium.org, Nov 11 2016

Cc: -phil...@opera.com
A message is good to have, but it'd also be nice to have a vendor specific error code which can be returned on the MediaError object for telemetry analysis. Are there any objections to adding a vendor specific field? 

Microsoft has msExtendedCode:
https://developer.microsoft.com/en-us/microsoft-edge/platform/documentation/apireference/interfaces/mediaerror/

I can't find anything similar for Firefox or Safari. I don't think we can standardize all the errors we might want to throw, so having an extended error code field seems reasonable. What would it take to get the ball rolling here?
Labels: -Pri-3 Pri-2
FF also has a vendor specific field on their MediaError object IIRC from FOMS/Demuxed 2016.

Increasing priority, since exposure of similar error details to apps in Chrome is highly requested.


Summary: Add MediaError field with informative text for PIPELINE_ERROR and MEDIA_ERROR_LOG_ENTRY errors (was: Replace error codes with informative text for PIPELINE_ERROR and MEDIA_ERROR_LOG_ENTRY errors)
Cc: dalecur...@chromium.org
This bug tracks adding at least a vendor-prefixed error string field to MediaError in Chrome.

I've filed https://github.com/whatwg/html/issues/2085 ('Include a "message" field in MediaError object') to try to get a standardized (non-vendor-prefixed) message field added to MediaError.

foolip@, is a similar w3c bug necessary?
Hmm. I couldn't find a Firefox prefixed media error message field in their MediaError, but I recall they were at least quite open to adding such a thing from FOMS/Demuxed 2016.
FF indeed has an implementation (though enabled currently on a subset of their builds). Details @ https://github.com/whatwg/html/issues/2085#issuecomment-262634835
Cc: sande...@chromium.org
Dan, FYI.
wolenetz@, the important thing is getting Microsoft's input, and they don't participate at the WHATWG. If you know who to ask, I would suggest simply mailing them and www-archive@w3.org to ask about adding a message field. Some reaction would be nice.

The change will presumably propagate to w3c/html eventually, but if you need it sooner for process reasons you can of course create an issue to backport and poke the editors to get it done faster.
@#12 - I agree about getting feedback from MSFT. I've sent the message [1] to one of the W3C HTML5.1 MSFT editors (Travis Leithead) and an MSFT co-editor of the MSE spec (Jerry Smith), along with www-archive@w3.org, giving them notice of likelihood of WHATWG adding the message field to MediaError, and requesting advance feedback. This may, of course, result in a full w3c HTML spec issue needing filing, but the conversation is at least now started.

[1] https://lists.w3.org/Archives/Public/www-archive/2016Nov/0004.html
@#12-13, MSFT responded in December 2016, giving support to this spec change:
https://lists.w3.org/Archives/Public/www-archive/2016Dec/0000.html

Project Member

Comment 15 by bugdroid1@chromium.org, Apr 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed8e7091b5b0a51a8c0781f95813a5929c1f8110

commit ed8e7091b5b0a51a8c0781f95813a5929c1f8110
Author: wolenetz <wolenetz@chromium.org>
Date: Fri Apr 21 16:28:59 2017

Add MediaError.message

This improves the level of information available for web authors to use
when debugging media playback errors.

* Adds support for the MediaError.message field [1] [2]

* Changes MediaLog::PipelineStatusToString() to return just a
  stringified version of the enum identifier, suitable for use as a
  UA-specific-code when included in MediaError.message.

* Changes MediaLog::GetErrorMessage() to produce messages in the form:
  [[Stringified pipeline error code, if any, without any colon][: The
  first MEDIA_ERROR_LOG_ENTRY from the log, if any, since that is most
  likely to contain the most precise error information]]
  The produced message does not contain any newlines.
  See the updated media_browsertest.cc for basic examples.

* When the message would otherwise be empty for various cases in
  HTMLMediaElement, and more meaningful information beyond the basic
  standard MediaError codes and HTMLMediaElement networkStates is
  available, reports basic additional information (prefixed by error
  code "MEDIA_ELEMENT_ERROR: ".) This should assist edge case
  differentiation. See the updated media_browsertest.cc for basic
  examples.

* Test coverage:
  * Adds basic layout test coverage test similar to that added in [3].
  * Adds basic content browser test coverage for a small variety of
    errors, since these messages' format and content are specific to
    Chrom*.

The format of the message string may change in future (for example, see
discussion in [4]). Also, the variety of error codes in the message
prior to the first ':' will likely change in future, and the descriptive
error message detail following the ':' will likely change to include
more cases or more consistent format in future.

[1] - https://github.com/whatwg/html/issues/2085
[2] - https://github.com/whatwg/html/pull/2086
[3] - https://github.com/w3c/web-platform-tests/pull/4638
[4] - https://github.com/whatwg/html/issues/2531
[Intent to implement and ship] -
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/yDIyWozG1xk

BUG= 601086 ,  710617 

Review-Url: https://codereview.chromium.org/2660003003
Cr-Commit-Position: refs/heads/master@{#466359}

[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/content/browser/media/media_browsertest.cc
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/content/browser/media/media_browsertest.h
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/content/renderer/media/render_media_log.cc
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/content/renderer/media/render_media_log.h
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/content/renderer/media/webmediaplayer_ms.cc
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/content/renderer/media/webmediaplayer_ms.h
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/content/renderer/media_capture_from_element/html_video_element_capturer_source_unittest.cc
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/media/base/media_log.cc
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/media/base/media_log.h
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/media/blink/webmediaplayer_impl.cc
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/media/blink/webmediaplayer_impl.h
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/media/test/data/player.html
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/LayoutTests/media/video-error-does-not-exist.html
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/Source/core/html/HTMLMediaElement.h
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/Source/core/html/media/MediaError.h
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/Source/core/html/media/MediaError.idl
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/Source/platform/testing/EmptyWebMediaPlayer.cpp
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/Source/platform/testing/EmptyWebMediaPlayer.h
[modify] https://crrev.com/ed8e7091b5b0a51a8c0781f95813a5929c1f8110/third_party/WebKit/public/platform/WebMediaPlayer.h

Status: Fixed (was: Assigned)
Marking fixed as of c#15. Potential merge to M59 will be done using the Launch-OWP bug for this ( bug 710617 ).
Project Member

Comment 17 by bugdroid1@chromium.org, Apr 24 2017

Labels: merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e9ea56b10a39d0ec3c0fa81962d6cb0702020586

commit e9ea56b10a39d0ec3c0fa81962d6cb0702020586
Author: Matt Wolenetz <wolenetz@chromium.org>
Date: Mon Apr 24 20:20:44 2017

To M59: Add MediaError.message

This improves the level of information available for web authors to use
when debugging media playback errors.

* Adds support for the MediaError.message field [1] [2]

* Changes MediaLog::PipelineStatusToString() to return just a
  stringified version of the enum identifier, suitable for use as a
  UA-specific-code when included in MediaError.message.

* Changes MediaLog::GetErrorMessage() to produce messages in the form:
  [[Stringified pipeline error code, if any, without any colon][: The
  first MEDIA_ERROR_LOG_ENTRY from the log, if any, since that is most
  likely to contain the most precise error information]]
  The produced message does not contain any newlines.
  See the updated media_browsertest.cc for basic examples.

* When the message would otherwise be empty for various cases in
  HTMLMediaElement, and more meaningful information beyond the basic
  standard MediaError codes and HTMLMediaElement networkStates is
  available, reports basic additional information (prefixed by error
  code "MEDIA_ELEMENT_ERROR: ".) This should assist edge case
  differentiation. See the updated media_browsertest.cc for basic
  examples.

* Test coverage:
  * Adds basic layout test coverage test similar to that added in [3].
  * Adds basic content browser test coverage for a small variety of
    errors, since these messages' format and content are specific to
    Chrom*.

The format of the message string may change in future (for example, see
discussion in [4]). Also, the variety of error codes in the message
prior to the first ':' will likely change in future, and the descriptive
error message detail following the ':' will likely change to include
more cases or more consistent format in future.

[1] - https://github.com/whatwg/html/issues/2085
[2] - https://github.com/whatwg/html/pull/2086
[3] - https://github.com/w3c/web-platform-tests/pull/4638
[4] - https://github.com/whatwg/html/issues/2531
[Intent to implement and ship] -
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/yDIyWozG1xk

BUG= 601086 ,  710617 

Review-Url: https://codereview.chromium.org/2660003003
Cr-Commit-Position: refs/heads/master@{#466359}
(cherry picked from commit ed8e7091b5b0a51a8c0781f95813a5929c1f8110)

TBR=jochen@chromium.org,sandersd@chromium.org,mlamouri@chromium.org,mcasas@chromium.org,dalecurtis@chromium.org,foolip@chromium.org

Review-Url: https://codereview.chromium.org/2837133002 .
Cr-Commit-Position: refs/branch-heads/3071@{#173}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/content/browser/media/media_browsertest.cc
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/content/browser/media/media_browsertest.h
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/content/renderer/media/render_media_log.cc
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/content/renderer/media/render_media_log.h
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/content/renderer/media/webmediaplayer_ms.cc
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/content/renderer/media/webmediaplayer_ms.h
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/content/renderer/media_capture_from_element/html_video_element_capturer_source_unittest.cc
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/media/base/media_log.cc
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/media/base/media_log.h
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/media/blink/webmediaplayer_impl.cc
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/media/blink/webmediaplayer_impl.h
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/media/test/data/player.html
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/LayoutTests/media/video-error-does-not-exist.html
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/Source/core/html/HTMLMediaElement.h
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/Source/core/html/media/MediaError.h
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/Source/core/html/media/MediaError.idl
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/Source/platform/testing/EmptyWebMediaPlayer.cpp
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/Source/platform/testing/EmptyWebMediaPlayer.h
[modify] https://crrev.com/e9ea56b10a39d0ec3c0fa81962d6cb0702020586/third_party/WebKit/public/platform/WebMediaPlayer.h

Blocking: 538318

Sign in to add a comment