|
| 1 | +<h2>UI Diff</h2> |
| 2 | +<table> |
| 3 | +<tr> |
| 4 | +<td width='33%'> |
| 5 | + <p><strong>Video 1</strong></p> |
| 6 | + <video id='video1' width='100%' autoplay muted loop onplay='syncVideos()'> |
| 7 | + <source src='https://github.com/commaai/ci-artifacts/raw/refs/heads/openpilot/pr-36792-mici-raylib-ui/mici_ui_replay_master.mp4' type='video/mp4'> |
| 8 | + Your browser does not support the video tag. |
| 9 | + </video> |
| 10 | +</td> |
| 11 | +<td width='33%'> |
| 12 | + <p><strong>Video 2</strong></p> |
| 13 | + <video id='video2' width='100%' autoplay muted loop onplay='syncVideos()'> |
| 14 | + <source src='https://github.com/commaai/ci-artifacts/raw/refs/heads/openpilot/pr-36792-mici-raylib-ui/mici_ui_replay_proposed.mp4' type='video/mp4'> |
| 15 | + Your browser does not support the video tag. |
| 16 | + </video> |
| 17 | +</td> |
| 18 | +<td width='33%'> |
| 19 | + <p><strong>Pixel Diff</strong></p> |
| 20 | + <video id='diffVideo' width='100%' autoplay muted loop> |
| 21 | + <source src='https://github.com/commaai/ci-artifacts/raw/refs/heads/openpilot/pr-36792-mici-raylib-ui/diff.mp4' type='video/mp4'> |
| 22 | + Your browser does not support the video tag. |
| 23 | + </video> |
| 24 | +</td> |
| 25 | +</tr> |
| 26 | +</table> |
| 27 | +<script> |
| 28 | +function syncVideos() { |
| 29 | + const video1 = document.getElementById('video1'); |
| 30 | + const video2 = document.getElementById('video2'); |
| 31 | + const diffVideo = document.getElementById('diffVideo'); |
| 32 | + video1.currentTime = video2.currentTime = diffVideo.currentTime; |
| 33 | +} |
| 34 | +video1.addEventListener('timeupdate', () => { |
| 35 | + if (Math.abs(video1.currentTime - video2.currentTime) > 0.1) { |
| 36 | + video2.currentTime = video1.currentTime; |
| 37 | + } |
| 38 | + if (Math.abs(video1.currentTime - diffVideo.currentTime) > 0.1) { |
| 39 | + diffVideo.currentTime = video1.currentTime; |
| 40 | + } |
| 41 | +}); |
| 42 | +video2.addEventListener('timeupdate', () => { |
| 43 | + if (Math.abs(video2.currentTime - video1.currentTime) > 0.1) { |
| 44 | + video1.currentTime = video2.currentTime; |
| 45 | + } |
| 46 | + if (Math.abs(video2.currentTime - diffVideo.currentTime) > 0.1) { |
| 47 | + diffVideo.currentTime = video2.currentTime; |
| 48 | + } |
| 49 | +}); |
| 50 | +diffVideo.addEventListener('timeupdate', () => { |
| 51 | + if (Math.abs(diffVideo.currentTime - video1.currentTime) > 0.1) { |
| 52 | + video1.currentTime = diffVideo.currentTime; |
| 53 | + video2.currentTime = diffVideo.currentTime; |
| 54 | + } |
| 55 | +}); |
| 56 | +</script> |
| 57 | +<hr> |
| 58 | +<p><strong>Results:</strong> ✅ Videos are identical! (180 frames)</p> |
0 commit comments