Skip to content
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 not playing #1

Open
kpnkarthik opened this issue Aug 1, 2018 · 15 comments
Open

Video is not playing #1

kpnkarthik opened this issue Aug 1, 2018 · 15 comments

Comments

@kpnkarthik
Copy link

The video which you have inside the videos are not playing with hiro pattern. Please help me how to fix this?

@kylejcorrigan
Copy link

hi, I'm having an issue, that is similar to this. Mine is that the video example works fine on my laptop, but on my phone(iphone X) it doesn't load up the video.

@Bruce0418
Copy link

I have the same issue, the video is stuck with the black screen when the hiro maker is recognized. I will solve this issue and publish the solution when I have spare time. thanks

@matorlinc
Copy link

I have the same issue, the video is stuck with the black screen when the hiro maker is recognized. I will solve this issue and publish the solution when I have spare time. thanks

Any progress? got the same issue, too

@matorlinc
Copy link

Guys, problem solved! Just comment the code below:(or replace with your own audio path)
<!-- <source src="video/sintel.ogv" type='video/ogg; codecs="theora, vorbis"'> -->

@jamess922
Copy link

@matorlinc did as you say but not working with my iphone 7

@fffiloni
Copy link

Hello people, i find a way to make the video starting on iOS:

Here are the steps:

  1. Copy/paste this in the head:
<meta name="apple-mobile-web-app-capable" content="yes">
  1. Just after your opening body tag, declare your video object:
<video id="video" autoplay loop muted playsinline crossorigin="anonymous" webkit-playsinline style="display:none">

<source src="videos/yourvideo.mp4 ">
</video>
  1. At the very end of your script, you need to trigger a function which will play the video and tell iOS it’s okay:
function playVideo(){
	let video = document.getElementById('video');
	video.play();
}
playVideo();

It should work. It works for me. ;)

@jamess922
Copy link

@jamess922 video is working but no sound?

@fffiloni
Copy link

fffiloni commented Feb 23, 2019

Yeah it’s because in the video tag, i put the muted attribute. Remove it ;)

@jamess922
Copy link

Yeah it’s because in the video tag, i put the muted attribute. Remove it ;)

here is problem with muted the video could play but no sound on my iphone 7 ,once i remove it video not play on my iphone 7

@jamess922
Copy link

I googled this muted attribute,looks we need a button to maul play the video it's about Html5

@fffiloni
Copy link

fffiloni commented Feb 23, 2019

Okay what you can do is leaving the muted attribute in the video tag.

Then in the last function, after video.play(); you can add :
video.muted = false;

Tell me if it works

@jamess922
Copy link

Not working

@fffiloni
Copy link

fffiloni commented Feb 23, 2019

Replace the video.muted=false from my previous answer by this:

var toggleSound = document.body.addEventListener('touchstart', function(){
        if(video.muted === true){
          video.muted=false;
        } else if(video.muted === false){
          video.muted=true;
        }
      });

It will toggle sound on touch event on your screen. It works, just verified ;)

@jamess922
Copy link

@fffiloni it's working Thank you

@grebslam
Copy link

grebslam commented Dec 4, 2020

Can't get anything but a black box to display from the Video Texture example on: https://stemkoski.github.io/AR-Examples/

I tried adding the code posted here, and copied all github hosted assets to my own server to run locally, still nothing.

Even trying the example on github does not work, I'm on a Nexus 6 running 7.1.1 if that helps, tried both chrome and firefox.

Any further advice would be much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants