I am trying to open up Chrome with a fake web cam file which is .y4m as the following:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager as cdm
service = Service(cdm().install())
options = Options()
options.add_argument("--use-fake-device-for-media-stream")
options.add_argument("--use-file-for-fake-video-capture=fake_web_cam.y4m")
driver = webdriver.Chrome(service=service, options=options)
It totally works, but the problem is when selecting this cam in some website, the cam name is the same as the path of the .y4m file. I searched a lot but did not find a solution for this problem.
from Changing fake web cam file (.y4m) device name using Chrome, Selenium, and Python
No comments:
Post a Comment