Esempio n. 1
0
 def wait_for_trim_submit(self):
     WebDriverWait(self.browser.driver, 1000000) \
         .until_not(visible(self.trim_submit_dialog._element))
Esempio n. 2
0
 def wait_for_upload_finish(self):
     WebDriverWait(self.browser.driver, 1000000) \
         .until_not(visible(self.upload_progress_dialog._element))
Esempio n. 3
0
 def wait_for_upload_finish(self):
     WebDriverWait(self.browser.driver, 1000000) \
         .until_not(visible(self.upload_progress_dialog._element))
Esempio n. 4
0
 def wait_for_trim_submit(self):
     WebDriverWait(self.browser.driver, 1000000) \
         .until_not(visible(self.trim_submit_dialog._element))
Esempio n. 5
0
options.add_argument('--no-sandbox')
options.add_argument('--autoplay-policy=no-user-gesture-required')
options.add_argument(f'---window-size={screen_width},{screen_height}')
options.add_argument('--start-fullscreen')
options.add_experimental_option("excludeSwitches", ['enable-automation'])

if __name__ == '__main__':
    display.start()
    subprocess.Popen('pulseaudio',
                     shell=True,
                     env={'DISPLAY': f':{display.display}'})

    driver = webdriver.Chrome(chrome_options=options)
    driver.get(browser_url)
    wait = WebDriverWait(driver, 10)
    wait.until(visible((By.ID, 'app')))

    # Move mouse out of the way so it doesn't trigger the "pause" overlay on the video tile
    actions = ActionChains(driver)
    actions.move_to_element(driver.find_element_by_id('app'))
    actions.move_by_offset(screen_width / 2, screen_height / 2)
    actions.perform()

    video_stream = ffmpeg.input(f':{display.display}',
                                f='x11grab',
                                s=screen_resolution,
                                r=video_framerate,
                                thread_queue_size=1024,
                                draw_mouse=0)

    audio_stream = ffmpeg.input('default',