|
@@ -65,9 +65,9 @@ export class Video extends Component {
|
65
|
65
|
componentDidMount() {
|
66
|
66
|
// RTCView currently does not support media events, so just fire
|
67
|
67
|
// onPlaying callback when <RTCView> is rendered.
|
68
|
|
- if (this.props.onPlaying) {
|
69
|
|
- this.props.onPlaying();
|
70
|
|
- }
|
|
68
|
+ const { onPlaying } = this.props;
|
|
69
|
+
|
|
70
|
+ onPlaying && onPlaying();
|
71
|
71
|
}
|
72
|
72
|
|
73
|
73
|
/**
|
|
@@ -77,7 +77,7 @@ export class Video extends Component {
|
77
|
77
|
* @returns {ReactElement|null}
|
78
|
78
|
*/
|
79
|
79
|
render() {
|
80
|
|
- const stream = this.props.stream;
|
|
80
|
+ const { stream } = this.props;
|
81
|
81
|
|
82
|
82
|
if (stream) {
|
83
|
83
|
const streamURL = stream.toURL();
|
|
@@ -91,7 +91,7 @@ export class Video extends Component {
|
91
|
91
|
const style = styles.video;
|
92
|
92
|
const objectFit = (style && style.objectFit) || 'cover';
|
93
|
93
|
|
94
|
|
- const mirror = this.props.mirror;
|
|
94
|
+ const { mirror } = this.props;
|
95
|
95
|
|
96
|
96
|
// XXX RTCView may not support support mirroring, even when
|
97
|
97
|
// providing a transform style property (e.g. iOS) . As a
|