squash: remove unused prop, update comment
This commit is contained in:
parent
1e84f993b4
commit
f3783efc48
|
@ -12,18 +12,6 @@ import { Video } from './_';
|
||||||
* @abstract
|
* @abstract
|
||||||
*/
|
*/
|
||||||
export default class AbstractVideoTrack extends Component {
|
export default class AbstractVideoTrack extends Component {
|
||||||
/**
|
|
||||||
* Default values for AbstractVideoTrack component's properties.
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
*/
|
|
||||||
static defaultProps = {
|
|
||||||
/**
|
|
||||||
* Dispatch an action when the video starts playing.
|
|
||||||
*/
|
|
||||||
triggerOnPlayingUpdate: true
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AbstractVideoTrack component's property types.
|
* AbstractVideoTrack component's property types.
|
||||||
*
|
*
|
||||||
|
@ -32,15 +20,6 @@ export default class AbstractVideoTrack extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
dispatch: React.PropTypes.func,
|
dispatch: React.PropTypes.func,
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not the store should be updated about the playing status
|
|
||||||
* of the video. Defaults to true. One use case for setting this prop
|
|
||||||
* to false is using multiple locals streams from the same video source,
|
|
||||||
* such as when previewing video. In those cases, the store may have no
|
|
||||||
* need to be updated about the existence or state of the stream.
|
|
||||||
*/
|
|
||||||
triggerOnPlayingUpdate: React.PropTypes.bool,
|
|
||||||
|
|
||||||
videoTrack: React.PropTypes.object,
|
videoTrack: React.PropTypes.object,
|
||||||
|
|
||||||
waitForVideoStarted: React.PropTypes.bool,
|
waitForVideoStarted: React.PropTypes.bool,
|
||||||
|
@ -140,8 +119,7 @@ export default class AbstractVideoTrack extends Component {
|
||||||
_onVideoPlaying() {
|
_onVideoPlaying() {
|
||||||
const videoTrack = this.props.videoTrack;
|
const videoTrack = this.props.videoTrack;
|
||||||
|
|
||||||
if (this.props.triggerOnPlayingUpdate
|
if (videoTrack
|
||||||
&& videoTrack
|
|
||||||
&& !videoTrack.videoStarted) {
|
&& !videoTrack.videoStarted) {
|
||||||
this.props.dispatch(trackVideoStarted(videoTrack.jitsiTrack));
|
this.props.dispatch(trackVideoStarted(videoTrack.jitsiTrack));
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,8 @@ import AbstractVideoTrack from '../AbstractVideoTrack';
|
||||||
import Video from './Video';
|
import Video from './Video';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component that renders a video element for a passed in video track.
|
* Component that renders a video element for a passed in video track and
|
||||||
|
* notifies the store when the video has started playing.
|
||||||
*
|
*
|
||||||
* @extends AbstractVideoTrack
|
* @extends AbstractVideoTrack
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -44,7 +44,6 @@ class VideoInputPreview extends Component {
|
||||||
<div className = { className }>
|
<div className = { className }>
|
||||||
<Video
|
<Video
|
||||||
className = 'video-input-preview-display flipVideoX'
|
className = 'video-input-preview-display flipVideoX'
|
||||||
triggerOnPlayingUpdate = { false }
|
|
||||||
videoTrack = {{ jitsiTrack: this.props.track }} />
|
videoTrack = {{ jitsiTrack: this.props.track }} />
|
||||||
<div className = 'video-input-preview-error'>
|
<div className = 'video-input-preview-error'>
|
||||||
{ error || '' }
|
{ error || '' }
|
||||||
|
|
Loading…
Reference in New Issue