question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not display the camera facing back

See original GitHub issue

Hello. Congratulations to the developers for the amazing component.

Console displays error message “The device must be a valid MediaDeviceInfo or null”. Can anyone tell me why?

And by selecting the back camera on the Android device, it does not display the “camera 0, facing back” image. Camera 1 displays.

Code was copied from https://stackblitz.com/edit/zxing-ngx-scanner

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jaysellacommented, May 25, 2019

I’m experiencing the same issue as Raphael. I’m using the StackBlitz example which also displays the error “The device must be a valid MediaDeviceInfo or null” in the console.

Additionally, this.scanner.changeDevice(device); included in the StackBlitz to default to the device’s rear camera returns “Property changeDevice does not exist on type ‘ZXingScannerComponent’.”

The code I am referencing is currently on the StackBlitz in the app.component.ts file. Any assistance would be greatly appreciated!

0reactions
lock[bot]commented, Jun 24, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting a black screen in the Camera app? Here's the fix! - iMore
Sometimes, the black screen in the Camera app can be resolved by just switching between the rear and front-facing selfie camera.
Read more >
Top Five Steps To Fix The IPhone Black Screen Camera ...
4: Restart the iPhone​​ The common way to fix iPhone black screen camera issue is to reset the power cycle of the device...
Read more >
6 ways to fix a black camera screen on your iPhone
But barring that simple solution, here are six more ways to fix an iPhone with a black camera screen. Switch between the back...
Read more >
Camera doesn't work in Windows - Microsoft Support
Roll back the camera driver · In Device Manager, right-click (or press and hold) on your camera, then select Properties. · Select the...
Read more >
How To Fix Front Camera Not Showing / Working - YouTube
Let's get your iPhone front camera working again.In this video, I walk you through several steps you can take to get your front...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found