-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a playsinline attribute to <video> #1444
Conversation
Closes #1237. For most user agents this will be a no-op, but this gives a standardized pragma for opting into inline behavior in iOS Safari.
Gecko supports adding this (per @kentuckyfriedtakahe). |
As discussed at BlinkOn, I think this would be fine. I have been pocked multiple times by UX people who wanted to implement some auto-fullscreen behaviour in one way or another. Having an attribute that could be a semantic way to opt out of these behaviour would be good in case of. |
Awesome! Will let another editor review for any editorial issues. The phrasing of these type of "hints" is a bit delicate so if anyone finds it unsatisfactory concrete suggestions would be appreciated. |
if the <code data-x="attr-media-controls">controls</code> attribute is absent.</p> | ||
<p>User agents may allow users to view the video content in manners more suitable to the user, | ||
such as fullscreen or in an independent resizable window. (User agents may even trigger such a | ||
viewing mode by default upon playing a video, although they should not do so when the <code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a duplicate "should not" requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have suggestions on how to de-duplicate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"except as otherwise specified by playsinline"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a suggestion as a commit. I thought this paragraph was more suitable to have the requirement and the definition of the attribute can talk more abstract.
Thanks @zcorpan, your version seems great. Can I get a LGTM? |
playback area.</p> | ||
<p>The <dfn><code data-x="attr-video-playsinline">playsinline</code></dfn> is a <span>boolean | ||
attribute</span>. If present, it serves as a hint to the user agent that the video ought to not be | ||
displayed fullscreen or in an independent resizable window by default, but instead "inline" in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nor is only used with neither. It could be "ought to neither be displayed fullscreen nor in an independent..." that does sound a bit better.
https://bugs.webkit.org/show_bug.cgi?id=159283 Reviewed by Eric Carlson. Tests: media/video-playsinline.html media/video-webkit-playsinline.html Unprefix the webkit-playsinline content attribute, as an unprefixed version was added to the HTML spec by <whatwg/html#1444>. The new 'playsinline' content attribute reflects to a new DOM property of the same name. * html/HTMLAttributeNames.in: * html/HTMLVideoElement.idl: * html/MediaElementSession.cpp: (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@202660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The WHATWG has unprefixed `-webkit-playsinline` as `playsinline` (see: whatwg/html#1444) and iOS 10 intends to use it (https://webkit.org/blog/6784/new-video-policies-for-ios/).
The WHATWG has unprefixed `-webkit-playsinline` as `playsinline` (see: whatwg/html#1444) and iOS 10 intends to use it (https://webkit.org/blog/6784/new-video-policies-for-ios/).
The WHATWG has unprefixed `-webkit-playsinline` as `playsinline` (see: whatwg/html#1444) and iOS 10 intends to use it (https://webkit.org/blog/6784/new-video-policies-for-ios/). (cherry picked from commit 7b11aa9)
Hey, all. Just curious if there's any particular reason |
I couldn't get it working on Iphone 7 even by building the ipa as development target = iOS 10. |
A better place to raise that would be https://bugs.webkit.org/enter_bug.cgi?product=WebKit (or potentially Stack Overflow, but it sounds like you found a bug in Safari). |
https://bugs.webkit.org/show_bug.cgi?id=159283 Reviewed by Eric Carlson. Tests: media/video-playsinline.html media/video-webkit-playsinline.html Unprefix the webkit-playsinline content attribute, as an unprefixed version was added to the HTML spec by <whatwg/html#1444>. The new 'playsinline' content attribute reflects to a new DOM property of the same name. * html/HTMLAttributeNames.in: * html/HTMLVideoElement.idl: * html/MediaElementSession.cpp: (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback): Canonical link: https://commits.webkit.org/177402@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Closes #1237. For most user agents this will be a no-op, but this gives
a standardized pragma for opting into inline behavior in iOS Safari.
#1237 did not contain any implementer objections, and discussions at BlinkOn with @mounirlamouri indicated to me that he would be supportive of implementing this in Blink (as a no-op, although you'd have to add a line to our IDL file for the IDL attribute). @mounirlamouri, I'd appreciate if you'd confirm my impression of your comments though; I don't want to speak on your behalf.
If my impression was correct, that should give us two UAs with intent to implement, and no UAs with objections, which meets the bar for merging this.
/cc @hober @othermaciej @grorg. Also /cc @kentuckyfriedtakahe from Gecko as he was CCed on that thread but did not get a chance to comment.