pause: { id: 'video.pause', defaultMessage: 'Pause' },
mute: { id: 'video.mute', defaultMessage: 'Mute sound' },
unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },
+ download: { id: 'video.download', defaultMessage: 'Download file' },
});
export default @injectIntl
<span className='video-player__time-total'>{formatTime(this.state.duration || Math.floor(this.props.duration))}</span>
</span>
</div>
+
+ <div className='video-player__buttons right'>
+ <button type='button' aria-label={intl.formatMessage(messages.download)}>
+ <a className='video-player__download__icon' href={this.props.src} download>
+ <Icon id={'download'} fixedWidth />
+ </a>
+ </button>
+ </div>
</div>
</div>
</div>
close: { id: 'video.close', defaultMessage: 'Close video' },
fullscreen: { id: 'video.fullscreen', defaultMessage: 'Full screen' },
exit_fullscreen: { id: 'video.exit_fullscreen', defaultMessage: 'Exit full screen' },
+ download: { id: 'video.download', defaultMessage: 'Download file' },
});
export const formatTime = secondsNum => {
{(!onCloseVideo && !editable) && <button type='button' aria-label={intl.formatMessage(messages.hide)} onClick={this.toggleReveal}><Icon id='eye-slash' fixedWidth /></button>}
{(!fullscreen && onOpenVideo) && <button type='button' aria-label={intl.formatMessage(messages.expand)} onClick={this.handleOpenVideo}><Icon id='expand' fixedWidth /></button>}
{onCloseVideo && <button type='button' aria-label={intl.formatMessage(messages.close)} onClick={this.handleCloseVideo}><Icon id='compress' fixedWidth /></button>}
+ <button type='button' aria-label={intl.formatMessage(messages.download)}>
+ <a className='video-player__download__icon' href={this.props.src} download>
+ <Icon id={'download'} fixedWidth />
+ </a>
+ </button>
<button type='button' aria-label={intl.formatMessage(fullscreen ? messages.exit_fullscreen : messages.fullscreen)} onClick={this.toggleFullscreen}><Icon id={fullscreen ? 'compress' : 'arrows-alt'} fixedWidth /></button>
+
</div>
</div>
</div>