From a22a24bd7e64b089d983bfcf52c906df7d46f25d Mon Sep 17 00:00:00 2001 From: Shakiba Kheradmand <kherad@nugget.cs.ubc.ca> Date: Tue, 2 Jul 2024 13:28:17 -0700 Subject: [PATCH] add support for safari in website --- docs/index.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index a35d00b..fe0b9d3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -165,7 +165,7 @@ <hr /> </div> - <div class="parent-video-compare-container"> + <div class="parent-video-compare-container" id="trainb"> <div class="video-compare-container" id="materialsDiv"> <video class="video" @@ -189,6 +189,18 @@ </p> </div> + <script> + function isSafari() { + return /^((?!chrome|android).)*safari/i.test(navigator.userAgent); + } + if (isSafari()) { + document.getElementById('trainb').innerHTML = + `<video class="safari-video" controls autoplay> + <source src="./resources/training_rand_compare/bicycle_both-rand.mp4" type="video/mp4" > + </video>`; + } + </script> + <div class="parent-video-compare-container"> <hr /> </div>