diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-09-28 13:29:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 13:29:43 +0200 |
commit | d88a79b4566869ede24958fbff946e357bbb3cb9 (patch) | |
tree | a8a38995b2f23b6a4800fa13c4c43eb20d1a72b0 /app/javascript/mastodon/features/status/index.js | |
parent | 5bbc9a4f78cce2ba519b061e77b166417b044235 (diff) |
Add pop-out player for audio/video in web UI (#14870)
Fix #11160
Diffstat (limited to 'app/javascript/mastodon/features/status/index.js')
-rw-r--r-- | app/javascript/mastodon/features/status/index.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js index 179df53a1..cf3a5fa44 100644 --- a/app/javascript/mastodon/features/status/index.js +++ b/app/javascript/mastodon/features/status/index.js @@ -143,6 +143,7 @@ const makeMapStateToProps = () => { descendantsIds, askReplyConfirmation: state.getIn(['compose', 'text']).trim().length !== 0, domain: state.getIn(['meta', 'domain']), + usingPiP: state.get('picture_in_picture').statusId === props.params.statusId, }; }; @@ -167,6 +168,7 @@ class Status extends ImmutablePureComponent { askReplyConfirmation: PropTypes.bool, multiColumn: PropTypes.bool, domain: PropTypes.string.isRequired, + usingPiP: PropTypes.bool, }; state = { @@ -492,7 +494,7 @@ class Status extends ImmutablePureComponent { render () { let ancestors, descendants; - const { shouldUpdateScroll, status, ancestorsIds, descendantsIds, intl, domain, multiColumn } = this.props; + const { shouldUpdateScroll, status, ancestorsIds, descendantsIds, intl, domain, multiColumn, usingPiP } = this.props; const { fullscreen } = this.state; if (status === null) { @@ -550,6 +552,7 @@ class Status extends ImmutablePureComponent { domain={domain} showMedia={this.state.showMedia} onToggleMediaVisibility={this.handleToggleMediaVisibility} + usingPiP={usingPiP} /> <ActionBar |