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

support inline (and autoplay) videos on iOS when added to Homescreen #1179

Merged
merged 1 commit into from
Mar 23, 2016
Merged

support inline (and autoplay) videos on iOS when added to Homescreen #1179

merged 1 commit into from
Mar 23, 2016

Conversation

cvan
Copy link
Contributor

@cvan cvan commented Mar 16, 2016

No description provided.

@@ -147,6 +150,22 @@ var AScene = module.exports = registerElement('a-scene', {
}
},

promptForIOS: {
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'm going to move this logic to its own third-party component because I want to add an "Add to Homescreen" toast message. and, it's way too hairy to add all that logic to A-Frame core IMO.

@cvan
Copy link
Contributor Author

cvan commented Mar 23, 2016

this change enables inline videos to be played and automatically (when autoplay is set) when an A-Frame site is added to the homescreen from Safari for iOS. this change also enables any other webviews that want to allow inline playback. do note that inline playback will work only if webkit-playsinline is set on the <video> elements that are to played.

@cvan cvan modified the milestone: 0.2.0 Mar 23, 2016
if (!videoEl.hasAttribute('crossorigin')) {
videoEl.crossOrigin = true;
}
if (!videoEl.hasAttribute('webkit-playsinline')) {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to check if the attribute is already there? Can we just set it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we could

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants