import React, { Component } from 'react' import { connect } from 'react-redux' import VimeoPlayer from 'app/utils/vendor/vimeo' import actions from 'app/actions' import { VideoScrubber } from '../components.media' class FullscreenVideo extends Component { state = { duration: 0.0, percent: 0.0, seconds: 0.0, seek: 0.0, scrubbing: false, } constructor(props) { super(props) this.handlePlay = this.handlePlay.bind(this) this.handlePause = this.handlePause.bind(this) this.handleTimeUpdate = this.handleTimeUpdate.bind(this) this.handleEnd = this.handleEnd.bind(this) } componentDidUpdate(prevProps) { if (Math.abs(this.props.play_ts - prevProps.play_ts) > 1.0) { // handle seek const seek = (this.props.play_ts - this.props.element.start_ts) % this.state.duration this.setState({ seek }) } } handlePlay() { } handlePause() { } handleEnd() { } handleTimeUpdate(timing) { if (!this.state.scrubbing || ('scrubbing' in timing)) { this.setState(timing) } } render() { const { element, media, transitionDuration, playing } = this.props const { duration, percent, seconds } = this.state const { color } = element const item = media.lookup[element.settings.media_id] const style = { backgroundColor: color.backgroundColor, color: color.textColor, transitionDuration, } return (