Hi All
I have to automatically record audio and video running in particular chrome tab like youtube video or call.
I am opening tab using Selenium and I am able to open chrome with --auto-select-desktop-capture-source="tab_name" and select the tab when screen share is enabled. I also want to record audio playing in the tab along with the video.
While doing it manually there is a checkbox in pop up which enables audio sharing but to automate audio box selection, I have made changes in chromium code as suggested in following link and rebuild chromium browser to skip pop up and select audio and video automatically
Chrome Version : 90.0.4432.0 (Developer Build) (64 Bit)
URLs (if applicable) :OS version : Linux
What is the expected result? Expecting that pop up window will not shown up on execution of below script and audio option will be considered true automatically and tab will be recorded with audio and video both.
desktopStream = await navigator.mediaDevices.getDisplayMedia({
video: true,
audio: true
})What is the actual result?On execution of above script, pop up is not getting opened but I am getting following error in console and audio and video recording does not start.
uncaught (in promise) DOMException could not start audio sourceAny additional information (anything else which may help us debug theissue)?Please refer stackover link and first answer where suggested to create custom chrome and code replacement in a particular file. I did same thing and created custom chrome build and using it in selenium with chromerdriver of Linux.
Am I missing anything else in code to change to achieve it?
Please suggest the right approach to achieve what I wanted to do if this way is not feasible.
Thanks
Jigar Shah