Remove upper limit of MediaImage download |
|||||
Issue descriptionCurrently, 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?
,
Dec 12 2016
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.
,
Dec 12 2016
,
Dec 12 2016
,
Dec 12 2016
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
,
Dec 13 2016
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.
,
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
,
Dec 13 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by avayvod@chromium.org
, Dec 12 2016