summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/player/components.fullscreen/fullscreen.video.js
blob: efc8f89d8792cbc91239d7e7d5551ef5dbe00deb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React, { Component } from 'react'
import VimeoPlayer from 'app/utils/vendor/vimeo'

export class FullscreenVideo extends Component {
  render() {
    const { element, media, transitionDuration } = this.props
    const { color } = element
    const item = media.lookup[element.settings.media_id]
    const style = {
      backgroundColor: color.backgroundColor,
      color: color.textColor,
      transitionDuration,
    }
    console.log(item)
    return (
      <div
        className='fullscreen-element video'
        style={style}
      >
        <VimeoPlayer
          video={item.url}
          autoplay={true}
          muted={true}
          responsive={true}
          controls={false}
          byline={false}
        />
      </div>
    )
  }
}