Skip to content

Commit

Permalink
[Test] Reload Video on Failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jaruba committed May 30, 2024
1 parent eeaa3fd commit bf90df0
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/WebOsVideo/WebOsVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ function WebOsVideo(options) {

var isLoaded = null;

var videoLoaded = false;

var knownMediaId = false;

var subSize = 75;
Expand Down Expand Up @@ -1014,6 +1016,7 @@ function WebOsVideo(options) {
setTimeout(function() {
try {
videoElement.load();
videoLoaded = true;
} catch(e) {
console.log('can\'t load video');
console.error(e);
Expand All @@ -1039,12 +1042,15 @@ function WebOsVideo(options) {
// not needed?
// videoElement.src = stream.url;

// try {
// videoElement.load();
// } catch(e) {
// // console.log('can\'t load video');
// // console.error(e);
// }
if (!videoLoaded) {
try {
videoElement.load();
} catch(e) {
// console.log('can\'t load video');
// console.error(e);
}
videoLoaded = true;
}

try {
// console.log('try play');
Expand Down

0 comments on commit bf90df0

Please sign in to comment.