Fix empty subtitle error in the download button
This commit is contained in:
parent
72c7814239
commit
daae180410
@ -71,11 +71,13 @@ class Player extends React.PureComponent {
|
||||
super(props);
|
||||
}
|
||||
render() {
|
||||
const subtitles = this.props.subtitles;
|
||||
const hasSubtitles = (subtitles !== undefined && subtitles !== null);
|
||||
return (
|
||||
<div className="embed-responsive embed-responsive-16by9">
|
||||
<video controls>
|
||||
<source src={this.props.url} type="video/mp4"/>
|
||||
{this.props.subtitles !== undefined && this.props.subtitles.toIndexedSeq().map(function(el, index) {
|
||||
{hasSubtitles && subtitles.toIndexedSeq().map(function(el, index) {
|
||||
return (
|
||||
<track
|
||||
key={index}
|
||||
|
Loading…
x
Reference in New Issue
Block a user