argonjs / argon

An open-standards augmented reality platform for the web
http://argonjs.io/
Apache License 2.0
404 stars 73 forks source link

Autoplay video on Argon #34

Open spuri9 opened 8 years ago

spuri9 commented 8 years ago

I used aframe texture to incorporate video The video plays fine on safari. However on Argon it does not play even though I have set the video to auto play.

On safari image

On Argon image_1 image_2

speigg commented 8 years ago

Can you give us a link?

blairmacintyre commented 8 years ago

Wonder if this is the reason http://stackoverflow.com/questions/39604747/ios10-auto-play-not-working-on-wkwebview-requiresuseractionformediaplayback

speigg commented 8 years ago

Must be

spuri9 commented 8 years ago

https://www.prism.gatech.edu/~spuri9/argon-aframe-master/examples/basic/index.html Should I be creating buttons to enable play/pause?

speigg commented 8 years ago

@spuri9 buttons may work as a workaround for now, but we should be able to fix this for the next update easily.

Insanityandme commented 7 years ago

@spuri9 are you getting the video to play inside of the argon reality view or does it redirect you to the devices video player?

Because you're talking about autoplay but I just want to know if you can get the video to even play inside of the reality view.

blairmacintyre commented 7 years ago

Are you asking about playing videos inside a reality (E.g., as a custom reality) or just inside the browser itself (As media elements on DIVs or for loading into textures). I can get them to work on an iPad, but not on an iPhone.

Insanityandme commented 7 years ago

through vuforia I'm tracking an object (let's say a book) on top of that book I've created a threejs object that embeds a video, the function I'm looking for is to play that video (with a play button for now) that is shown when vuforia has recognized the object.

Insanityandme commented 7 years ago

I'm using an Iphone 5 fyi.

blairmacintyre commented 7 years ago

Check out https://webkit.org/blog/6784/new-video-policies-for-ios/

That helped me. I couldn't get things to autoplay on the iphone, but did manage to play via a click handler (it's be a while since I used the handler, though -- right now, I'm just tapping the video to play, which unfortunately makes it full screen on the iphone)

Insanityandme commented 7 years ago

The fullscreen is the issue I'm wanting to address but perhaps it's not possible at the moment to fix, thanks!