8thwall / web

8th Wall Web projects and resources.
515 stars 326 forks source link

Video not playing #155

Closed eyeSphere closed 3 years ago

eyeSphere commented 3 years ago

Hello, I tried to create a green screen & SLAM project, using 8th Wall's example.

However, the video isn't playing on neither the example (alpaca) nor my project.

It just shows the 1st frame of the video as a static image.

I didn't change anything from the example except replacing the video with my own (but even the default one doesn't work).

Does anyone have any suggestions?

Thank you

atomarch commented 3 years ago

Hello @eyeSphere, the green screen alpaca sample project (https://www.8thwall.com/8thwall/alphavideo-aframe or https://github.com/8thwall/web/tree/master/examples/aframe/alpha-video) uses an image target as a trigger.

The green screen video will appear if/when you launch the experience and then point your phone at the image target:

https://github.com/8thwall/web/blob/master/examples/aframe/alpha-video/targets/outside.jpg

If you are looking for a markerless example of a green screen video, check out https://www.8thwall.com/playground/alpha-video-slam-aframe

eyeSphere commented 3 years ago

Hello and thanks for your reply.

I should have been more clear in my description. The Green Screen & SLAM demo is the one I was referring to, which doesn't play on iOS. I understand that webkit doesn't allow autoplay for video & audio, so I'm looking for an example / information on a workaround.

Thank you

atomarch commented 3 years ago

Yes, you can autoplay video as long as its muted. I just tested https://www.8thwall.com/playground/alpha-video-slam-aframe on a number of devices running various iOS releases (iPhone 6, X, XS Max, SE, 12 Pro Max) and they are all working.

Sounds like you might have have Low Power Mode enabled on the phone? - Safari is notorious for breaking video playback when low power mode is enabled….

atomarch commented 3 years ago

And if you are looking to use a video that has sound, you'll need to initiate playback via a user gesture, such as a tap.

eyeSphere commented 3 years ago

Thank you very much, this was indeed the issue (my bad for not checking this before).

Can you point me to some directions or an example that uses a gesture such as tap to initiate playback?

Thanks again for your help.

atomarch commented 3 years ago

Both https://www.8thwall.com/8thwall/flyer-aframe/master/body.html#L38 and https://github.com/8thwall/web/blob/master/examples/aframe/flyer/index.html#L57 are video assets that play upon click

eyeSphere commented 3 years ago

Thank you. I notice that these examples use an image that activates the video when taped.

Is there a way on the Green Screen & Slam implementation to tap anywhere on the screen and activate both video & audio simultaneously?