Selaa lähdekoodia

Coding style

master
Lyubo Marinov 8 vuotta sitten
vanhempi
commit
84b9c5f5fd
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5
    5
      react/features/base/media/components/native/Video.js

+ 5
- 5
react/features/base/media/components/native/Video.js Näytä tiedosto

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

Loading…
Peruuta
Tallenna