Skip to content
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 playsInline as an allowed HTML property #7519

Merged
merged 1 commit into from
Aug 23, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/renderers/dom/shared/HTMLDOMPropertyConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ var HTMLDOMPropertyConfig = {
optimum: 0,
pattern: 0,
placeholder: 0,
playsInline: HAS_BOOLEAN_VALUE,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if we need to use the property here? I see that we currently have muted requiring the property (node.muted = true). Automated testing these things is tricky and I don't have a iOS10 preview to check myself - can you make a small component & run in a seed build that works, testing that toggling between true and false values when rendering actually works as expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that with HAS_BOOLEAN_VALUE alone the property is emitted and a test page works as expected in iOS 10.

I'm not sure toggling this value has a great deal of meaning though, as playsinline (at least as currently used by iOS) is only relevant as a modifier when autoplay is present. If both are true (and the video is muted or has no audio track) then iOS will play the video automatically and without fullscreen. If you toggle playsinline later it's unclear what we should expect -- immediate fullscreen? But re-toggling while it's fullscreen shouldn't make it go automatically inline again.

I can definitely build something to test this if you'd still like to know, but any findings we get are more likely to be filed as Safari bugs than anything for react. Hopefully I didn't misunderstand the request!

Copy link
Contributor

@syranide syranide Aug 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zpao muted is only MUST_USE_PROPERTY because user interaction affects its actual value (like input value).

poster: 0,
preload: 0,
profile: 0,
Expand Down