Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dgw): remove notification from player #1182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions webapp/player-project/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,53 +32,3 @@ body {
left: 0;
top: 0;
}

/* General styles for the notification overlay */
#notification {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
display: none;
justify-content: center;
align-items: center;
z-index: 9999; /* Ensure it's above other elements */
flex-direction: column;
gap: 20px;
}

/* Content styling for the notification box */
#notification-content {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
max-width: 90%;
width: 400px;
text-align: center;
}

/* Message styling */
#notification-message {
font-size: 16px;
margin-bottom: 15px;
color: #333;
}

/* Close button styling */
#notification-close {
background-color: #007bff;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
font-size: 14px;
cursor: pointer;
transition: background-color 0.3s ease;
}

#notification-close:hover {
background-color: #0056b3;
}
6 changes: 0 additions & 6 deletions webapp/player-project/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@

<body>
<script src="./src/main" type="module"></script>
<div id="notification">
<div id="notification-content">
<p id="notification-message"></p>
</div>
<button id="notification-close">Close</button>
</div>
</body>

</html>
21 changes: 0 additions & 21 deletions webapp/player-project/src/notification.ts

This file was deleted.

9 changes: 0 additions & 9 deletions webapp/player-project/src/streamers/webm.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import '../../../shadow-player/src/streamer';
import { ShadowPlayer } from '../../../shadow-player/src/streamer';
import { GatewayAccessApi } from '../gateway';
import { showNotification } from '../notification';

export async function handleWebm(gatewayAccessApi: GatewayAccessApi) {
// Create element with correct spelling
Expand All @@ -20,13 +19,5 @@ export async function handleWebm(gatewayAccessApi: GatewayAccessApi) {
shadowPlayer.srcChange(gatewayAccessApi.sessionShadowingUrl());
shadowPlayer.play();

shadowPlayer.onEnd(() => {
showNotification('Playback has ended', 'success');
});

shadowPlayer.onError((error) => {
showNotification(`An error occurred: ${error}`, 'error');
});
Comment on lines -27 to -29
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we remove this, how can we learn more about the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can show an error icon or animation? 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I think it’s best if we keep showing the error, even if it’s not localized 🤔
Let’s stick to removing only strings that are not critical, and hope that errors are not coming up too often.

Copy link
Contributor Author

@irvingoujAtDevolution irvingoujAtDevolution Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok,I get your idea, I'll keep the notification


return shadowPlayer;
}
Loading