From 1df4db723b758952183f8960492d61e0c4d5ac1d Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Thu, 15 Jul 2021 18:07:40 +0200 Subject: [PATCH 1/6] feat(video): video placeholder --- src/components/VideoElement.js | 7 ++++--- src/components/VideoPlaceholder.css | 23 +++++++++++++++++++++++ src/components/VideoPlaceholder.js | 12 ++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 src/components/VideoPlaceholder.css create mode 100644 src/components/VideoPlaceholder.js diff --git a/src/components/VideoElement.js b/src/components/VideoElement.js index c568302e..c91db295 100644 --- a/src/components/VideoElement.js +++ b/src/components/VideoElement.js @@ -1,6 +1,7 @@ import React from 'react' import Hls from 'hls.js' import './VideoElement.css' +import { VideoPlaceholder } from './VideoPlaceholder' // streamUrl: string // loading: boolean @@ -29,13 +30,13 @@ export function VideoElement({ streamUrl, loading }) { // TODO make better loading/error/empty state if (error) - return (

Your browser is not supported

) + return (Your browser is not supported) if (loading) - return

Loading episode

+ return Loading episode if (!streamUrl || streamUrl.length === 0) - return

No video selected

+ return No video selected return (