diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2023-02-09 05:18:03 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2023-02-15 22:00:45 +0100 |
commit | be3a4f2f0fd51fc62454165ba6ce4a9d33ce1e0a (patch) | |
tree | f5adc195d359c44436c13bb079fadc7c887aacca /recording | |
parent | 6fd10016b59a5a23920c5f0efc2d0777c1bb9a1f (diff) |
Add specific page for recording calls
Instead of joining the call in the main Talk page now a specific page to
be used only by the recording server was added.
This will make possible to use a specific UI tailored for call
recording, but also to use an internal client of the external signaling
server rather than a normal participant.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'recording')
-rw-r--r-- | recording/src/nextcloud/talk/recording/Participant.py | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/recording/src/nextcloud/talk/recording/Participant.py b/recording/src/nextcloud/talk/recording/Participant.py index c5887bff2..d6c585fcc 100644 --- a/recording/src/nextcloud/talk/recording/Participant.py +++ b/recording/src/nextcloud/talk/recording/Participant.py @@ -219,6 +219,9 @@ class SeleniumHelper: options.set_preference('media.navigator.permission.disabled', True) + # Allow to play media without user interaction. + options.set_preference('media.autoplay.default', 0) + options.add_argument('--kiosk') options.add_argument(f'--width={width}') options.add_argument(f'--height={height}') @@ -395,22 +398,7 @@ class Participant(): :param token: the token of the room to join. """ - self.seleniumHelper.driver.get(self.nextcloudUrl + '/index.php/call/' + token) - - # Hack to prevent the participant from using any device that might be - # available, including PulseAudio's "Monitor of Dummy Output". - self.seleniumHelper.execute('navigator.mediaDevices.getUserMedia = async function() { throw new Error() }') - - WebDriverWait(self.seleniumHelper.driver, timeout=30).until(lambda driver: driver.find_element(By.CSS_SELECTOR, '.top-bar #call_button:not(:disabled)')) - self.seleniumHelper.driver.find_element(By.CSS_SELECTOR, '.top-bar #call_button').click() - - try: - # If the device selector is shown click on the "Join call" button - # in the dialog to actually join the call. - WebDriverWait(self.seleniumHelper.driver, timeout=5).until(lambda driver: driver.find_element(By.CSS_SELECTOR, '.device-checker #call_button')) - self.seleniumHelper.driver.find_element(By.CSS_SELECTOR, '.device-checker #call_button').click() - except: - pass + self.seleniumHelper.driver.get(self.nextcloudUrl + '/index.php/call/' + token + '/recording') def leaveCall(self): """ |