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

Issue 739152 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: ----



Sign in to add a comment

Video controls current time and remaining time are not formatted correctly

Project Member Reported by fbeaufort@chromium.org, Jul 4 2017

Issue description

Device name: Pixel Phone

From "Settings > About Chrome"
Application version: Chrome Canary 61.0.3145.0
Operating system:  Android 8.0.0; Pixel Build/OPP3.170518.006

URLs (if applicable): https://developer.apple.com/videos/play/wwdc2017/102/

Steps to reproduce:
(1) Go to https://developer.apple.com/videos/play/wwdc2017/102/

Expected result:
Video controls current time and remaining time should be "00:00 / 01:43:11"

Actual result:
Video controls current time and remaining time are "000:00 / 103:11"
 
Screenshot_20170704-135957.png
139 KB View Download
For info, Safari says "0:00:00 / 01:43:11" instead of "00:00 / 01:43:11". I think I still prefer the latter one because it's shorter (YouTube does that as well).

Components: -Blink>Media>Video Blink>Media>Controls
Labels: -OS-Android Hotlist-Media-UX OS-All
Owner: rachelis@chromium.org
Status: Assigned (was: Unconfirmed)
I agree that showing minutes instead of hours is weird. FWIW, YT shows days too but I'm not sure that makes sense.

Regarding leading zeros, I'm not sure if there was a reason that I might be missing.

+rachelis@ WDYT of fbeaufort@'s proposal? We can quickly implement this if that's something you are happy with.
This is a case where it would be a helpful proposal put together in a clearly communicated way so I can review it in a short time. :) Would one of you be able to take that on? 
Cc: dah...@chromium.org rachelis@chromium.org
Owner: ----
Owner: steimel@chromium.org
FWIW, YouTube uses "0:00 / 1:43:11" (no extra leading zeros for unnecessary double-digiting)

So, for the proposal:

1) The end time would be split out into hours:minutes:seconds (maybe days too?) instead of the current state which only splits into minutes/seconds. This will always be padded to at least 1 minute digit and 2 second digits (e.g. 0:05 for a 5 second video), but will not zero-pad to make minutes or hours (or days if applicable) into 2 digits.

2) The start time will follow the same rules as above, not changing format at all based on the end time. For example, if we're 1 minute and 51 seconds into a 12 minute video, we would show "1:51 / 12:00" (not zero-padding the minutes).

Does that sound good to everyone?
To be clear, this would make our formatting the same as YouTube's (as far as I can tell)

Comment 7 by dah...@chromium.org, Aug 10 2017

SGTM, Thanks
Any thoughts on showing days too? Just checked and youtube on chrome desktop shows days, while the youtube app on my phone does not.

Comment 9 by dah...@chromium.org, Aug 11 2017

Do you have a link to a multi-day video? My inclination is to just go with hours. The number of multi-day videos is likely to be small, so I think we can just pick one. 
What's interesting is that the right panel of videos uses hours not days, but the main video uses days. I say let's just go for hours (just make sure we can handle lots of hour digits if needed). 
sounds good, thanks
I had two quick visuals in here: https://docs.google.com/presentation/d/1IV6sOaGqhRs72SQ8xYEMmB962jY87DzM7K-nK0MmNZw/edit#slide=id.p

(Made this last month and pretty much forgot about it -- shame on me!)
Thanks for providing the visuals. As far as I can tell, the visuals represent the plan as of comment 11, correct?
Hey folks, I'm happy to give feedback as needed. This is a good candidate for setting up an office hours slot with me. Jon - would you mind doing that?
Project Member

Comment 16 by bugdroid1@chromium.org, Aug 25 2017

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

commit e7d904a2cc1f1c54cb72d24f0436b13a6af10271
Author: Tommy Steimel <steimel@chromium.org>
Date: Fri Aug 25 00:35:39 2017

Update media controls time formatting to use hours

This CL changes the formatting rules of the media controls as follows:
[0-10) minutes   => m:ss
[10-60) minutes  => mm:ss
[1-10) hours     => h:mm:ss
[10-100) hours   => hh:mm:ss
[100-1000) hours => hhh:mm:ss
etc.

The current time format will no longer be affected by the duration. For
example, if we're 1 minute and 51 seconds into a 12 minute video, we
would show "1:51 / 12:00" (not zero-padding the minutes).


Bug:  739152 
Change-Id: Ibed50426593dff0c5541a3a9c88a0b6229a896b3
Reviewed-on: https://chromium-review.googlesource.com/611703
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Reviewed-by: apacible <apacible@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497265}
[modify] https://crrev.com/e7d904a2cc1f1c54cb72d24f0436b13a6af10271/third_party/WebKit/Source/core/layout/LayoutTheme.cpp
[modify] https://crrev.com/e7d904a2cc1f1c54cb72d24f0436b13a6af10271/third_party/WebKit/Source/core/layout/LayoutTheme.h
[modify] https://crrev.com/e7d904a2cc1f1c54cb72d24f0436b13a6af10271/third_party/WebKit/Source/core/layout/LayoutThemeTest.cpp
[modify] https://crrev.com/e7d904a2cc1f1c54cb72d24f0436b13a6af10271/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
[modify] https://crrev.com/e7d904a2cc1f1c54cb72d24f0436b13a6af10271/third_party/WebKit/Source/modules/media_controls/MediaControlsImplTest.cpp
[modify] https://crrev.com/e7d904a2cc1f1c54cb72d24f0436b13a6af10271/third_party/WebKit/Source/modules/media_controls/elements/MediaControlRemainingTimeDisplayElement.cpp
[modify] https://crrev.com/e7d904a2cc1f1c54cb72d24f0436b13a6af10271/third_party/WebKit/Source/modules/media_controls/elements/MediaControlRemainingTimeDisplayElement.h
[modify] https://crrev.com/e7d904a2cc1f1c54cb72d24f0436b13a6af10271/third_party/WebKit/Source/modules/media_controls/elements/MediaControlTimeDisplayElement.cpp
[modify] https://crrev.com/e7d904a2cc1f1c54cb72d24f0436b13a6af10271/third_party/WebKit/Source/modules/media_controls/elements/MediaControlTimeDisplayElement.h

Verified in Google Chrome 62.0.3195.0 (Official Build) canary (64-bit).
Thank you very much!
Screen Shot 2017-08-25 at 12.29.52 PM.png
272 KB View Download
Status: Verified (was: Assigned)

Sign in to add a comment