Bug 163539 - [Modern Media Controls] Basic MediaController
Summary: [Modern Media Controls] Basic MediaController
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 10
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on: 163500
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-17 03:36 PDT by Antoine Quint
Modified: 2016-10-17 15:06 PDT (History)
3 users (show)

See Also:


Attachments
Patch (26.22 KB, patch)
2016-10-17 03:42 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch for landing (36.48 KB, patch)
2016-10-17 14:21 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch for landing (36.50 KB, patch)
2016-10-17 14:25 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch for landing (36.59 KB, patch)
2016-10-17 14:27 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch for landing (36.65 KB, patch)
2016-10-17 14:29 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2016-10-17 03:36:37 PDT
Now that we have all the controls figured out, we can create a very basic MediaController object that will be instantiated by the createControls() global function that is called from HTMLMediaElement::ensureMediaControlsInjectedScript() once the shadow root has been created and the appropriate scripts injected.
Comment 1 Radar WebKit Bug Importer 2016-10-17 03:37:01 PDT
<rdar://problem/28797542>
Comment 2 Antoine Quint 2016-10-17 03:38:23 PDT
Once https://bugs.webkit.org/show_bug.cgi?id=163500 is reviewed and lands, this patch will be updated to add the two new JS files to the WebCore Xcode project and the list of injected scripts.
Comment 3 Antoine Quint 2016-10-17 03:42:42 PDT
Created attachment 291807 [details]
Patch
Comment 4 Dean Jackson 2016-10-17 11:21:29 PDT
Comment on attachment 291807 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=291807&action=review

> Source/WebCore/Modules/modern-media-controls/main.js:29
> +    if (!!host) {

What's the point of the !!? What value provided here would not be true as just (host)?

> Source/WebCore/Modules/modern-media-controls/media/media-controller.js:36
> +        this.layoutTraits = LayoutTraits.macOS;
> +
> +        this.controls = new MacOSInlineMediaControls

I think you should put a FIXME: here to make it clear it won't always be macOS.

And I just noticed the M in MacOSInlineMediaControls. Are you going to have IOSInlineMediaControls?
Comment 5 Antoine Quint 2016-10-17 11:41:21 PDT
(In reply to comment #4)
> Comment on attachment 291807 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=291807&action=review
> 
> > Source/WebCore/Modules/modern-media-controls/main.js:29
> > +    if (!!host) {
> 
> What's the point of the !!? What value provided here would not be true as
> just (host)?

Old habits, will fix.

> > Source/WebCore/Modules/modern-media-controls/media/media-controller.js:36
> > +        this.layoutTraits = LayoutTraits.macOS;
> > +
> > +        this.controls = new MacOSInlineMediaControls
> 
> I think you should put a FIXME: here to make it clear it won't always be
> macOS.
> 
> And I just noticed the M in MacOSInlineMediaControls. Are you going to have
> IOSInlineMediaControls?

Yes, that's right. Class names always start with capitals.
Comment 6 Antoine Quint 2016-10-17 14:21:25 PDT
Created attachment 291873 [details]
Patch for landing
Comment 7 Antoine Quint 2016-10-17 14:25:42 PDT
Created attachment 291874 [details]
Patch for landing
Comment 8 Antoine Quint 2016-10-17 14:27:18 PDT
Created attachment 291876 [details]
Patch for landing
Comment 9 Antoine Quint 2016-10-17 14:29:03 PDT
Created attachment 291877 [details]
Patch for landing
Comment 10 WebKit Commit Bot 2016-10-17 15:05:58 PDT
Comment on attachment 291877 [details]
Patch for landing

Clearing flags on attachment: 291877

Committed r207436: <http://trac.webkit.org/changeset/207436>
Comment 11 WebKit Commit Bot 2016-10-17 15:06:02 PDT
All reviewed patches have been landed.  Closing bug.