New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 673360 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Android MediaRouter only (left Chro...
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Remove upper limit of MediaImage download

Project Member Reported by zqzh...@chromium.org, Dec 12 2016

Issue description

Currently, the size limit for download MediaImage is 8x the ideal size. However images of >4x of the ideal size will not be used. We should make it consistent.

Also, perhaps make it as a device-independent value to avoid confusing web developers?
 
I don't think I agree with the notion here. Do you have more context?
The user won't understand we're showing a bad image to justify our network usage.
We wasted the bandwidth to learn the image is bad, seems okay to me. If we're worried about too large images we may look into cancelling the fetch if the download is larger than some number? For small images I think we shouldn't care.
Cc: avayvod@chromium.org
OK, I agree, if we do show the bad image, developers might abuse it.

Currently there's a bug in MediaImageManager, the upper size limit for downloading image is 8x, however if the image size is between 4x~8x, we rate it as 0. We need to make the two numbers consistent.

Seems there are a number of larger images than 4x, maybe we could try using 8x as limit.
Summary: Make upper size limit of media image download and evaluation consistent (was: If a MediaImage is successfully download, show it neglectless of it's size)
Description: Show this description
After discussing offline with Zhiqiang:
- should not show images that are smaller than the minimum as they won't look good and won't waster much bandwidth anyway (they're small)
- should remember and maybe revisit the decision on the upper limit - always shrink bigger images to the maximum supported size and use them
- in any case log a message to a developer if their image is too big or too small
- try to limit the download size with a reasonable pessimistic value so we don't try to download a 20Mb high-res photo over paid cellular connection
- ideally we'd be able to fetch metadata first and cancel download if the image is too big (or too small) - maybe image downloader already does that
I would recommend doing something simple. The Manifest code for the icons picks an image based on the information available in the file then simply uses it regardless of the size. If an image is larger than the ideal size, it will be used. No one ever complained about this behaviour. Given that Media Session will be used with media files, I don't think the bandwidth usage of an image is something we should worry about.

Leaving a console message to the developers when we couldn't find a decent image is probably a good idea though.
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 13 2016

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

commit db38286b8461683814d0fe2e6920feb864262968
Author: zqzhang <zqzhang@chromium.org>
Date: Tue Dec 13 22:34:48 2016

[MediaNotification] Removing upper limit of MediaImage sizes

Currently MediaImageManager uses 8x of the ideal size as the upper limit
for downloading image, however images of sizes between 4x~8x will be
rated as 0 and will not be used after they are downloaded.

This CL removes the upper size limit for MediaImage. The upper limit was
used to prevent download huge media images, however ImageDownloader does
not do it for us. As long as other modules (like manifest) don't enforce
upper limit on image sizes for download, it's OK to keep the pattern
consistent in media notification.

BUG= 673360 

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

[modify] https://crrev.com/db38286b8461683814d0fe2e6920feb864262968/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaImageManager.java

Status: Fixed (was: Started)
Summary: Remove upper limit of MediaImage download (was: Make upper size limit of media image download and evaluation consistent)

Sign in to add a comment