Skip to content

Commit

Permalink
add preview images for all videos and improve video loading to not me…
Browse files Browse the repository at this point in the history
…ss with page rendering on slow connections
  • Loading branch information
BuildingAtom committed Feb 14, 2024
1 parent 9c56dfe commit 129e3ef
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 22 deletions.
Binary file added assets/thumb/combined_10_obstacles.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumb/combined_20_obstacles.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumb/combined_40_obstacles.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumb/sparrows_hard_scenarios_11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumb/sparrows_hard_scenarios_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumb/sparrows_hard_scenarios_3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumb/sparrows_hard_scenarios_4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumb/sparrows_hard_scenarios_8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumb/sparrows_single_arm_demo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/thumb/sparrows_two_arm_demo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
143 changes: 121 additions & 22 deletions index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,34 @@ links:
<!-- BEGIN OVERVIEW VIDEOS -->
<div class="fullwidth video-container" style="flex-wrap:nowrap; padding: 0 0.2em">
<div class="video-item" style="min-width:0;">
<video autoplay preload="auto" controls disablepictureinpicture playsinline muted loop style="display:block; width:100%; height:auto;">
<video
class="autoplay-on-load"
preload="none"
controls
disablepictureinpicture
playsinline
muted
loop
style="display:block; width:100%; height:auto;"
poster="assets/thumb/sparrows_single_arm_demo.jpg">
<source src="assets/sparrows_single_arm_demo.mp4" type="video/mp4">
Your browser does not support the video tag.
Your browser does not support this video.
</video>
<p>SPARROWS performing single arm planning </p>
</div>
<div class="video-item" style="min-width:0;">
<video autoplay preload="auto" controls disablepictureinpicture playsinline muted loop style="display:block; width:100%; height:auto;">
<video
class="autoplay-on-load"
preload="none"
controls
disablepictureinpicture
playsinline
muted
loop
style="display:block; width:100%; height:auto;"
poster="assets/thumb/sparrows_two_arm_demo.jpg">
<source src="assets/sparrows_two_arm_demo.mp4" type="video/mp4">
Your browser does not support the video tag.
Your browser does not support this video.
</video>
<p>SPARROWS performing two arm planning </p>
</div>
Expand Down Expand Up @@ -145,23 +163,50 @@ On the other hand, MPOT and TRAJOPT both stop due to colliding with the environm
<!-- START RANDOM VIDEOS -->
<div class="video-container">
<div class="video-item">
<video class="autoplay-in-frame" preload="none" disableremoteplayback disablepictureinpicture playsinline muted loop onclick="this.paused ? this.play() : this.pause();">
<video
class="autoplay-in-frame"
preload="none"
disableremoteplayback
disablepictureinpicture
playsinline
muted
loop
onclick="this.paused ? this.play() : this.pause();"
poster="assets/thumb/combined_10_obstacles.jpg">
<source src="assets/combined_10_obstacles.mp4" type="video/mp4">
Your browser does not support the video tag.
Your browser does not support this video.
</video>
<p>10 obstacles</p>
</div>
<div class="video-item">
<video class="autoplay-in-frame" preload="none" disableremoteplayback disablepictureinpicture playsinline muted loop onclick="this.paused ? this.play() : this.pause();">
<video
class="autoplay-in-frame"
preload="none"
disableremoteplayback
disablepictureinpicture
playsinline
muted
loop
onclick="this.paused ? this.play() : this.pause();"
poster="assets/thumb/combined_20_obstacles.jpg">
<source src="assets/combined_20_obstacles.mp4" type="video/mp4">
Your browser does not support the video tag.
Your browser does not support this video.
</video>
<p>20 obstacles</p>
</div>
<div class="video-item">
<video class="autoplay-in-frame" preload="none" disableremoteplayback disablepictureinpicture playsinline muted loop onclick="this.paused ? this.play() : this.pause();">
<video
class="autoplay-in-frame"
preload="none"
disableremoteplayback
disablepictureinpicture
playsinline
muted
loop
onclick="this.paused ? this.play() : this.pause();"
poster="assets/thumb/combined_40_obstacles.jpg">
<source src="assets/combined_40_obstacles.mp4" type="video/mp4">
Your browser does not support the video tag.
Your browser does not support this video.
</video>
<p>40 obstacles</p>
</div>
Expand All @@ -174,34 +219,79 @@ SPARROWS' performance on a handful of these scenarios is demonstrated below.

<!-- START HARD VIDEOS -->
<div class="video-container">
<div class="video-item tighter">
<video class="autoplay-in-frame" preload="none" disableremoteplayback disablepictureinpicture playsinline muted loop onclick="this.paused ? this.play() : this.pause();">
<div class="video-item">
<video
class="autoplay-in-frame"
preload="none"
disableremoteplayback
disablepictureinpicture
playsinline
muted
loop
onclick="this.paused ? this.play() : this.pause();"
poster="assets/thumb/sparrows_hard_scenarios_2.jpg">
<source src="assets/sparrows_hard_scenarios_2.mp4" type="video/mp4">
Your browser does not support the video tag.
Your browser does not support this video.
</video>
</div>
<div class="video-item tighter">
<video class="autoplay-in-frame" preload="none" disableremoteplayback disablepictureinpicture playsinline muted loop onclick="this.paused ? this.play() : this.pause();">
<video
class="autoplay-in-frame"
preload="none"
disableremoteplayback
disablepictureinpicture
playsinline
muted
loop
onclick="this.paused ? this.play() : this.pause();"
poster="assets/thumb/sparrows_hard_scenarios_3.jpg">
<source src="assets/sparrows_hard_scenarios_3.mp4" type="video/mp4">
Your browser does not support the video tag.
Your browser does not support this video.
</video>
</div>
<div class="video-item tighter">
<video class="autoplay-in-frame" preload="none" disableremoteplayback disablepictureinpicture playsinline muted loop onclick="this.paused ? this.play() : this.pause();">
<video
class="autoplay-in-frame"
preload="none"
disableremoteplayback
disablepictureinpicture
playsinline
muted
loop
onclick="this.paused ? this.play() : this.pause();"
poster="assets/thumb/sparrows_hard_scenarios_8.jpg">
<source src="assets/sparrows_hard_scenarios_8.mp4" type="video/mp4">
Your browser does not support the video tag.
Your browser does not support this video.
</video>
</div>
<div class="video-item tighter">
<video class="autoplay-in-frame" preload="none" disableremoteplayback disablepictureinpicture playsinline muted loop onclick="this.paused ? this.play() : this.pause();">
<video
class="autoplay-in-frame"
preload="none"
disableremoteplayback
disablepictureinpicture
playsinline
muted
loop
onclick="this.paused ? this.play() : this.pause();"
poster="assets/thumb/sparrows_hard_scenarios_4.jpg">
<source src="assets/sparrows_hard_scenarios_4.mp4" type="video/mp4">
Your browser does not support the video tag.
Your browser does not support this video.
</video>
</div>
<div class="video-item tighter">
<video class="autoplay-in-frame" preload="none" disableremoteplayback disablepictureinpicture playsinline muted loop onclick="this.paused ? this.play() : this.pause();">
<video
class="autoplay-in-frame"
preload="none"
disableremoteplayback
disablepictureinpicture
playsinline
muted
loop
onclick="this.paused ? this.play() : this.pause();"
poster="assets/thumb/sparrows_hard_scenarios_11.jpg">
<source src="assets/sparrows_hard_scenarios_11.mp4" type="video/mp4">
Your browser does not support the video tag.
Your browser does not support this video.
</video>
</div>
</div><!-- END HARD VIDEOS -->
Expand All @@ -226,8 +316,9 @@ SPARROWS' performance on a handful of these scenarios is demonstrated below.

<!-- below are some special scripts -->
<script>
window.addEventListener("load", function() {
// Get all video elements and auto pause/play them depending on how in frame or not they are
const videos = document.querySelectorAll('.autoplay-in-frame');
let videos = document.querySelectorAll('.autoplay-in-frame');

// Create an IntersectionObserver instance for each video
videos.forEach(video => {
Expand All @@ -242,5 +333,13 @@ SPARROWS' performance on a handful of these scenarios is demonstrated below.

observer.observe(video);
});

// document.addEventListener("DOMContentLoaded", function() {
videos = document.querySelectorAll('.autoplay-on-load');

videos.forEach(video => {
video.play();
});
});
</script>

0 comments on commit 129e3ef

Please sign in to comment.