-
Notifications
You must be signed in to change notification settings - Fork 9
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
Video is black on Android Chrome, iOS Chrome and iOS Safari #8
Comments
Thank you for testing @thylacinelol ! Unfortunately i have no other devices for testing, so some bug may arise. I think that i need to add an extra attribute to https://github.com/webarkit/ARnft/blob/be2944db4bf61896cdbdd1435942d60ce489b8c0/examples/arNFT_video_example.html#L17-L26 |
Do you receive some error message in the console log? |
Maybe adding <video src="mov_bbb.mp4"
preload="auto" id="vid" response-type="arraybuffer" loop
crossorigin webkit-playsinline autoplay muted playsinline>
</video> |
Sorry i already added |
Hey, you're right, there is an error message in the console: |
Ok, we need to apply the right crossorigin attribute for that kind of browsers. |
i think that the crossOrigni attribute is correct but in some browsers it's needed the explicit consent by the user as described in this stackoverflow article https://stackoverflow.com/questions/57504122/browser-denying-javascript-play |
There's a "best practices" guide for safari here, looks interesting:
|
Similar approach on mozilla:
|
Can you try one of these approach please? 🙂 |
Ok I tried this approach for android firefox and it still doesn't work. I tried logging to console everything and I get to the part "// Start whatever you need to do only after playback has begun." which means that it works regardless of this script. However, I checked the logs more closely and found some other warnings which do not appear in chrome. Here's a screenshot of chrome console log: And here's a screenshot of firefox console log: Maybe these warnings are related to this issue?
|
Then maybe is an issue with Three.js, maybe the addVIdeo function need some tweaks. |
I will try to add this in the addVideo function: ARVideo.preload = 'auto'
ARVideo.autoload = true |
Can you test this code in webarkit/ARnft#173 @thylacinelol ? i can't do remote debugging with my device. 😭 |
@kalwalt I tried the branch fix-video-issue, but the video is still black. The logs in android firefox remote debugger tool still have these lines:
There's also this warning in the beginning of the log, but no idea if it's related:
I also tried a bunch of other things (upgrade three.js version; make the code in addVideo as close to the threejs video example as possible), but it also doesn't work 🐙 |
@thylacinelol this is a bad new, can tour create a gist of your testing example 🙏? I will work 👷♂️ a little this evening, if i have time 🙂. |
Here's a git patch with the changes I made. It's not a lot and are just changes to I'm sure this issue is something simple that was missed, because the three.js video example works fine on all devices. |
Yes i have also this idea. I hope to fix soon this. Thank you for the gist! |
this answer in the stackoverflow article seems intetresting. I will try it. 🙂 |
I created a live example https://kalwalt.github.io/kalwalt-interactivity-AR/ARnft/arNFT_video_example.html with latest from webarkit/ARnft#173 commit webarkit/ARnft@c7401aa tested on Firefox under Android, now the Threejs warning messages are gone, but i can't see the video (nor a black screen). |
@ThorstenBux this your code https://github.com/ThorstenBux/ar-magazine/blob/d2fd0ce0f084ba88ab5857fde95528b73e54f9f7/src/threejs_wasm_worker.js#L32-L48 |
This is so old. I don't know if that still works |
Because the new changes (new ARnft version 0.9.0) the addVideo is now part of ARnft-theejs i'm testing the example https://kalwalt.github.io/kalwalt-interactivity-AR/ARnft/arNFT_video_example.html again but it track but no video at all. It worked on localhost on Desktop. I need to check the threejs version in the example, could be that. |
i will also move the issue to the new repository. |
latest from dev and 0.7.3 version
Hi,
I tried this arNFT_video_example on multiple devices and the video seems to be black (or just stuck on 1st frame?). Here's a screenshot of what the video looks like:
The video work only on android chrome. On android firefox, iOS chrome, iOS safari - the video is black. I also tried using the library with other videos but same happens with other videos.
The text was updated successfully, but these errors were encountered: