Skip to content

Commit 9e7b860

Browse files
authored
Merge pull request neuroanatomy#225 from katjaq/master
adapted code to autoplay the video, and code prepared for the new video bgBrains
2 parents 90af5c6 + b29882c commit 9e7b860

5 files changed

Lines changed: 11 additions & 8 deletions

File tree

templates/index.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
<!-- Content -->
2828
<div class="slide" style="background:#222">
2929
<!-- Slide: Landing -->
30-
<img id="neuronsImg" src="/img/neurons.jpg" width="100%" />
31-
<video id="neurons" width="100%" muted autoplay loop>
32-
<source src="/img/neurons.mp4" type="video/mp4">
30+
<img id="bgBrainsImg" src="/img/bgBrains.jpg" width="100%" />
31+
<video id="bgBrains" width="100%" muted autoplay loop>
32+
<source src="/img/bgBrains.mp4" type="video/mp4">
3333
</video>
3434
<div class="content">
3535
<img id="logo" src="/img/brainbox-logo.svg" style="text-align:center"/>

view/brainbox/src/pages/index-page.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,20 @@ testWebSockets()
5353
$(".slide").height(window.innerHeight);
5454
$(window).on('resize', function() {
5555
$(".slide").height(window.innerHeight);
56-
$("#neurons").css({width:window.innerWidth});
56+
$("#bgBrains").css({width:window.innerWidth});
5757
});
5858

5959
// go to url button
6060
$("#go").click(goToURL);
6161

6262
// video settings
63-
var vid = document.getElementById("neurons");
63+
var vid = document.getElementById("bgBrains");
64+
//vid.autoplay = true;
65+
//vid.muted = true;
66+
//vid.loop = true;
6467
vid.playbackRate = 0.5;
6568
vid.onloadedmetadata = function() {
66-
$("#neurons").css({width:window.innerWidth});
69+
$("#bgBrains").css({width:window.innerWidth});
6770
};
6871

6972
// List of brains

view/brainbox/src/style/index-style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ h2 {
5959
width:250px;
6060
}
6161

62-
#neuronsImg {
62+
#bgBrainsImg {
6363
filter:contrast(150%) brightness(60%);
6464
-webkit-filter:contrast(150%) brightness(60%);
6565
position:absolute;top:0;left:0
6666
}
67-
#neurons {
67+
#bgBrains {
6868
filter:contrast(150%) brightness(60%);
6969
-webkit-filter:contrast(150%) brightness(60%);
7070
position:absolute;top:0;left:0

0 commit comments

Comments
 (0)