2016-10-05 14:36:59 +00:00
|
|
|
import React from 'react';
|
2018-07-25 19:46:51 +00:00
|
|
|
import { View } from 'react-native';
|
2016-10-05 14:36:59 +00:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
2017-06-05 18:00:02 +00:00
|
|
|
import AbstractVideoTrack from '../AbstractVideoTrack';
|
2017-06-10 22:50:42 +00:00
|
|
|
import styles from './styles';
|
2016-10-05 14:36:59 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Component that renders video element for a specified video track.
|
|
|
|
*
|
|
|
|
* @extends AbstractVideoTrack
|
|
|
|
*/
|
|
|
|
class VideoTrack extends AbstractVideoTrack {
|
2016-12-01 01:52:39 +00:00
|
|
|
/**
|
|
|
|
* VideoTrack component's property types.
|
|
|
|
*
|
|
|
|
* @static
|
|
|
|
*/
|
|
|
|
static propTypes = AbstractVideoTrack.propTypes
|
|
|
|
|
2016-10-05 14:36:59 +00:00
|
|
|
/**
|
2018-08-05 22:18:14 +00:00
|
|
|
* Renders the video element for the associated video track.
|
2016-10-05 14:36:59 +00:00
|
|
|
*
|
|
|
|
* @override
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
return (
|
2018-01-11 13:13:20 +00:00
|
|
|
<View style = { styles.video } >
|
2016-10-05 14:36:59 +00:00
|
|
|
{ super.render() }
|
2018-01-11 13:13:20 +00:00
|
|
|
</View>
|
2016-10-05 14:36:59 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect()(VideoTrack);
|