mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-17 07:32:09 +00:00
Merge pull request #414 from ThibG/glitch-soc/fixes/fix-video-playback
Fix video playback in glitch-soc detailed statuses
This commit is contained in:
commit
695b53b796
|
@ -35,9 +35,9 @@ export default class DetailedStatus extends ImmutablePureComponent {
|
|||
e.stopPropagation();
|
||||
}
|
||||
|
||||
// handleOpenVideo = startTime => {
|
||||
// this.props.onOpenVideo(this.props.status.getIn(['media_attachments', 0]), startTime);
|
||||
// }
|
||||
handleOpenVideo = startTime => {
|
||||
this.props.onOpenVideo(this.props.status.getIn(['media_attachments', 0]), startTime);
|
||||
}
|
||||
|
||||
render () {
|
||||
const status = this.props.status.get('reblog') ? this.props.status.get('reblog') : this.props.status;
|
||||
|
@ -53,13 +53,15 @@ export default class DetailedStatus extends ImmutablePureComponent {
|
|||
if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {
|
||||
media = <AttachmentList media={status.get('media_attachments')} />;
|
||||
} else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
|
||||
const video = status.getIn(['media_attachments', 0]);
|
||||
media = (
|
||||
<Video
|
||||
preview={video.get('preview_url')}
|
||||
src={video.get('url')}
|
||||
sensitive={status.get('sensitive')}
|
||||
media={status.getIn(['media_attachments', 0])}
|
||||
letterbox={settings.getIn(['media', 'letterbox'])}
|
||||
fullwidth={settings.getIn(['media', 'fullwidth'])}
|
||||
onOpenVideo={this.props.onOpenVideo}
|
||||
onOpenVideo={this.handleOpenVideo}
|
||||
autoplay
|
||||
/>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue