-4

The thing is, I use the Wikitude framework, but a lot of things are not compatible, I only use the Wikitude in the architect world, so I was wondering how to achieve this effect, which is the HTML background set to camera, hope to get your help This is the background effect I want to achieve SOSenter image description here

The effect I want to achieve is the same as in the picture. I want to do something on the camera when I call the camera, for example, add overlay

I want to implement the effect in the picture below, but it's on the mobile terminal, and it's the rear cameraenter image description here

谢彦丰
  • 1
  • 5

1 Answers1

1

You can't have the camera as a background (css background).After you access the Camera API, you will get an HTML video element and you have to style it in such a way that it will look like a background.

video {
  width:100vw;
  height:100vh;
  object-fit:cover;
  z-index:-1;
  position:absolute;
}

The user will also need to give the permissions to open the camera.

I've created a pen here

Florin Simion
  • 448
  • 9
  • 20
  • This effect is exactly what I want to achieve. But my project is a App, I do not know whether the phone camera can call. – 谢彦丰 Aug 01 '17 at 11:26
  • That's great. I just want to make this happen, but I want it on my phone, and it's a rear camera. I don't know, OK? My friend gave you the best regards – 谢彦丰 Aug 01 '17 at 11:43