WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
156089
Add some logic to decide when a video can control the videoControlsManager
https://bugs.webkit.org/show_bug.cgi?id=156089
Summary
Add some logic to decide when a video can control the videoControlsManager
Beth Dakin
Reported
2016-03-31 16:14:57 PDT
Add some logic to decide when a video can control the videoControlsManager
rdar://problem/23833752
Attachments
Patch
(20.60 KB, patch)
2016-03-31 17:12 PDT
,
Beth Dakin
no flags
Details
Formatted Diff
Diff
Patch
(20.75 KB, patch)
2016-04-01 11:16 PDT
,
Beth Dakin
thorton
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Beth Dakin
Comment 1
2016-03-31 17:12:26 PDT
Created
attachment 275360
[details]
Patch
Beth Dakin
Comment 2
2016-04-01 11:16:56 PDT
Created
attachment 275421
[details]
Patch
Eric Carlson
Comment 3
2016-04-01 13:07:59 PDT
Comment on
attachment 275421
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=275421&action=review
This looks good to me modulo the minor nits noted, but I am not a WK2 reviewer so someone else will have to give the official nod.
> Source/WebCore/html/HTMLMediaElement.cpp:4847 > + if (endedPlayback() && document().page() && is<HTMLVideoElement>(*this))
As we discussed, this will cause issues when a video's src is changed in the 'ended' event to make a playlist. Probably worth filing a bug to investigate this.
> Source/WebCore/html/MediaElementSession.cpp:219 > + // FIXME: Audio elements should be able to have a controls manager as well. Audio elements > + // should probably only have a controls manager if they started playing via a user gesture.
It would be good to have a bug number here.
> Source/WebCore/html/MediaElementSession.cpp:233 > + if (renderer->clientWidth() >= elementMainContentMinimumWidth && renderer->clientHeight() >= elementMainContentMinimumHeight) { > + if (element.hasAudio() && element.hasVideo()) > + return true; > + }
Do you care if the <video> is visible in the page or not?
Beth Dakin
Comment 4
2016-04-04 14:21:59 PDT
Thanks Eric and Tim! (In reply to
comment #3
)
> Comment on
attachment 275421
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=275421&action=review
> > This looks good to me modulo the minor nits noted, but I am not a WK2 > reviewer so someone else will have to give the official nod. > > > Source/WebCore/html/HTMLMediaElement.cpp:4847 > > + if (endedPlayback() && document().page() && is<HTMLVideoElement>(*this)) > > As we discussed, this will cause issues when a video's src is changed in the > 'ended' event to make a playlist. Probably worth filing a bug to investigate > this. >
YouTube playlists do seem to work. Can you think of another playlist that might fail? I do want to file a bug, but I would like to have an example.
> > Source/WebCore/html/MediaElementSession.cpp:219 > > + // FIXME: Audio elements should be able to have a controls manager as well. Audio elements > > + // should probably only have a controls manager if they started playing via a user gesture. > > It would be good to have a bug number here. >
Added one:
rdar://problem/25537071
> > Source/WebCore/html/MediaElementSession.cpp:233 > > + if (renderer->clientWidth() >= elementMainContentMinimumWidth && renderer->clientHeight() >= elementMainContentMinimumHeight) { > > + if (element.hasAudio() && element.hasVideo()) > > + return true; > > + } > > Do you care if the <video> is visible in the page or not?
I think I might…still thinking this over actually. I can imagine kind of see it either way. If the video is still playing and the audio is still happening, it seems like it shouldn't matter that it has been scroll offscreen? But if the video stopped because it was scrolled away, then then we do care. We'll have to think this through. Thank you!
http://trac.webkit.org/changeset/199022
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