A year ago the camera on my laptop stopped working. I used this solution to livestream from my phone until I was able to purchase a dedicated webcam.
How to Use Phone Camera as a Webcam Without Root In Hindi/Urdu. shown in this video easily use your phone camera as a webcam and record full hd videos.
Use Android Phone As A Webcam In Both Ways - USB and Wireless Easy Steps.