Looking at the code, I could see that the fallback consists of setting an image and a video at the same time.
Example:
var scenes = {
petra: {
video: 'congo_2048.mp4', // In this case the video will be render as default.
image: 'petra.jpg', // In this case it should work as a fallback.
},
}
BUT, it doesn't work as designed. Currently, it displays an error => 'Both image and video URL can\'t be specified.'
So I propose to remove the checker "if (this.image && this.video) {" from the code below.
SceneInfo.prototype.isValid = function() {
// Either it's an image or a video.
if (!this.image && !this.video) {
this.errorMessage = 'Either image or video URL must be specified.';
return false;
}
if (this.image && this.video) {
this.errorMessage = 'Both image and video URL can\'t be specified.';
return false;
}
if (this.image && !this.isValidImage_(this.image)) {
this.errorMessage = 'Invalid image URL: ' + this.image;
return false;
}
this.errorMessage = null;
return true;
};
I did some tests by removing this piece of code, and it works fine.
I'll create a PR.
Hi guys,
Looking at the code, I could see that the fallback consists of setting an image and a video at the same time. Example:
BUT, it doesn't work as designed. Currently, it displays an error => 'Both image and video URL can\'t be specified.'
So I propose to remove the checker "if (this.image && this.video) {" from the code below.
I did some tests by removing this piece of code, and it works fine. I'll create a PR.