Video: testing fallback image support
This commit is contained in:
@ -24,4 +24,9 @@
|
|||||||
object-fit:cover;
|
object-fit:cover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__image {
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Loader from './../loading/Loader';
|
import Loader from './../loading/Loader';
|
||||||
|
import Image from './../image/Image';
|
||||||
|
|
||||||
//Adjust the order to adjust the load position
|
//Adjust the order to adjust the load position
|
||||||
const VALID_SOURCES = [
|
const VALID_SOURCES = [
|
||||||
@ -95,11 +96,14 @@ export default class Video extends React.Component {
|
|||||||
|
|
||||||
//Fallback.
|
//Fallback.
|
||||||
let fallback;
|
let fallback;
|
||||||
|
if(sourceProps.image) {
|
||||||
|
fallback = <Image image={sourceProps.image} alt={sourceProps.alt} className="o-video__image" />
|
||||||
|
}
|
||||||
|
|
||||||
//Loader
|
//Loader
|
||||||
let loader;
|
let loader;
|
||||||
if(this.state.loader) {
|
if(this.state.loader) {
|
||||||
loader = <Loader />
|
loader = <Loader className="o-video__loader" />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user