Make video poster fill player and not use the logo. For #1857
This commit is contained in:
@@ -296,7 +296,9 @@ export default function OwncastPlayer(props: Props) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div style={{ gridColumn: 1, gridRow: 1 }}>
|
<div style={{ gridColumn: 1, gridRow: 1 }}>
|
||||||
{!videoPlaying && <VideoPoster online={online} initialSrc="/logo" src="/thumbnail.jpg" />}
|
{!videoPlaying && (
|
||||||
|
<VideoPoster online={online} initialSrc="/thumbnail.jpg" src="/thumbnail.jpg" />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,3 +2,8 @@
|
|||||||
height: 80vh;
|
height: 80vh;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.poster {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
@@ -2,4 +2,6 @@
|
|||||||
background-color: black;
|
background-color: black;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export default function VideoPoster(props: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={s.poster}>
|
<div className={s.poster}>
|
||||||
{!online && <img src={initialSrc} alt="logo" height="500vh" />}
|
{!online && <img src={initialSrc} alt="logo" />}
|
||||||
|
|
||||||
{online && (
|
{online && (
|
||||||
<CrossfadeImage
|
<CrossfadeImage
|
||||||
@@ -38,7 +38,7 @@ export default function VideoPoster(props: Props) {
|
|||||||
duration={duration}
|
duration={duration}
|
||||||
objectFit="contain"
|
objectFit="contain"
|
||||||
width="100%"
|
width="100%"
|
||||||
height="500px"
|
height="100%"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user