Skip to content

Commit 6d74e30

Browse files
committed
add pdf
1 parent e9ff2f9 commit 6d74e30

2 files changed

Lines changed: 50 additions & 9 deletions

File tree

index.html

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,20 +2776,61 @@
27762776
const video = videoContainer.querySelector('video[style*="display: none"]'); // Select hidden playback video
27772777
const cover = videoContainer.querySelector('.video-cover');
27782778

2779+
if (!video) {
2780+
console.error('Video element not found');
2781+
return;
2782+
}
2783+
2784+
// Restore src if video was blocked
2785+
if (video.hasAttribute('data-temp-src') && !video.src) {
2786+
video.src = video.getAttribute('data-temp-src');
2787+
video.removeAttribute('data-temp-src');
2788+
video.load();
2789+
}
2790+
2791+
// Check source element as well
2792+
const source = video.querySelector('source');
2793+
if (source && source.hasAttribute('data-temp-src') && !source.src) {
2794+
source.src = source.getAttribute('data-temp-src');
2795+
source.removeAttribute('data-temp-src');
2796+
video.load();
2797+
}
2798+
2799+
// Set preload to auto and ensure video is ready
2800+
if (video.preload === 'none') {
2801+
video.preload = 'auto';
2802+
}
2803+
27792804
// Hide cover, show video
27802805
cover.style.display = 'none';
27812806
video.style.display = 'block';
27822807

2783-
// Play video
2784-
video.currentTime = 0;
2785-
video.play();
2808+
// Wait for video to be ready before playing
2809+
const playVideoWhenReady = () => {
2810+
if (video.readyState >= 2) { // HAVE_CURRENT_DATA
2811+
video.currentTime = 0;
2812+
video.play().catch(err => {
2813+
console.error('Error playing video:', err);
2814+
});
2815+
} else {
2816+
video.addEventListener('loadeddata', () => {
2817+
video.currentTime = 0;
2818+
video.play().catch(err => {
2819+
console.error('Error playing video:', err);
2820+
});
2821+
}, { once: true });
2822+
video.load();
2823+
}
2824+
};
2825+
2826+
playVideoWhenReady();
27862827

27872828
// Listen to video end event
27882829
video.addEventListener('ended', function() {
27892830
// After video ends, return to cover
27902831
video.style.display = 'none';
27912832
cover.style.display = 'block';
2792-
});
2833+
}, { once: true });
27932834
}
27942835

27952836
// Performance monitoring object
@@ -3561,7 +3602,7 @@ <h1 class="title is-3 publication-title">BFM-Zero: A Promptable Behavioral Found
35613602
<!-- PDF Link. -->
35623603
<span class="link-block">
35633604
<!-- TODO:update -->
3564-
<a href="./static/images/meta.png"
3605+
<a href="./resources/paper.pdf"
35653606
class="external-link button is-normal is-rounded is-dark" target="_blank">
35663607
<span class="icon">
35673608
<i class="fas fa-file-pdf"></i>
@@ -3580,15 +3621,15 @@ <h1 class="title is-3 publication-title">BFM-Zero: A Promptable Behavioral Found
35803621
<span>ArXiv</span>
35813622
</a>
35823623
</span>
3583-
<!-- <span class="link-block">
3584-
<a href="https://lecar-lab.github.io/SoFTA/"
3624+
<span class="link-block">
3625+
<a href="./static/images/meta.png"
35853626
class="external-link button is-normal is-rounded is-dark" target="_blank">
35863627
<span class="icon">
35873628
<i class="fab fa-youtube"></i>
35883629
</span>
35893630
<span>Video</span>
35903631
</a>
3591-
</span> -->
3632+
</span>
35923633
<!-- Datasets Link. -->
35933634
<!-- <span class="link-block">
35943635
<a href="https://cmu.box.com/s/kmayzq5ax2rxvwn97s0hzz0aq5vws9io" class="external-link button is-normal is-rounded is-dark" target="_blank">
@@ -3606,7 +3647,7 @@ <h1 class="title is-3 publication-title">BFM-Zero: A Promptable Behavioral Found
36063647
<span class="icon">
36073648
<i class="fab fa-twitter"></i>
36083649
</span>
3609-
<span>Summary (Coming Soon)</span>
3650+
<span>Summary</span>
36103651
</a>
36113652
</span>
36123653
<!-- Code Link. -->

resources/paper.pdf

10.6 MB
Binary file not shown.

0 commit comments

Comments
 (0)