I'm making a VR 360 application using Ionic2 and Aframe. It should be easy because Aframe is all you need to do it (you set a video asset and load it from a videosphere primitive) but I don´t get the desire result. I have the problem with Ios (works fine in Android and in browser), when I run the application in my iphone the video is played in Iphone player and not in my application therefore I don´t have 360 efect. I add playsinline like documentation says, I add
<meta name="apple-mobile-web-app-capable" content="yes"/>
too, but not work. I use the next code:
<a-scene>
<a-assets>
<video id="video" src="assets/img/video1.mp4" loop crossorigin playsinline></video>
<img id="cubes-thumb" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/thumb-cubes.jpg">
<img id="cubes" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/cubes.jpg">
</a-assets>
<a-videosphere src="#video" rotation="0 180 0"></a-videosphere>
<a-image class="link" src="#cubes" position="0 0 -1"></a-image>
<!--<a-entity id="links" layout="type: line; margin: 1.5" position="0 -1 -4">
<a-entity template="src: #cubes" data-src="#cubes" data-thumb="#cubes-thumb"></a-entity>
</a-entity>-->
<a-entity camera look-controls>
<a-cursor id="cursor"
animation__click="property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150"
animation__fusing="property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 1500"
event-set__1="_event: mouseenter; color: green"
event-set__2="_event: mouseleave; color: black"
raycaster="objects: .link"
material="color:black">
</a-cursor>
</a-entity>
</a-scene>
I thought the problem could be autoplay and I have disable it and I trigger play with a button but I have the same result.
Anyidea what more can I try?
thanks.
Incredible, all weekend searching for an answer and after I post my question I've found it 😓
I needed to add to my config.xml
Here is the answer that helped me
Playing video inline in Ionic/Phonegap (webkit-playsinline not working)