Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlCbw committed Nov 28, 2024
1 parent 3e95dd1 commit f63e218
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1184,31 +1184,31 @@ <h2 class="title is-3 has-text-centered"></h2>
<source id="videoSource" src="./static/videos/mars11.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<script>
function changeVideo(buttonNumber) {
const videoPlayer = document.getElementById('videoPlayer');
const videoSource = document.getElementById('videoSource');

// Map button numbers to video file paths
const videoMap = {
1: "./static/videos/mars11.mp4",
2: "./static/videos/mars15.mp4",
3: "./static/videos/mars37.mp4",
4: "./static/videos/mars41.mp4"
};

// Update video source
videoSource.src = videoMap[buttonNumber] + '?t=' + new Date().getTime(); // Avoid caching
videoPlayer.load(); // Reload video
videoPlayer.play(); // Play new video
}
</script>
</div>
</div>
</div>
</div>
</section>

<script>
function changeVideo(buttonNumber) {
const videoPlayer = document.getElementById('videoPlayer');
const videoSource = document.getElementById('videoSource');

// Map button numbers to video file paths
const videoMap = {
1: "./static/videos/mars11.mp4",
2: "./static/videos/mars15.mp4",
3: "./static/videos/mars37.mp4",
4: "./static/videos/mars41.mp4"
};

// Update video source
videoSource.src = videoMap[buttonNumber] + '?t=' + new Date().getTime(); // Avoid caching
videoPlayer.load(); // Reload video
videoPlayer.play(); // Play new video
}
</script>

<!--&lt;!&ndash; BibTeX &ndash;&gt;-->
<!--<section class="section" id="BibTeX"> -->
Expand Down

0 comments on commit f63e218

Please sign in to comment.