How to use your Android or iOS device as a webcam
Useful if you have a spare phone and no webcam for your PC

USE YOUR ANDROID PHONE / TABLET AS A WEBCAM WITH DROIDCAM
There are several apps in the Google Play Store that claim to morph your Android device into a webcam. Out of the few that I tried, DroidCam offered the easiest setup with the most reliable results. I don’t doubt that there are more clever, app-free solutions to get this done, but for the sake of simplicity, this is what we’re going with here.

Download and install the free version of DroidCam from the Play Store. (It requires a device running Android 5.0 Lollipop or newer software.) The developer, Dev47Apps, makes a desktop client for Windows 10 and Linux (but unfortunately, not for macOS) that you’ll also need to download onto your computer. (Note: I’m focusing on steps to use it with Windows 10 in this how-to.) Make sure that you download the latest version since it addresses some issues that might cause a headache if you use an earlier version.

After the Android app is installed, focus on getting the desktop app up and running. During installation, you’ll need to allow the app to install audio drivers. Feel free to uncheck “Always trust software from DEV47 APPS” if you prefer.

Once the Windows app is running, you’ll see options near the top of the app window that will let you connect your device wirelessly or via USB. It’s actually easier to connect via Wi-Fi so that’s what we’re going to focus on. Thankfully, it’s on that setting by default.
Below those options, you’ll see a box where you need to input your Android device’s IP address. At this point, open up the DroidCam app on your Android phone or tablet. It will then show your device’s IP address. Go back to your PC and input that address in the field called “Device IP.”

https://www.theverge.com/21281765/webcam-phone-tablet-android-ios-pc-mac-how-to