瀏覽代碼

squash: remove unused prop, update comment

j8
Leonard Kim 8 年之前
父節點
當前提交
f3783efc48

+ 1
- 23
react/features/base/media/components/AbstractVideoTrack.js 查看文件

12
  * @abstract
12
  * @abstract
13
  */
13
  */
14
 export default class AbstractVideoTrack extends Component {
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
      * AbstractVideoTrack component's property types.
16
      * AbstractVideoTrack component's property types.
29
      *
17
      *
32
     static propTypes = {
20
     static propTypes = {
33
         dispatch: React.PropTypes.func,
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
         videoTrack: React.PropTypes.object,
23
         videoTrack: React.PropTypes.object,
45
 
24
 
46
         waitForVideoStarted: React.PropTypes.bool,
25
         waitForVideoStarted: React.PropTypes.bool,
140
     _onVideoPlaying() {
119
     _onVideoPlaying() {
141
         const videoTrack = this.props.videoTrack;
120
         const videoTrack = this.props.videoTrack;
142
 
121
 
143
-        if (this.props.triggerOnPlayingUpdate
144
-            && videoTrack
122
+        if (videoTrack
145
             && !videoTrack.videoStarted) {
123
             && !videoTrack.videoStarted) {
146
             this.props.dispatch(trackVideoStarted(videoTrack.jitsiTrack));
124
             this.props.dispatch(trackVideoStarted(videoTrack.jitsiTrack));
147
         }
125
         }

+ 2
- 1
react/features/base/media/components/web/VideoTrack.js 查看文件

6
 import Video from './Video';
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
  * @extends AbstractVideoTrack
12
  * @extends AbstractVideoTrack
12
  */
13
  */

+ 0
- 1
react/features/device-selection/components/VideoInputPreview.js 查看文件

44
             <div className = { className }>
44
             <div className = { className }>
45
                 <Video
45
                 <Video
46
                     className = 'video-input-preview-display flipVideoX'
46
                     className = 'video-input-preview-display flipVideoX'
47
-                    triggerOnPlayingUpdate = { false }
48
                     videoTrack = {{ jitsiTrack: this.props.track }} />
47
                     videoTrack = {{ jitsiTrack: this.props.track }} />
49
                 <div className = 'video-input-preview-error'>
48
                 <div className = 'video-input-preview-error'>
50
                     { error || '' }
49
                     { error || '' }

Loading…
取消
儲存