the following recipe does not work yet. I will give a try these days to finish it.
First, see https://docs.vmware.com/en/VMware-Horizon/2206/linux-desktops-setup/GUID-F3F2D262-62DA-4DFC-810D-FFEF5FA49A66.html
We need the so-called v4l2loopback driver. To list webcam (and audio) devices, the v4l-utils have to be installed. Here the x86_64 snippet.
tdnf install -y wget curl tar build-essential libjpeg-turbo-devel gettext
wget http://linuxtv.org/downloads/v4l-utils/v4l-utils-1.22.1.tar.bz2
tar xf v4l-utils-1.22.1.tar.bz2
cd v4l-utils-1.22.1
./bootstrap.sh
./configure
make
make install
./utils/v4l2-ctl/v4l2-ctl --list-devices
This should work flawlessly, but v4l2-ctl --list-devices throws out cannot open device /dev/video0, exiting. which makes sense because the v4l2loopback driver isn't installed yet.
The following code snippet for the v4l2loopback driver produces errors e.g. ERROR: "video_ioctl2" [./v4l2loopback.ko] undefined! on the step make .
tdnf install -y linux-esx-devel dkms unzip git
cd /usr/src
mkdir v4l2loopback
git clone https://github.com/umlaeute/v4l2loopback.git v4l2loopback
cd v4l2loopback
make
make install
Accordingly to a github issue entry here of minijackson, the kernel option CONFIG_MEDIA_SUPPORT has to be added.
Head banging on Photon OS 4.0 rev 2, 5.10.142.4.ph4-esx.
# 10/30/2022: modified code snippet v4l-utils for Photon OS 3.0 compatibility