WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
163679
[Modern Media Controls] Media Controller: elapsed and remaining time support
https://bugs.webkit.org/show_bug.cgi?id=163679
Summary
[Modern Media Controls] Media Controller: elapsed and remaining time support
Antoine Quint
Reported
2016-10-19 11:53:36 PDT
We need media controller support for the elapsed and remaining time labels and when the media current time is changed via the media API.
Attachments
Patch
(46.41 KB, patch)
2016-10-20 03:40 PDT
,
Antoine Quint
no flags
Details
Formatted Diff
Diff
Patch
(47.69 KB, patch)
2016-10-26 09:39 PDT
,
Antoine Quint
no flags
Details
Formatted Diff
Diff
Patch
(47.36 KB, patch)
2016-10-26 09:40 PDT
,
Antoine Quint
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-yosemite
(1.20 MB, application/zip)
2016-10-26 10:17 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews104 for mac-yosemite-wk2
(1.18 MB, application/zip)
2016-10-26 10:44 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews116 for mac-yosemite
(1.70 MB, application/zip)
2016-10-26 10:49 PDT
,
Build Bot
no flags
Details
Patch
(45.27 KB, patch)
2016-10-26 10:51 PDT
,
Antoine Quint
no flags
Details
Formatted Diff
Diff
Patch
(46.81 KB, patch)
2016-10-26 11:27 PDT
,
Antoine Quint
no flags
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Antoine Quint
Comment 1
2016-10-20 03:40:11 PDT
Created
attachment 292165
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2016-10-20 03:42:53 PDT
<
rdar://problem/28867270
>
Antoine Quint
Comment 3
2016-10-20 03:53:01 PDT
<
rdar://problem/28851675
>
Antoine Quint
Comment 4
2016-10-26 09:39:06 PDT
Created
attachment 292934
[details]
Patch
Antoine Quint
Comment 5
2016-10-26 09:40:04 PDT
Created
attachment 292935
[details]
Patch
Build Bot
Comment 6
2016-10-26 10:17:18 PDT
Comment on
attachment 292935
[details]
Patch
Attachment 292935
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/2379217
New failing tests: http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html
Build Bot
Comment 7
2016-10-26 10:17:20 PDT
Created
attachment 292940
[details]
Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 8
2016-10-26 10:44:22 PDT
Comment on
attachment 292935
[details]
Patch
Attachment 292935
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/2379436
New failing tests: http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html svg/wicd/test-rightsizing-b.xhtml
Build Bot
Comment 9
2016-10-26 10:44:24 PDT
Created
attachment 292944
[details]
Archive of layout-test-results from ews104 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 10
2016-10-26 10:49:29 PDT
Comment on
attachment 292935
[details]
Patch
Attachment 292935
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/2379448
New failing tests: http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html
Build Bot
Comment 11
2016-10-26 10:49:33 PDT
Created
attachment 292945
[details]
Archive of layout-test-results from ews116 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-yosemite Platform: Mac OS X 10.10.5
Antoine Quint
Comment 12
2016-10-26 10:51:46 PDT
Created
attachment 292946
[details]
Patch
Antoine Quint
Comment 13
2016-10-26 11:27:13 PDT
Created
attachment 292949
[details]
Patch
Dean Jackson
Comment 14
2016-10-26 11:32:45 PDT
Comment on
attachment 292949
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=292949&action=review
> Source/WebCore/Modules/modern-media-controls/media/remaining-time-support.js:48 > + syncControl() > + { > + const media = this.mediaController.media; > + if (isNaN(media.duration)) > + return; > + > + this.control.value = media.currentTime - media.duration; > + }
Don't we show 0 or something in the case of a missing duration? Will there ever be a case where we go from a media source with a duration to a source without a duration? e.g. if you set the .src to a live stream. In which case won't this code mean we'll still display the duration of the first src?
> LayoutTests/media/modern-media-controls/elapsed-time-support/elapsed-time-support.html:36 > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-item.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/button.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/buttons-container.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/icon-service.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/start-button.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/status-label.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/icon-button.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/play-pause-button.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/skip-back-button.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/airplay-button.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/pip-button.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/fullscreen-button.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/mute-button.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/tracks-button.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/volume-slider.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scrubber.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/time-label.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/time-control.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/placard.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/airplay-placard.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/pip-placard.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/media-controls.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/macos-media-controls.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/macos-inline-media-controls.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/media-controller-support.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/elapsed-time-support.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/mute-support.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/remaining-time-support.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/skip-back-support.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/start-support.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/media-controller.js" type="text/javascript"></script> > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/main.js" type="text/javascript"></script>
This is getting out of hand :)
Antoine Quint
Comment 15
2016-10-26 11:46:36 PDT
(In reply to
comment #14
)
> Comment on
attachment 292949
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=292949&action=review
> > > Source/WebCore/Modules/modern-media-controls/media/remaining-time-support.js:48 > > + syncControl() > > + { > > + const media = this.mediaController.media; > > + if (isNaN(media.duration)) > > + return; > > + > > + this.control.value = media.currentTime - media.duration; > > + } > > Don't we show 0 or something in the case of a missing duration?
Yes, the default value for a time label is 0, so until we get a duration, that's what we show.
> Will there ever be a case where we go from a media source with a duration to > a source without a duration? e.g. if you set the .src to a live stream. In > which case won't this code mean we'll still display the duration of the > first src?
I can't think of such a case. In the case of a live stream, we no longer show the time control and instead show a live broadcast label (coming soon with a new patch).
> > LayoutTests/media/modern-media-controls/elapsed-time-support/elapsed-time-support.html:36 > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-item.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/button.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/buttons-container.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/icon-service.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/start-button.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/status-label.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/icon-button.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/play-pause-button.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/skip-back-button.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/airplay-button.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/pip-button.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/fullscreen-button.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/mute-button.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/tracks-button.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/volume-slider.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scrubber.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/time-label.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/time-control.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/placard.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/airplay-placard.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/pip-placard.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/media-controls.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/macos-media-controls.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/macos-inline-media-controls.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/media-controller-support.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/elapsed-time-support.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/mute-support.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/remaining-time-support.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/skip-back-support.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/start-support.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/media/media-controller.js" type="text/javascript"></script> > > +<script src="../../../../Source/WebCore/Modules/modern-media-controls/main.js" type="text/javascript"></script> > > This is getting out of hand :)
It 100% is, I've been working today on removing this with a single JS script that loads all CSS and JS resources dynamically, but it's not quite ready yet.
WebKit Commit Bot
Comment 16
2016-10-26 12:10:50 PDT
Comment on
attachment 292949
[details]
Patch Clearing flags on attachment: 292949 Committed
r207905
: <
http://trac.webkit.org/changeset/207905
>
WebKit Commit Bot
Comment 17
2016-10-26 12:10:55 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug