Skip to content

Commit

Permalink
refactor: better channel switching overlay
Browse files Browse the repository at this point in the history
* hide channel switcher after 5s
* color channel switcher button based on hex, if available

Signed-off-by: eXhumer <exhumer@exhumer.cc>
  • Loading branch information
eXhumer committed Oct 25, 2024
1 parent 7ff4a6d commit 16d43a4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
24 changes: 24 additions & 0 deletions src/Player/React/App.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
.additional-streams-overlay {
position: fixed;
display: flex;
flex-direction: column;
width: Max(10vw, 64px);
height: 100vh;
right: 0;
justify-content: center;
animation: fadeOut 5s forwards;
transition: opacity 0.3s ease-in-out;
opacity: 1;
}

.additional-streams-overlay:hover {
opacity: 1;
animation: none;
}

.additional-streams-overlay > button {
pointer-events: auto;
-webkit-app-region: no-drag;
}

@keyframes fadeOut {
0% { opacity: 1; }
90% { opacity: 1; }
100% { opacity: 0; }
}
5 changes: 4 additions & 1 deletion src/Player/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@ const App = () => {
onClick={() => {
switchChannel(stream.channelId);
}}
style={{
backgroundColor: stream.hex,
}}
>
{stream.title}
{stream.reportingName}
</button>
))}
</div>
Expand Down

0 comments on commit 16d43a4

Please sign in to comment.