[RN] Fix mirroring video views on platforms with native support
This commit is contained in:
parent
e29120a9c1
commit
43c8fc6847
|
@ -93,16 +93,16 @@ export class Video extends Component {
|
||||||
|
|
||||||
const mirror = this.props.mirror;
|
const mirror = this.props.mirror;
|
||||||
|
|
||||||
// XXX RTCView doesn't currently support mirroring, even when
|
// XXX RTCView may not support support mirroring, even when
|
||||||
// providing a transform style property. As a workaround, wrap the
|
// providing a transform style property (e.g. iOS) . As a
|
||||||
// RTCView inside another View and apply the transform style
|
// workaround, wrap the RTCView inside another View and apply the
|
||||||
// property to that View instead.
|
// transform style property to that View instead.
|
||||||
const mirrorWorkaround = mirror && !RTCVIEW_SUPPORTS_MIRROR;
|
const mirrorWorkaround = mirror && !RTCVIEW_SUPPORTS_MIRROR;
|
||||||
|
|
||||||
// eslint-disable-next-line no-extra-parens
|
// eslint-disable-next-line no-extra-parens
|
||||||
const video = (
|
const video = (
|
||||||
<RTCView
|
<RTCView
|
||||||
mirror = { !mirrorWorkaround }
|
mirror = { mirrorWorkaround ? false : mirror }
|
||||||
objectFit = { objectFit }
|
objectFit = { objectFit }
|
||||||
streamURL = { streamURL }
|
streamURL = { streamURL }
|
||||||
style = { style }
|
style = { style }
|
||||||
|
|
Loading…
Reference in New Issue