Преглед изворни кода

squash: remove unused prop, update comment

master
Leonard Kim пре 8 година
родитељ
комит
f3783efc48

+ 1
- 23
react/features/base/media/components/AbstractVideoTrack.js Прегледај датотеку

@@ -12,18 +12,6 @@ import { Video } from './_';
12 12
  * @abstract
13 13
  */
14 14
 export default class AbstractVideoTrack extends Component {
15
-    /**
16
-     * Default values for AbstractVideoTrack component's properties.
17
-     *
18
-     * @static
19
-     */
20
-    static defaultProps = {
21
-        /**
22
-         * Dispatch an action when the video starts playing.
23
-         */
24
-        triggerOnPlayingUpdate: true
25
-    };
26
-
27 15
     /**
28 16
      * AbstractVideoTrack component's property types.
29 17
      *
@@ -32,15 +20,6 @@ export default class AbstractVideoTrack extends Component {
32 20
     static propTypes = {
33 21
         dispatch: React.PropTypes.func,
34 22
 
35
-        /**
36
-         * Whether or not the store should be updated about the playing status
37
-         * of the video. Defaults to true. One use case for setting this prop
38
-         * to false is using multiple locals streams from the same video source,
39
-         * such as when previewing video. In those cases, the store may have no
40
-         * need to be updated about the existence or state of the stream.
41
-         */
42
-        triggerOnPlayingUpdate: React.PropTypes.bool,
43
-
44 23
         videoTrack: React.PropTypes.object,
45 24
 
46 25
         waitForVideoStarted: React.PropTypes.bool,
@@ -140,8 +119,7 @@ export default class AbstractVideoTrack extends Component {
140 119
     _onVideoPlaying() {
141 120
         const videoTrack = this.props.videoTrack;
142 121
 
143
-        if (this.props.triggerOnPlayingUpdate
144
-            && videoTrack
122
+        if (videoTrack
145 123
             && !videoTrack.videoStarted) {
146 124
             this.props.dispatch(trackVideoStarted(videoTrack.jitsiTrack));
147 125
         }

+ 2
- 1
react/features/base/media/components/web/VideoTrack.js Прегледај датотеку

@@ -6,7 +6,8 @@ import AbstractVideoTrack from '../AbstractVideoTrack';
6 6
 import Video from './Video';
7 7
 
8 8
 /**
9
- * Component that renders a video element for a passed in video track.
9
+ * Component that renders a video element for a passed in video track and
10
+ * notifies the store when the video has started playing.
10 11
  *
11 12
  * @extends AbstractVideoTrack
12 13
  */

+ 0
- 1
react/features/device-selection/components/VideoInputPreview.js Прегледај датотеку

@@ -44,7 +44,6 @@ class VideoInputPreview extends Component {
44 44
             <div className = { className }>
45 45
                 <Video
46 46
                     className = 'video-input-preview-display flipVideoX'
47
-                    triggerOnPlayingUpdate = { false }
48 47
                     videoTrack = {{ jitsiTrack: this.props.track }} />
49 48
                 <div className = 'video-input-preview-error'>
50 49
                     { error || '' }

Loading…
Откажи
Сачувај