| | |
| | | |
| | | class Video extends Component { |
| | | static propTpyes = { |
| | | card: PropTypes.object, // 条码设置 |
| | | value: PropTypes.any, // 条码值 |
| | | poster: PropTypes.string, |
| | | card: PropTypes.object, |
| | | value: PropTypes.any, |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { value, card } = this.props |
| | | const { value, card, poster } = this.props |
| | | |
| | | return ( |
| | | <div style={{overflow: 'hidden'}}> |
| | | <Player startTime={card.startTime || 0} poster="" currentTime={10} autoPlay={card.autoPlay === 'true'} aspectRatio={card.aspectRatio || '16:9'} loop={card.loop === 'true'}> |
| | | <Player startTime={card.startTime || 0} poster={poster || ''} currentTime={10} autoPlay={card.autoPlay === 'true'} aspectRatio={card.aspectRatio || '16:9'} loop={card.loop === 'true'}> |
| | | <source src={value} /> |
| | | <BigPlayButton position="center" /> |
| | | <ControlBar> |