From 337f55166f6db7ee3f6e6e253ce786b3b6606216 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 22 Feb 2022 18:29:45 +0100 Subject: demo, ci: Switch to asciinema(1) for terminal recordings For demos, cool-retro-term(1) looked fancier, but several threads of that and ffmpeg(1) are just messing up with performance testing. The CI videos started getting really big as well, and they were difficult to read. Signed-off-by: Stefano Brivio --- test/lib/perf_report | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'test/lib/perf_report') diff --git a/test/lib/perf_report b/test/lib/perf_report index baa084b..9117046 100755 --- a/test/lib/perf_report +++ b/test/lib/perf_report @@ -103,19 +103,24 @@ for (var i = 0; i < perf_links.length; i++) { var obj = document.getElementById(perf_links[i][0]); obj.addEventListener("click", function(event) { - var ci_video = document.getElementById("ci_video"); + var ci_video = document.getElementById("ci"); var top = ci_video.offsetTop - 5; + var seek; - event.preventDefault(); - ci_video.play(); - ci_video.pause(); for (var i = 0; i < perf_links.length; i++) { if (this.id == perf_links[i][0]) { - ci_video.currentTime = perf_links[i][1] - 10; + seek = perf_links[i][1]; } } + + event.preventDefault(); + ci_video_player.dispose(); + ci_video_player = AsciinemaPlayer.create( + "/builds/latest/web/ci.cast", + ci_video, + { startAt: seek, autoplay: true }); + window.scrollTo({ top: top, behavior: "smooth" }) - ci_video.play(); }, false); } ' -- cgit v1.2.3