From 9f0a9d33d59d732f22f5bc3210fb968264e7f7d5 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Wed, 6 Jun 2018 07:56:33 +1000 Subject: [PATCH] Video: testing fallback image support --- public/styles/objects/_video.scss | 5 +++++ public/video/Video.jsx | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/public/styles/objects/_video.scss b/public/styles/objects/_video.scss index 6fd2762..fca5d8e 100644 --- a/public/styles/objects/_video.scss +++ b/public/styles/objects/_video.scss @@ -24,4 +24,9 @@ object-fit:cover; } } + + &__image { + position: absolute; + + } } diff --git a/public/video/Video.jsx b/public/video/Video.jsx index a926213..e24e6e6 100644 --- a/public/video/Video.jsx +++ b/public/video/Video.jsx @@ -23,6 +23,7 @@ import React from 'react'; import Loader from './../loading/Loader'; +import Image from './../image/Image'; //Adjust the order to adjust the load position const VALID_SOURCES = [ @@ -95,11 +96,14 @@ export default class Video extends React.Component { //Fallback. let fallback; + if(sourceProps.image) { + fallback = {sourceProps.alt} + } //Loader let loader; if(this.state.loader) { - loader = + loader = }