Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Issue 2660003003: Add MediaError.message (Closed)

Created:
3 years, 10 months ago by wolenetz
Modified:
3 years, 8 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, mlamouri+watch-blink_chromium.org, posciak+watch_chromium.org, Srirama
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://chromium.googlesource.com/chromium/src/+/ed8e7091b5b0a51a8c0781f95813a5929c1f8110

Patch Set 1 #

Patch Set 2 : Major rework to expand utility of message and include tests #

Patch Set 3 : --flakiness by using std::map, update virtual/stable/[win,mac] global interface listing too #

Total comments: 17

Patch Set 4 : Rework to single human-readable, newline-delimited, message string #

Patch Set 5 : Rebase and fix layout test failure #

Patch Set 6 : Simplify to just 1 string with no newlines: [status plus first MEDIA_ERROR_LOG_ENTRY], if any #

Total comments: 4

Patch Set 7 : Just rebase. Still working on updating per c#64 #

Patch Set 8 : Update message format to be code: detail #

Total comments: 7

Patch Set 9 : Address dalecurtis@'s comment: Use std::stringbuilder in RenderMediaLog::GetErrorMessage() #

Patch Set 10 : Address dalecurtis@'s comment: Document MediaLog::GetErrorMessage() potential for partial msg #

Total comments: 2

Patch Set 11 : Address dalecurtis@'s comment: undef STRINGIFY_STATUS_CASE #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -87 lines) Patch
M content/browser/media/media_browsertest.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/media/media_browsertest.cc View 1 2 3 4 5 6 7 4 chunks +37 lines, -0 lines 0 comments Download
M content/renderer/media/render_media_log.h View 1 2 3 4 5 6 3 chunks +8 lines, -4 lines 0 comments Download
M content/renderer/media/render_media_log.cc View 1 2 3 4 5 6 7 8 2 chunks +19 lines, -11 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/webmediaplayer_ms.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/media_capture_from_element/html_video_element_capturer_source_unittest.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M media/base/media_log.h View 1 2 3 4 5 6 7 8 9 2 chunks +16 lines, -2 lines 0 comments Download
M media/base/media_log.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +48 lines, -35 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M media/test/data/player.html View 1 6 chunks +43 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/video-error-does-not-exist.html View 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 5 6 7 10 chunks +55 lines, -15 lines 1 comment Download
M third_party/WebKit/Source/core/html/media/MediaError.h View 1 2 3 4 5 6 2 chunks +14 lines, -4 lines 2 comments Download
M third_party/WebKit/Source/core/html/media/MediaError.idl View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/EmptyWebMediaPlayer.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/testing/EmptyWebMediaPlayer.cpp View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebMediaPlayer.h View 1 2 3 4 5 6 7 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 94 (44 generated)
wolenetz
Please review: sandersd@: Everything, especially //media/* and //content/renderer/media/* mlamouri@: //third_party/WebKit/Source/core/html/* and the media/video-error-does-not-exist.html layout test ...
3 years, 8 months ago (2017-04-11 22:23:26 UTC) #14
sandersd (OOO until July 31)
Review for everything outside of third_party/. https://codereview.chromium.org/2660003003/diff/60001/content/browser/media/media_browsertest.cc File content/browser/media/media_browsertest.cc (right): https://codereview.chromium.org/2660003003/diff/60001/content/browser/media/media_browsertest.cc#newcode114 content/browser/media/media_browsertest.cc:114: void TestErrorMessage(const std::string& ...
3 years, 8 months ago (2017-04-12 01:09:38 UTC) #17
jochen (gone - plz use gerrit)
Dimitri, who's the right person these days to decide what types to expose in the ...
3 years, 8 months ago (2017-04-12 09:16:42 UTC) #19
mlamouri (slow - plz ping)
https://codereview.chromium.org/2660003003/diff/60001/content/browser/media/media_browsertest.cc File content/browser/media/media_browsertest.cc (right): https://codereview.chromium.org/2660003003/diff/60001/content/browser/media/media_browsertest.cc#newcode74 content/browser/media/media_browsertest.cc:74: std::string MediaBrowserTest::EncodeErrorMessage( Where is this called? https://codereview.chromium.org/2660003003/diff/60001/third_party/WebKit/Source/core/html/media/MediaError.h File third_party/WebKit/Source/core/html/media/MediaError.h ...
3 years, 8 months ago (2017-04-12 15:56:41 UTC) #20
mlamouri (slow - plz ping)
+foolip@ for an opinion on the comment above.
3 years, 8 months ago (2017-04-12 15:57:30 UTC) #22
foolip
https://codereview.chromium.org/2660003003/diff/60001/third_party/WebKit/Source/core/html/media/MediaError.h File third_party/WebKit/Source/core/html/media/MediaError.h (right): https://codereview.chromium.org/2660003003/diff/60001/third_party/WebKit/Source/core/html/media/MediaError.h#newcode60 third_party/WebKit/Source/core/html/media/MediaError.h:60: String message() const { return message_; } On 2017/04/12 ...
3 years, 8 months ago (2017-04-12 17:21:52 UTC) #23
wolenetz
Just a reply for now while I work on addressing sandersd@'s comments and await Dmitri/Jochen's ...
3 years, 8 months ago (2017-04-12 17:29:57 UTC) #24
foolip
https://codereview.chromium.org/2660003003/diff/60001/third_party/WebKit/Source/core/html/media/MediaError.h File third_party/WebKit/Source/core/html/media/MediaError.h (right): https://codereview.chromium.org/2660003003/diff/60001/third_party/WebKit/Source/core/html/media/MediaError.h#newcode60 third_party/WebKit/Source/core/html/media/MediaError.h:60: String message() const { return message_; } On 2017/04/12 ...
3 years, 8 months ago (2017-04-12 17:40:40 UTC) #25
wolenetz
On 2017/04/12 17:21:52, foolip_UTC7 wrote: > https://codereview.chromium.org/2660003003/diff/60001/third_party/WebKit/Source/core/html/media/MediaError.h > File third_party/WebKit/Source/core/html/media/MediaError.h (right): > > https://codereview.chromium.org/2660003003/diff/60001/third_party/WebKit/Source/core/html/media/MediaError.h#newcode60 > ...
3 years, 8 months ago (2017-04-12 17:42:12 UTC) #26
wolenetz
On 2017/04/12 17:40:40, foolip_UTC7 wrote: > https://codereview.chromium.org/2660003003/diff/60001/third_party/WebKit/Source/core/html/media/MediaError.h > File third_party/WebKit/Source/core/html/media/MediaError.h (right): > > https://codereview.chromium.org/2660003003/diff/60001/third_party/WebKit/Source/core/html/media/MediaError.h#newcode60 > ...
3 years, 8 months ago (2017-04-12 18:01:45 UTC) #27
wolenetz
On 2017/04/12 18:01:45, wolenetz wrote: > On 2017/04/12 17:40:40, foolip_UTC7 wrote: > > > https://codereview.chromium.org/2660003003/diff/60001/third_party/WebKit/Source/core/html/media/MediaError.h ...
3 years, 8 months ago (2017-04-12 19:37:22 UTC) #28
foolip
On 2017/04/12 19:37:22, wolenetz wrote: > On 2017/04/12 18:01:45, wolenetz wrote: > > On 2017/04/12 ...
3 years, 8 months ago (2017-04-13 06:38:28 UTC) #29
mlamouri (slow - plz ping)
On 2017/04/13 at 06:38:28, foolip wrote: > On 2017/04/12 19:37:22, wolenetz wrote: > > On ...
3 years, 8 months ago (2017-04-13 10:09:39 UTC) #30
foolip
On 2017/04/13 10:09:39, mlamouri wrote: > On 2017/04/13 at 06:38:28, foolip wrote: > > That ...
3 years, 8 months ago (2017-04-13 10:17:09 UTC) #31
wolenetz
On 2017/04/13 10:17:09, foolip_UTC7 wrote: > On 2017/04/13 10:09:39, mlamouri wrote: > > On 2017/04/13 ...
3 years, 8 months ago (2017-04-13 19:01:20 UTC) #32
wolenetz
On 2017/04/12 09:16:42, jochen wrote: > Dimitri, who's the right person these days to decide ...
3 years, 8 months ago (2017-04-13 19:30:47 UTC) #33
wolenetz
On 2017/04/13 19:01:20, wolenetz wrote: > On 2017/04/13 10:17:09, foolip_UTC7 wrote: > > On 2017/04/13 ...
3 years, 8 months ago (2017-04-13 20:15:25 UTC) #34
wolenetz
I've reworked this to be a single, human readable, newline-delimited message string (see updated CL ...
3 years, 8 months ago (2017-04-13 23:59:10 UTC) #36
wolenetz
Discussion on the spec issue (https://github.com/whatwg/html/issues/2531#issuecomment-294213577) is proceeding, but slowly. In the meantime, it looks ...
3 years, 8 months ago (2017-04-14 20:44:45 UTC) #43
wolenetz
Please take a look at patch set 6. Same reviewer coverage as before.
3 years, 8 months ago (2017-04-14 21:28:25 UTC) #46
sandersd (OOO until July 31)
lgtm. We should follow up by auditing all of the error message paths to improve ...
3 years, 8 months ago (2017-04-14 22:52:49 UTC) #49
foolip
On 2017/04/14 20:44:45, wolenetz wrote: > Discussion on the spec issue > (https://github.com/whatwg/html/issues/2531#issuecomment-294213577) is > ...
3 years, 8 months ago (2017-04-17 08:49:01 UTC) #52
wolenetz
On 2017/04/17 08:49:01, foolip_UTC7 wrote: > On 2017/04/14 20:44:45, wolenetz wrote: > > Discussion on ...
3 years, 8 months ago (2017-04-17 18:11:18 UTC) #53
mlamouri (slow - plz ping)
lgtm assuming the spec discussion concludes https://codereview.chromium.org/2660003003/diff/120001/content/browser/media/media_browsertest.cc File content/browser/media/media_browsertest.cc (right): https://codereview.chromium.org/2660003003/diff/120001/content/browser/media/media_browsertest.cc#newcode296 content/browser/media/media_browsertest.cc:296: GetParam()); Should there ...
3 years, 8 months ago (2017-04-18 12:37:59 UTC) #54
wolenetz
On 2017/04/18 12:37:59, mlamouri wrote: > lgtm assuming the spec discussion concludes > > https://codereview.chromium.org/2660003003/diff/120001/content/browser/media/media_browsertest.cc ...
3 years, 8 months ago (2017-04-18 17:52:53 UTC) #55
wolenetz
https://codereview.chromium.org/2660003003/diff/120001/content/browser/media/media_browsertest.cc File content/browser/media/media_browsertest.cc (right): https://codereview.chromium.org/2660003003/diff/120001/content/browser/media/media_browsertest.cc#newcode296 content/browser/media/media_browsertest.cc:296: GetParam()); On 2017/04/18 12:37:58, mlamouri wrote: > Should there ...
3 years, 8 months ago (2017-04-18 17:53:06 UTC) #56
wolenetz
jochen@ and mcasas@, friendly ping to please review this: jochen@: //third_party/WebKit/public/platform/*, third_party/WebKit/Source/platform/*, and API_OWNERS review ...
3 years, 8 months ago (2017-04-18 17:58:59 UTC) #57
DaleCurtis
Have you thought about how mega-sites like YouTube, Vimeo, Facebook will be able to tokenize ...
3 years, 8 months ago (2017-04-18 18:25:11 UTC) #59
DaleCurtis
On 2017/04/18 at 18:25:11, DaleCurtis wrote: > Have you thought about how mega-sites like YouTube, ...
3 years, 8 months ago (2017-04-18 19:07:25 UTC) #60
wolenetz
On 2017/04/18 19:07:25, DaleCurtis wrote: > On 2017/04/18 at 18:25:11, DaleCurtis wrote: > > Have ...
3 years, 8 months ago (2017-04-18 20:15:41 UTC) #61
wolenetz
> On 2017/04/18 at 18:25:11, DaleCurtis wrote: .. > I'm a bit concerned about stuffing ...
3 years, 8 months ago (2017-04-18 20:34:27 UTC) #62
DaleCurtis
On 2017/04/18 at 20:34:27, wolenetz wrote: > > On 2017/04/18 at 18:25:11, DaleCurtis wrote: > ...
3 years, 8 months ago (2017-04-18 21:19:04 UTC) #63
wolenetz
On 2017/04/18 21:19:04, DaleCurtis wrote: > On 2017/04/18 at 20:34:27, wolenetz wrote: > > > ...
3 years, 8 months ago (2017-04-20 19:10:09 UTC) #64
wolenetz
Please review patch set 8: dalecurtis@: w.r.t. format of message change to [[code][: detail message]] ...
3 years, 8 months ago (2017-04-20 20:27:09 UTC) #68
DaleCurtis
https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc File content/renderer/media/render_media_log.cc (right): https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc#newcode95 content/renderer/media/render_media_log.cc:95: // Hold onto the most recent PIPELINE_ERROR and the ...
3 years, 8 months ago (2017-04-20 20:57:13 UTC) #70
wolenetz
https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc File content/renderer/media/render_media_log.cc (right): https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc#newcode95 content/renderer/media/render_media_log.cc:95: // Hold onto the most recent PIPELINE_ERROR and the ...
3 years, 8 months ago (2017-04-20 21:09:03 UTC) #71
wolenetz
On 2017/04/20 21:09:03, wolenetz wrote: > https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc > File content/renderer/media/render_media_log.cc (right): > > https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc#newcode95 > ...
3 years, 8 months ago (2017-04-20 21:11:59 UTC) #72
wolenetz
https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc File content/renderer/media/render_media_log.cc (right): https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc#newcode95 content/renderer/media/render_media_log.cc:95: // Hold onto the most recent PIPELINE_ERROR and the ...
3 years, 8 months ago (2017-04-20 21:23:40 UTC) #73
wolenetz
https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc File content/renderer/media/render_media_log.cc (right): https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc#newcode144 content/renderer/media/render_media_log.cc:144: std::string result = ""; On 2017/04/20 21:09:03, wolenetz wrote: ...
3 years, 8 months ago (2017-04-20 21:58:08 UTC) #74
wolenetz
https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc File content/renderer/media/render_media_log.cc (right): https://codereview.chromium.org/2660003003/diff/160001/content/renderer/media/render_media_log.cc#newcode144 content/renderer/media/render_media_log.cc:144: std::string result = ""; On 2017/04/20 21:09:03, wolenetz wrote: ...
3 years, 8 months ago (2017-04-20 22:13:38 UTC) #75
sandersd (OOO until July 31)
lgtm.
3 years, 8 months ago (2017-04-20 22:29:44 UTC) #76
DaleCurtis
media log format lgtm, defer to sandersd@ for rest of review. Thanks Matt! https://codereview.chromium.org/2660003003/diff/200001/media/base/media_log.cc File ...
3 years, 8 months ago (2017-04-20 22:37:30 UTC) #77
wolenetz
https://codereview.chromium.org/2660003003/diff/200001/media/base/media_log.cc File media/base/media_log.cc (right): https://codereview.chromium.org/2660003003/diff/200001/media/base/media_log.cc#newcode194 media/base/media_log.cc:194: } On 2017/04/20 22:37:30, DaleCurtis wrote: > #undef macro ...
3 years, 8 months ago (2017-04-20 23:01:30 UTC) #78
jochen (gone - plz use gerrit)
lgtm
3 years, 8 months ago (2017-04-21 08:40:50 UTC) #83
mlamouri (slow - plz ping)
lgtm with the Finalized questions answered. https://codereview.chromium.org/2660003003/diff/220001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2660003003/diff/220001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode224 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:224: String BuildElementErrorMessage(const String& ...
3 years, 8 months ago (2017-04-21 10:26:24 UTC) #84
wolenetz
Thanks for review, Mounir. mcasas@, I believe your review is all that's left pending at ...
3 years, 8 months ago (2017-04-21 10:47:00 UTC) #85
wolenetz
+emircan@ for reviewing media/media_capture_from_element/* Please take a look. Thanks!
3 years, 8 months ago (2017-04-21 10:57:56 UTC) #87
mcasas
On 2017/04/21 10:57:56, wolenetz wrote: > +emircan@ for reviewing media/media_capture_from_element/* > Please take a look. ...
3 years, 8 months ago (2017-04-21 15:43:19 UTC) #88
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2660003003/220001
3 years, 8 months ago (2017-04-21 16:23:54 UTC) #91
commit-bot: I haz the power
3 years, 8 months ago (2017-04-21 16:29:26 UTC) #94
Message was sent while issue was closed.
Committed patchset #11 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/ed8e7091b5b0a51a8c0781f95813...

Powered by Google App Engine
This is Rietveld 408576698