Removing Play Button With No File (#5141)

* Remove Play Button With No File
* Hide controls when there is no file
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
Gykes 2024-08-27 17:50:04 -07:00 committed by GitHub
parent a023a86ca6
commit b3d6a8eedd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -822,7 +822,7 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
return (
<div
className={cx("VideoPlayer", { portrait: isPortrait })}
className={cx("VideoPlayer", { portrait: isPortrait, "no-file": !file })}
onKeyDownCapture={onKeyDown}
>
<div className="video-wrapper" ref={videoRef} />

View File

@ -34,6 +34,13 @@ $sceneTabWidth: 450px;
}
}
.VideoPlayer.no-file .video-js {
.vjs-big-play-button,
.vjs-control-bar {
display: none;
}
}
.video-js {
height: 100%;
position: absolute;