Site > Demo > Add loop

This commit is contained in:
brunosimon
2018-01-01 12:57:45 +01:00
parent 5326cdff6d
commit 236e5e88f0
2 changed files with 45 additions and 3 deletions
+25
View File
@@ -36,6 +36,14 @@ export default class Demo
this.goStep(0) this.goStep(0)
}, 1000) }, 1000)
this.$audienceVideo.addEventListener('ended', () =>
{
window.setTimeout(() =>
{
this.goStep(6)
}, 2000)
})
/** /**
* Loop * Loop
*/ */
@@ -105,6 +113,7 @@ export default class Demo
switch(this.step) switch(this.step)
{ {
case 0: case 0:
this.$speakerVideo.currentTime = 0
this.$speakerVideo.play() this.$speakerVideo.play()
.then(() => .then(() =>
{ {
@@ -118,6 +127,22 @@ export default class Demo
case 2: case 2:
this.$audienceVideo.play() this.$audienceVideo.play()
break break
case 6:
window.setTimeout(() =>
{
for(let step = 0; step < 7; step++)
{
this.$container.classList.remove(`step-${step}`)
}
}, 800)
window.setTimeout(() =>
{
this.goStep(0)
}, 1600)
break
} }
} }
} }
+20 -3
View File
@@ -45,7 +45,7 @@ section.header
.title .title
position absolute position absolute
top 210px top 190px
left 50% left 50%
.keppler .keppler
@@ -82,7 +82,7 @@ section.header
.sub-title .sub-title
position absolute position absolute
top 270px top 250px
left 0 left 0
right 0 right 0
text-align center text-align center
@@ -279,9 +279,26 @@ section.header
.bar .bar
animation-play-state running animation-play-state running
&.step-6
.speaker
opacity 0
transform translateX(60%) scale(0.8, 0.8)
transition-duration 0.5s, 0.5s
transition-timing-function ease-in-out, ease-in-out
.audience
opacity 0
transform translateX(-60%) scale(0.8, 0.8)
transition-duration 0.5s, 0.5s
transition-timing-function ease-in-out, ease-in-out
.url
opacity 0
transition-duration 0.2s
.get-started-button .get-started-button
position absolute position absolute
bottom 130px bottom 120px
left calc(50% - 117px) left calc(50% - 117px)
width 234px width 234px
height 43px height 43px