Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit ba93ecab authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

ajout détecteur Safari pour ajout controls sur #video

parent 3ec1162d
......@@ -149,6 +149,18 @@
<source id="videoSrc" src="../../media/video-uploads/chat.mp4" type="video/mp4">
Votre navigateur ne permet pas de lire cette vidéo.
</video><br>
<script>
// If browser = safari, ajouter les controls de la vidéo
// Detect Safari
let safariAgent = navigator.userAgent.indexOf("Safari") > -1;
let chromeAgent = navigator.userAgent.indexOf("Chrome") > -1;
// Discard Safari since it also matches Chrome
if ((chromeAgent) && (safariAgent)) safariAgent = false;
console.log("SafariAgent:",safariAgent)
if(safariAgent){
document.getElementById('video').setAttribute('controls',true)
}
</script>
<button type="button" class="btn mx-auto" onclick="playVideo()">
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">
<path d="M11.596 8.697l-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment