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

Issue 2344353003: Force preload=none and disable autoplay on lowend Android devices. (Closed)

Created:
4 years, 3 months ago by DaleCurtis
Modified:
4 years, 3 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, fs, gasubic, jam, kinuko+watch, mlamouri+watch-content_chromium.org, mlamouri+watch-blink_chromium.org, nasko+codewatch_chromium.org, nessy, Srirama, vcarbune.chromium
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Force preload=none and disable autoplay on lowend Android devices. Some older devices are unable to maintain multiple concurrent players without borking the system badly enough that it needs a reboot in order to continue playing media. We also disable autoplay and preloading on low-memory devices to avoid unnecessary codec churn. BUG=612909, 622826 TEST=less crashy JB devices. Committed: https://crrev.com/cd97125235326c121186b01e0b3484a60a98e791 Cr-Commit-Position: refs/heads/master@{#420073}

Patch Set 1 #

Patch Set 2 : Disable autoplay too. #

Total comments: 4

Patch Set 3 : Test added. #

Patch Set 4 : Fix enum namespace. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -3 lines) Patch
M content/renderer/render_view_impl.cc View 1 2 3 4 chunks +13 lines, -2 lines 1 comment Download
A third_party/WebKit/LayoutTests/media/video-force-preload-none.html View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Settings.in View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebSettingsImpl.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebSettingsImpl.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebSettings.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 29 (16 generated)
DaleCurtis
Probably we should disable autoplay on these devices as well.
4 years, 3 months ago (2016-09-16 22:39:28 UTC) #2
DaleCurtis
Actually, for sure we should disable autoplay with this too, see http://crbug.com/622826
4 years, 3 months ago (2016-09-16 23:02:09 UTC) #3
Srirama
https://codereview.chromium.org/2344353003/diff/20001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/2344353003/diff/20001/content/renderer/render_view_impl.cc#newcode1152 content/renderer/render_view_impl.cc:1152: base::android::BuildInfo::GetInstance()->sdk_int() <= 18 || how about using "SDK_VERSION_JELLY_BEAN_MR2" instead ...
4 years, 3 months ago (2016-09-17 08:45:04 UTC) #7
foolip
A test would be good, see LayoutTests/media/video-force-preload-none-to-metadata-on-load.html https://codereview.chromium.org/2344353003/diff/20001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2344353003/diff/20001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode2006 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:2006: || (document().settings() ...
4 years, 3 months ago (2016-09-19 13:58:55 UTC) #8
foolip
rs lgtm if I'm not responsive when the test is added and someone else reviews ...
4 years, 3 months ago (2016-09-19 13:59:55 UTC) #9
DaleCurtis
Test added. +esprehn for content/renderer review since it touches on Blink WebSettings API. https://codereview.chromium.org/2344353003/diff/20001/content/renderer/render_view_impl.cc File ...
4 years, 3 months ago (2016-09-19 21:04:46 UTC) #11
DaleCurtis
esprehn, mlamouri: Ping?
4 years, 3 months ago (2016-09-20 20:21:54 UTC) #12
esprehn
lgtm
4 years, 3 months ago (2016-09-20 22:04:56 UTC) #13
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/2344353003/60001
4 years, 3 months ago (2016-09-21 16:01:53 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-21 16:09:35 UTC) #25
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/cd97125235326c121186b01e0b3484a60a98e791 Cr-Commit-Position: refs/heads/master@{#420073}
4 years, 3 months ago (2016-09-21 16:12:55 UTC) #27
mlamouri (slow - plz ping)
Sorry the delay, I was off on Friday and at an offsite/conference this week. I ...
4 years, 3 months ago (2016-09-22 07:49:32 UTC) #28
DaleCurtis
4 years, 3 months ago (2016-09-22 17:02:31 UTC) #29
Message was sent while issue was closed.
I simulated testing of low end behavior on an A1 device; which while not 512mb,
is already a pretty bad experience (slow processor, single process, etc) -- this
was an improvement on that device. If you have an actual 512mb device, please
give it a go and let me know. I'm happy to revert the SysInfo portions if you
feel strongly.

I wasn't aware that SysInfo is frowned upon in the renderer, this is the case
that should be documented in the function signature. Do you have a link to
details on why this is frowned upon? In any case, the value is cached and always
pulled during RenderProcess startup:

https://cs.chromium.org/chromium/src/base/sys_info_android.cc?l=218
https://cs.chromium.org/chromium/src/content/renderer/render_process_impl.cc?...

Powered by Google App Engine
This is Rietveld 408576698