AR-Examples icon indicating copy to clipboard operation
AR-Examples copied to clipboard

Video is not playing

Open kpnkarthik opened this issue 7 years ago • 16 comments

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

kpnkarthik avatar Aug 01 '18 10:08 kpnkarthik

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.

kylejcorrigan avatar Oct 23 '18 14:10 kylejcorrigan

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

Bruce0418 avatar Nov 22 '18 08:11 Bruce0418

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 avatar Dec 29 '18 11:12 matorlinc

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"'> -->

matorlinc avatar Dec 29 '18 11:12 matorlinc

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

jamess922 avatar Feb 23 '19 10:02 jamess922

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. ;)

fffiloni avatar Feb 23 '19 11:02 fffiloni

@jamess922 video is working but no sound?

jamess922 avatar Feb 23 '19 12:02 jamess922

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

fffiloni avatar Feb 23 '19 12:02 fffiloni

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 avatar Feb 23 '19 12:02 jamess922

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

jamess922 avatar Feb 23 '19 13:02 jamess922

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

fffiloni avatar Feb 23 '19 13:02 fffiloni

Not working

jamess922 avatar Feb 23 '19 13:02 jamess922

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 ;)

fffiloni avatar Feb 23 '19 15:02 fffiloni

@fffiloni it's working Thank you

jamess922 avatar Feb 23 '19 22:02 jamess922

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.

grebslam avatar Dec 04 '20 07:12 grebslam