From f38a5b8a15c9e41de8207729ec9436e1edfa8955 Mon Sep 17 00:00:00 2001 From: btzr-io Date: Thu, 3 May 2018 21:11:19 -0600 Subject: [PATCH] hide media until it's ready to play --- src/renderer/component/video/internal/player.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderer/component/video/internal/player.jsx b/src/renderer/component/video/internal/player.jsx index 3842c30ad..7c55c8ddf 100644 --- a/src/renderer/component/video/internal/player.jsx +++ b/src/renderer/component/video/internal/player.jsx @@ -165,6 +165,7 @@ class VideoPlayer extends React.PureComponent { const { hasMetadata, unplayable } = this.state; const noMetadataMessage = 'Waiting for metadata.'; const unplayableMessage = "Sorry, looks like we can't play this file."; + const hideMedia = this.playableType() && !hasMetadata && !unplayable; return ( @@ -177,6 +178,7 @@ class VideoPlayer extends React.PureComponent { {unplayable && }
{ this.media = container; }}