def _video_html(video): html.__tagspec__.update(dict([(x, 1) for x in ("video", "source")])) video_attrs = { "controls": "", "poster": video.get("image"), "play-pause-on-click": "", "style": "border:1px solid #e6e6e6; float:right; height:240px; " "margin-left:5px; overflow:hidden; width:320px", } source_attrs = {"src": video.get("video"), "type": "video/mp4"} return str(html.video(html.source(**source_attrs), **video_attrs))
def _video_html(video): html.__tagspec__.update(dict([(x, 1) for x in ('video', 'source')])) video_attrs = { 'controls': '', 'poster': video.get('image'), 'play-pause-on-click': '', 'style': 'border:1px solid #e6e6e6; float:right; height:240px; ' 'margin-left:5px; overflow:hidden; width:320px'} source_attrs = {'src': video.get('video'), 'type': 'video/mp4'} return str(html.video( html.source(**source_attrs), **video_attrs))
def pytest_selenium_capture_debug(item, report, extra): recording = item.config.getoption('--xvfb-recording') if recording == 'none' or (recording == 'fail' and not report.failed): return log_dir = os.path.dirname(item.config.option.htmlpath) pytest_html = item.config.pluginmanager.getplugin('html') for movie_path in item._movies: src_attrs = {'src': os.path.relpath(movie_path, log_dir), 'type': 'video/mp4'} video_html = str(html.video(html.source(**src_attrs), **VIDEO_ATTRS)) extra.append(pytest_html.extras.html(video_html))
def _video_html(video_url, session): return str( html.div( html.video( html.source(src=video_url, type="video/mp4"), width="100%", height="100%", controls="controls", ), id="mediaplayer{session}".format(session=session), style="border:1px solid #e6e6e6; float:right; height:240px;" "margin-left:5px; overflow:hidden; width:320px", ))
def _video_html(video_url, session): return str( html.div( html.video( html.source(src=video_url, type="video/mp4"), width="100%", height="100%", controls="controls", ), id="mediaplayer{session}".format(session=session), style="border:1px solid #e6e6e6; float:right; height:240px;" "margin-left:5px; overflow:hidden; width:320px", ) )