Nouvelle vidéo et bouton de volume

This commit is contained in:
nyanloutre 2017-07-14 20:30:10 +02:00
parent 91646d43c8
commit 401650e7f5
No known key found for this signature in database
GPG key ID: 4177A74B460FAFD2
6 changed files with 30 additions and 2 deletions

View file

@ -65,12 +65,16 @@
<header class="masthead">
<video autoplay loop muted>
<source src="video/intro.webm" type="video/webm">
<source src="video/1_Compilation_Graphique.webm" type="video/webm">
</video>
<a class="btn btn-default btn-xl" href="#about">
<i class="fa fa-angle-down" aria-hidden="true"></i>
</a>
<a class="btn btn-default video-sound">
<i class="fa fa-volume-off" aria-hidden="true"></i>
</a>
</header>
@ -214,6 +218,24 @@
<!-- Custom scripts for this template -->
<script src="js/creative.min.js"></script>
<script>
$("video").prop('muted', true);
$(".video-sound").click(function () {
if ($("video").prop('muted')) {
$("video").prop('muted', false);
$(this) > $(".fa").addClass('fa-volume-up');
$(this) > $(".fa").removeClass('fa-volume-off');
} else {
$("video").prop('muted', true);
$(this) > $(".fa").removeClass('fa-volume-up');
$(this) > $(".fa").addClass('fa-volume-off');
}
console.log($("video").prop('muted'))
});
</script>
</body>