|
@@ -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
|
}
|