home: fix video playback in chrome
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@245 a672b425-5310-4d7a-af5c-997e18724b81
This commit is contained in:
parent
7751131a34
commit
a0d009fc49
2 changed files with 3 additions and 4 deletions
site
|
@ -83,12 +83,11 @@ function write(position){
|
|||
}
|
||||
|
||||
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
|
||||
var homeVideo = document.getElementById('videoHome');
|
||||
|
||||
if (!isChrome) {
|
||||
homeVideo.play();
|
||||
if (isChrome) {
|
||||
document.getElementById('foolChrome').remove();
|
||||
|
||||
var homeVideo = document.getElementById('videoHome');
|
||||
homeVideo.muted = true;
|
||||
homeVideo.play();
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ title: Home page
|
|||
|
||||
<iframe id="foolChrome" src="{{ site.baseurl }}/assets/style/silence.mp3" allow="autoplay" style="display:none"></iframe>
|
||||
|
||||
<video id="videoHome">
|
||||
<video autoplay id="videoHome">
|
||||
<source src="assets/front/hero_video.mp4" type="video/mp4">
|
||||
</video>
|
||||
|
||||
|
|
Loading…
Reference in a new issue