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);
|
super(props);
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
|
const subtitles = this.props.subtitles;
|
||||||
|
const hasSubtitles = (subtitles !== undefined && subtitles !== null);
|
||||||
return (
|
return (
|
||||||
<div className="embed-responsive embed-responsive-16by9">
|
<div className="embed-responsive embed-responsive-16by9">
|
||||||
<video controls>
|
<video controls>
|
||||||
<source src={this.props.url} type="video/mp4"/>
|
<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 (
|
return (
|
||||||
<track
|
<track
|
||||||
key={index}
|
key={index}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user