Skip to content

Commit

Permalink
[Issue #50] Stop after first loop video (#60)
Browse files Browse the repository at this point in the history
[Issue #50] Stop after first loop video
  • Loading branch information
lndgalante authored Oct 16, 2019
2 parents 627f312 + 3b36261 commit 12aac67
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions client/src/components/App/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ import React from 'react'
import { Container, Background, Content } from './styled'
import OuterLink from '../../shared/OuterLink'

const handleEndVideo = ({ target }) => {
target.currentTime = 0
}
const Home = () => (
<Container id="home">
<Background />

<Content>
<h3>
Somos la comunidad de{' '}
<OuterLink href="https://www.freecodecamp.org">
freeCodeCamp
</OuterLink>{' '}
<OuterLink href="https://www.freecodecamp.org">freeCodeCamp</OuterLink>{' '}
en{' '}
<OuterLink href="https://en.wikipedia.org/wiki/Buenos_Aires">
Buenos Aires
Expand All @@ -21,8 +22,8 @@ const Home = () => (

<p>Veni a conocernos para aprender sobre desarrollo web en comunidad!</p>

<video controls="controls" autoPlay loop="loop">
<source src="https://res.cloudinary.com/dnbygvvyz/video/upload/v1552479645/video-fcc.mp4"/>
<video onEnded={handleEndVideo} controls="controls" autoPlay>
<source src="https://res.cloudinary.com/dnbygvvyz/video/upload/v1552479645/video-fcc.mp4" />
</video>
</Content>
</Container>
Expand Down

0 comments on commit 12aac67

Please sign in to comment.