mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-27 15:32:48 -05:00
Add support for blurring streams
This commit is contained in:
committed by
Max Goodhart
parent
3759b05915
commit
e861071599
@@ -31,10 +31,14 @@ function Overlay({ views, streams, customStreams }) {
|
||||
const data = [...streams, ...customStreams].find(
|
||||
(d) => content.url === d.Link,
|
||||
)
|
||||
const isListening = viewState.matches('displaying.running.listening')
|
||||
const isListening = viewState.matches(
|
||||
'displaying.running.audio.listening',
|
||||
)
|
||||
const isBlurred = viewState.matches('displaying.running.video.blurred')
|
||||
const isLoading = viewState.matches('displaying.loading')
|
||||
return (
|
||||
<SpaceBorder pos={pos} isListening={isListening}>
|
||||
<BlurCover isBlurred={isBlurred} />
|
||||
{data && (
|
||||
<StreamTitle isListening={isListening}>
|
||||
<StreamIcon url={content.url} />
|
||||
@@ -186,4 +190,13 @@ const ListeningIndicator = styled(SoundIcon)`
|
||||
}
|
||||
`
|
||||
|
||||
const BlurCover = styled.div`
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
backdrop-filter: ${({ isBlurred }) => (isBlurred ? 'blur(30px)' : 'blur(0)')};
|
||||
`
|
||||
|
||||
render(<App />, document.body)
|
||||
|
||||
Reference in New Issue
Block a user