Make 15 sec fallback loop start when video is created, loop properly
This commit is contained in:
parent
5870f42ab3
commit
d3745e13d1
1 changed files with 1 additions and 2 deletions
|
@ -18,14 +18,13 @@ var WatchPage = React.createClass({
|
|||
componentDidMount: function() {
|
||||
lbry.getStream(this.props.name);
|
||||
this.updateLoadStatus();
|
||||
setTimeout(() => { this.reloadIfNeeded() }, 15000);
|
||||
},
|
||||
reloadIfNeeded: function() {
|
||||
// Fallback option for loading problems: every 15 seconds, if the video hasn't reported being
|
||||
// playable yet, ask it to reload.
|
||||
if (!this.state.readyToPlay) {
|
||||
console.log("Trying again");
|
||||
this._video.load()
|
||||
setTimeout(() => { this.reloadIfNeeded() }, 15000);
|
||||
}
|
||||
},
|
||||
onCanPlay: function() {
|
||||
|
|
Loading…
Reference in a new issue