|
|
@ -146,29 +146,29 @@ export default class VideoPlayer extends React.PureComponent {
|
|
|
|
if (!this.state.visible) {
|
|
|
|
if (!this.state.visible) {
|
|
|
|
if (sensitive) {
|
|
|
|
if (sensitive) {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div role='button' tabIndex='0' style={{ width: `${width}px`, height: `${height}px`, marginTop: '8px' }} className='media-spoiler__video' onClick={this.handleVisibility}>
|
|
|
|
<button style={{ width: `${width}px`, height: `${height}px`, marginTop: '8px' }} className='media-spoiler' onClick={this.handleVisibility}>
|
|
|
|
{spoilerButton}
|
|
|
|
{spoilerButton}
|
|
|
|
<span className='media-spoiler__warning'><FormattedMessage id='status.sensitive_warning' defaultMessage='Sensitive content' /></span>
|
|
|
|
<span className='media-spoiler__warning'><FormattedMessage id='status.sensitive_warning' defaultMessage='Sensitive content' /></span>
|
|
|
|
<span className='media-spoiler__trigger'><FormattedMessage id='status.sensitive_toggle' defaultMessage='Click to view' /></span>
|
|
|
|
<span className='media-spoiler__trigger'><FormattedMessage id='status.sensitive_toggle' defaultMessage='Click to view' /></span>
|
|
|
|
</div>
|
|
|
|
</button>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div role='button' tabIndex='0' style={{ width: `${width}px`, height: `${height}px`, marginTop: '8px' }} className='media-spoiler__video' onClick={this.handleVisibility}>
|
|
|
|
<button style={{ width: `${width}px`, height: `${height}px`, marginTop: '8px' }} className='media-spoiler' onClick={this.handleVisibility}>
|
|
|
|
{spoilerButton}
|
|
|
|
{spoilerButton}
|
|
|
|
<span className='media-spoiler__warning'><FormattedMessage id='status.media_hidden' defaultMessage='Media hidden' /></span>
|
|
|
|
<span className='media-spoiler__warning'><FormattedMessage id='status.media_hidden' defaultMessage='Media hidden' /></span>
|
|
|
|
<span className='media-spoiler__trigger'><FormattedMessage id='status.sensitive_toggle' defaultMessage='Click to view' /></span>
|
|
|
|
<span className='media-spoiler__trigger'><FormattedMessage id='status.sensitive_toggle' defaultMessage='Click to view' /></span>
|
|
|
|
</div>
|
|
|
|
</button>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (this.state.preview && !autoplay) {
|
|
|
|
if (this.state.preview && !autoplay) {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div role='button' tabIndex='0' className='media-spoiler-video' style={{ width: `${width}px`, height: `${height}px`, backgroundImage: `url(${media.get('preview_url')})` }} onClick={this.handleOpen}>
|
|
|
|
<button className='media-spoiler-video' style={{ width: `${width}px`, height: `${height}px`, backgroundImage: `url(${media.get('preview_url')})` }} onClick={this.handleOpen}>
|
|
|
|
{spoilerButton}
|
|
|
|
{spoilerButton}
|
|
|
|
<div className='media-spoiler-video-play-icon'><i className='fa fa-play' /></div>
|
|
|
|
<div className='media-spoiler-video-play-icon'><i className='fa fa-play' /></div>
|
|
|
|
</div>
|
|
|
|
</button>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|