mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
Use array to build classes in video view
This commit is contained in:
parent
af68c07931
commit
3a57363b8a
1 changed files with 7 additions and 7 deletions
|
@ -46,20 +46,20 @@ class Video extends React.PureComponent {
|
||||||
loadStatusMessage = __("Downloading stream... not long left now!");
|
loadStatusMessage = __("Downloading stream... not long left now!");
|
||||||
}
|
}
|
||||||
|
|
||||||
let klassName = "";
|
let klasses = [];
|
||||||
if (isLoading || isDownloading) klassName += "video-embedded video";
|
if (isLoading || isDownloading) klasses.push("video-embedded", "video");
|
||||||
if (mediaType === "video") {
|
if (mediaType === "video") {
|
||||||
klassName += "video-embedded video";
|
klasses.push("video-embedded", "video");
|
||||||
klassName += isPlaying ? " video--active" : " video--hidden";
|
klasses.push(isPlaying ? "video--active" : "video--hidden");
|
||||||
} else if (mediaType === "application") {
|
} else if (mediaType === "application") {
|
||||||
klassName += "video-embedded";
|
klasses.push("video-embedded");
|
||||||
} else {
|
} else {
|
||||||
if (!isPlaying) klassName += "video-embedded";
|
if (!isPlaying) klasses.push("video-embedded");
|
||||||
}
|
}
|
||||||
const poster = metadata.thumbnail;
|
const poster = metadata.thumbnail;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={klassName}>
|
<div className={klasses.join(" ")}>
|
||||||
{isPlaying &&
|
{isPlaying &&
|
||||||
(!isReadyToPlay
|
(!isReadyToPlay
|
||||||
? <LoadingScreen status={loadStatusMessage} />
|
? <LoadingScreen status={loadStatusMessage} />
|
||||||
|
|
Loading…
Add table
Reference in a new issue