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

Issue 2046253002: When HLS redirects are encountered recreate WebMediaPlayer. (Closed)

Created:
4 years, 6 months ago by DaleCurtis
Modified:
4 years, 6 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, fs, gasubic, mlamouri+watch-blink_chromium.org, nessy, vcarbune.chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

When HLS redirects are encountered recreate WebMediaPlayer. Not all WebMediaPlayer implementations know how to play HLS, and if the URL does not contain an HLS identifier originally, a later redirect might break playback if the wrong implementation is chosen. When this occurs instead re-trigger Blink's loader with the redirected source URL that contains the proper HLS tagging. It's preferred to do this instead of either adding a shim WMP implementation that choses the real WMP during load() or making createWebMediaPlayer() block until redirects complete and then throwing away the data from those connections. BUG=618109 TEST=Manually tested espn.go.com and adds a new browser test. Committed: https://crrev.com/ea27a3ed74612a72945993222b01f6aaddccbfe4 Cr-Commit-Position: refs/heads/master@{#401777}

Patch Set 1 #

Patch Set 2 : It lives! #

Patch Set 3 : Cleanup. #

Total comments: 8

Patch Set 4 : Rename. #

Total comments: 4

Patch Set 5 : Explicit option. #

Total comments: 9

Patch Set 6 : Don't set m_currentSrc. #

Total comments: 2

Patch Set 7 : Comments. #

Patch Set 8 : Add browser test. #

Patch Set 9 : Fix compile failures. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -25 lines) Patch
M content/browser/media/media_browsertest.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/media/media_browsertest.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
A content/browser/media/media_redirect_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +67 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M media/base/android/media_codec_util.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M media/base/android/media_codec_util.cc View 1 2 1 chunk +5 lines, -13 lines 0 comments Download
M media/blink/buffered_data_source.h View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M media/blink/buffered_data_source.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M media/blink/multibuffer_data_source.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M media/blink/multibuffer_data_source.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 2 chunks +21 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A media/test/data/bear.m3u8 View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
A media/test/data/bear0.ts View 1 2 3 4 5 6 7 Binary file 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.h View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 5 6 6 chunks +15 lines, -7 lines 0 comments Download
M third_party/WebKit/public/platform/WebMediaPlayerClient.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (11 generated)
DaleCurtis
Publishing this so I can find it later in case we decide to go this ...
4 years, 6 months ago (2016-06-13 22:36:01 UTC) #2
DaleCurtis
Alternative: https://codereview.chromium.org/2060353004
4 years, 6 months ago (2016-06-13 22:36:11 UTC) #3
DaleCurtis
content/ folk hate the alternative, so we may need this after all. Please look over ...
4 years, 6 months ago (2016-06-13 23:26:24 UTC) #4
DaleCurtis
foolip, hubbe: Ping.
4 years, 6 months ago (2016-06-15 20:43:40 UTC) #5
hubbe
LGTM % nits https://codereview.chromium.org/2046253002/diff/40001/media/base/android/media_codec_util.h File media/base/android/media_codec_util.h (right): https://codereview.chromium.org/2046253002/diff/40001/media/base/android/media_codec_util.h#newcode69 media/base/android/media_codec_util.h:69: // Test whether a URL contains ...
4 years, 6 months ago (2016-06-15 21:07:56 UTC) #6
DaleCurtis
https://codereview.chromium.org/2046253002/diff/40001/media/base/android/media_codec_util.h File media/base/android/media_codec_util.h (right): https://codereview.chromium.org/2046253002/diff/40001/media/base/android/media_codec_util.h#newcode69 media/base/android/media_codec_util.h:69: // Test whether a URL contains "m3u8". (Using exactly ...
4 years, 6 months ago (2016-06-15 23:11:31 UTC) #7
hubbe
lgtm
4 years, 6 months ago (2016-06-15 23:25:08 UTC) #8
DaleCurtis
+mlamouri since foolip@ seems out.
4 years, 6 months ago (2016-06-16 16:53:57 UTC) #10
foolip
Last week was BlinkOn, sorry for the delay. This seems quite tricky to do in ...
4 years, 6 months ago (2016-06-20 10:30:44 UTC) #11
DaleCurtis
https://codereview.chromium.org/2046253002/diff/60001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2046253002/diff/60001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1446 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1446: // TODO(tguilbert): Remove once http://crbug.com/580626 is fixed. On 2016/06/20 ...
4 years, 6 months ago (2016-06-20 18:54:25 UTC) #12
DaleCurtis
foolip: Ping. Thanks!
4 years, 6 months ago (2016-06-22 01:34:17 UTC) #13
foolip
https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode3000 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:3000: loadResource(WebMediaPlayerSource(newUrl), contentType); This will still have the problems with ...
4 years, 6 months ago (2016-06-22 13:10:54 UTC) #14
DaleCurtis
https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode3000 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:3000: loadResource(WebMediaPlayerSource(newUrl), contentType); On 2016/06/22 at 13:10:54, Philip Jägenstedt wrote: ...
4 years, 6 months ago (2016-06-22 14:28:35 UTC) #15
foolip
https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode3000 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:3000: loadResource(WebMediaPlayerSource(newUrl), contentType); On 2016/06/22 14:28:35, DaleCurtis wrote: > On ...
4 years, 6 months ago (2016-06-22 16:01:52 UTC) #16
DaleCurtis
https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode3000 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:3000: loadResource(WebMediaPlayerSource(newUrl), contentType); On 2016/06/22 at 16:01:52, Philip Jägenstedt wrote: ...
4 years, 6 months ago (2016-06-22 16:17:41 UTC) #17
foolip
https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode3000 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:3000: loadResource(WebMediaPlayerSource(newUrl), contentType); On 2016/06/22 16:17:41, DaleCurtis wrote: > On ...
4 years, 6 months ago (2016-06-22 18:00:50 UTC) #18
DaleCurtis
https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2046253002/diff/80001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode3000 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:3000: loadResource(WebMediaPlayerSource(newUrl), contentType); On 2016/06/22 at 18:00:49, Philip Jägenstedt wrote: ...
4 years, 6 months ago (2016-06-22 23:16:15 UTC) #20
foolip
A bit concerned about how to make this less invasive, WDYT? Tests for this is ...
4 years, 6 months ago (2016-06-23 11:22:36 UTC) #21
DaleCurtis
Comments addressed. I'm not sure what to do about a test here though. We don't ...
4 years, 6 months ago (2016-06-23 18:55:57 UTC) #22
DaleCurtis
Latest patch set adds a test... though most of MediaBrowserTest's are disabled on Android, so ...
4 years, 6 months ago (2016-06-23 21:36:56 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2046253002/160001
4 years, 6 months ago (2016-06-23 22:14:01 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/211007)
4 years, 6 months ago (2016-06-23 22:23:25 UTC) #28
foolip
third_party/WebKit lgtm, I'll be OOO until Tuesday so if you need any more feedback please ...
4 years, 6 months ago (2016-06-23 23:00:20 UTC) #29
DaleCurtis
Thanks foolip@, hubbe@ can you take a nother pass over the new media_browsertest code? - ...
4 years, 6 months ago (2016-06-24 00:11:59 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2046253002/180001
4 years, 6 months ago (2016-06-24 00:14:47 UTC) #32
hubbe
lgtm
4 years, 6 months ago (2016-06-24 00:27:17 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2046253002/180001
4 years, 6 months ago (2016-06-24 00:45:51 UTC) #37
commit-bot: I haz the power
Committed patchset #9 (id:180001)
4 years, 6 months ago (2016-06-24 01:41:43 UTC) #38
commit-bot: I haz the power
4 years, 6 months ago (2016-06-24 01:44:41 UTC) #40
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/ea27a3ed74612a72945993222b01f6aaddccbfe4
Cr-Commit-Position: refs/heads/master@{#401777}

Powered by Google App Engine
This is Rietveld 408576698