-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Videos and videospheres don't work on mobile #316
Comments
Mobile browser can't autoplay(Require a user action to play). |
Thanks got it working by having a button at the beginning |
Thanks for filing. I think this was reported on the Slack but not filed here. Playing videos on mobile requires a user-initiated event (e.g., click). It's on the "roadmap" (TBD in #299) to design and expose video controls for videos. |
@staus do you have a snippet you can share? Playing with this too and my attempts at a button to start have been unsuccessful so far.. thanks! Here is what I'm playing around with - http://codepen.io/matthewsimo/pen/yeaLxP |
@gtk2k made a workaround using a component: https://gtk2k.github.io/aframe_videosphere/ (source: https://github.com/gtk2k/gtk2k.github.io/tree/master/aframe_videosphere) I'll likely be implementing something similar in the interim. |
How do I start the 360 Video stock aframe demo on mobile? https://aframe.io/examples/showcase/videosphere/ |
For iOS, need to set For |
If a VR page is pinned and launched from the homescreen (i.e., To encourage users to do that, I want to show instructions in a modal/toaster similar to http://forecast.io/'s: |
FYI, if it's helpful: some meta tags are needed to allow for the home screen app:
|
@https://gtk2k.github.io/aframe_videosphere/ |
@mattdesl brings us https://github.com/jam3/ios-video-test! |
@cvan |
@mobiwu Have any more details than that? That might be a result of trying to do cross-origin videos on Safari, which I haven't found a way to support. |
@ngokevin |
Summary from the docs:
|
@villalard Thanks for the response, your feedback is much appreciated. It's weird because the other link works. |
@SonarSystems if you can connect your device using USB to use remote debugging in Firefox or Chrome for Android, you get the console logs/warnings. if you have those, paste them here and those will be super helpful. |
@cvan Every time I debug using Firefox, when it crashes the console disappears on my computer because of the crash. Can I save the log some how? |
@SonarSystems whoa, very odd. I'm not sure. @caseyyee, do you know? I know you're good with mobile debugging. |
@SonarSystems I have re-encoded the videos in my test (http://www.wearevr.tech/content/clients/concepts/vr_cinema/index.html) but the crash still occurs when going into stereoscopic. I have tried all the other examples listed on this link and they all crash Firefox when going into VR mode. Can you tell me which example you are talking about that you say works? |
@villalard Well they were all working but now when I go onto it none of them work. Could you send me the original encoded files and I will try them please. You can send them to support@sonarsystems.co.uk Cheers |
Hi everybody, |
@Chocap Safari for iOS provides an option to pin a web page to the iOS homescreen; see this comment above for an image showing it There's actually a whole open-source library that adds a modal that makes it more obvious: http://cubiq.org/add-to-home-screen I considered it, but I'm thinking it'd be overkill to add to A-Frame. Someone could create a third-party A-Frame component (see this curated list of community components). |
This problem didn't solve before,Not going to study aframe. |
Thank you for your contribution, the video can be played however I am not able to have it displayed in a double screen for VR... I would say it is the webkit-playsinline which does the work? |
Here, take this... it should help you on your way: |
you have to pass the video element or a canvas texture to WebGL. https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Animating_textures_in_WebGL so that means this iOS trick, which actually just https://github.com/bfred-it/iphone-inline-video (demo) works for only 2D/3D CSS stuff, not WebGL stuff. it's a sweet trick nonetheless. read https://mobile.twitter.com/feross/status/715826759032287232 for more info. |
@ngokevin this is awesome. great work, @mayognaise - thanks! I'm glad we now have a (third-party) component for iOS video now. now, we just need a component to enable video I could be convinced to add to A-Frame support for I am almost done with a PR for Firefox for iOS that will enable inline video playback: mozilla-mobile/firefox-ios#1651 When it merges and is shipped in the release version of the browser, I'll be so happy 😄! And we can talk to Apple and Google to try to get them to do the same with their Safari and Chrome browsers for iOS. But, that's the best we can do. This is not an A-Frame problem. It's a restriction with Safari/Chrome for iOS. (And, although it's less than ideal, having users pin a site/webapp to the homescreen is not the end of the world.) I understand the desire for out-of-the-box inline video playback for iOS, but A-Frame should not bend over backwards for this. |
http://bfred-it.github.io/iphone-inline-video/demo/ |
Any news on this? Pretty big use killer for Cardboard |
You can read my comment above |
I guess this is what I'm hoping for. Are we under the impression there will never be a way to run videosphere automatically on page load without hacks? Sorry, new to js. |
Has anyone had any luck getting videosphere to work in a iOS WebView? I have:
I've also tried to add the videosphere demo on the A-Frame website to the homescreen and open it and I still can't see the video. |
so far, I had not luck on my side :-(
let me know! |
The <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>360 Video</title>
<meta name="description" content="360 Video — A-Frame">
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="aframe.min.js"></script>
</head>
<body>
<a-scene>
<a-assets>
<video id="video" src="test.mp4" loop webkit-playsinline></video>
</a-assets>
<a-videosphere src="#video" rotation="0 180 0"></a-videosphere>
</a-scene>
</body>
</html> |
Since I am on IOS, I pin it to the home screen and it works!!! (although I have no sound, I can display the image in double for the Google cardboard and the video plays by itself) Thank you! |
I've filed the last remaining issue (IMO): #1463 - enabling autoplay of sounds for iOS/Chrome for iOS + Chrome for Android. Other issues have been filed and fixed. If you have any questions about iOS inline video playback support, please read this comment: #316 (comment) If you have any further questions or comments, hop on over to Slack or Stack Overflow. Thanks, everyone! |
I've tried both mp4 and webm format, but at least on my Galaxy S6, it shows up black.
![screenshot_2015-12-21-09-40-18](https://cloud.githubusercontent.com/assets/7048437/11926804/04decaaa-a7c8-11e5-8ea3-d57eb8e05f4c.png)
It looks fine on desktop
The text was updated successfully, but these errors were encountered: