react-webcam icon indicating copy to clipboard operation
react-webcam copied to clipboard

showing pause icon on camera

Open citayesh opened this issue 2 years ago • 7 comments

citayesh avatar Feb 22 '22 13:02 citayesh

You could try setting the controls to false

<Webcam
  ...
  controls={false}
/>

nsleche avatar Mar 22 '22 00:03 nsleche

you can put a

<Webcam .... poster="blankimage.jpg"/>

Nikkolas-Cage avatar Jun 22 '22 09:06 Nikkolas-Cage

I think this solved issue may be discussing a similar issue. Though I'm unable to reproduce the solution.

Basically, before camera permission is granted, the "empty" video player shows a "Play Button". Once permission is granted, the "Play Button" turns into a "Pause" button momentarily before vanishing from existence.

This seems to only happen on iOS. @mozmorris any ideas on how to fix this?

chen-rn avatar Sep 18 '22 10:09 chen-rn

I had the same issue and found a solution using CSS.

video::-webkit-media-controls-panel {
	display: none !important;
	-webkit-appearance: none;
}

video::-webkit-media-controls-play-button {
	display: none !important;
	-webkit-appearance: none;
}

video::-webkit-media-controls-start-playback-button {
	display: none !important;
	-webkit-appearance: none;
}

Another way to fix using CSS is to disable pointer events on the video element:

video {
  pointer-events: none;
}

frankgalindo avatar Oct 14 '22 17:10 frankgalindo

I think this solved issue may be discussing a similar issue. Though I'm unable to reproduce the solution.

Basically, before camera permission is granted, the "empty" video player shows a "Play Button". Once permission is granted, the "Play Button" turns into a "Pause" button momentarily before vanishing from existence.

This seems to only happen on iOS. @mozmorris any ideas on how to fix this?

I got the same issue with #318 only when attach it inside a webview, play button showing unexpected. My approach was adding poster attribute as mentioned here :

you can put a

<Webcam .... poster="blankimage.jpg"/>

But instead I put a random string poster="blank" since requirement should have no poster image too, but for proper maybe should pass correct image URL / relative path.

fathurhidayat3 avatar Mar 26 '23 02:03 fathurhidayat3

having same issue which show play/pause when trying to capture image on iOS only and above solutions didn't work for me

akirayorunoe avatar Oct 12 '23 06:10 akirayorunoe

I used this version "react-webcam": "6.0.0" and it was ok

citayesh avatar Oct 12 '23 09:10 citayesh