remote button triggers next player

This commit is contained in:
cpu
2025-03-26 21:57:45 +01:00
parent bade9c0a15
commit 80989a248e
2 changed files with 64 additions and 40 deletions

22
sw.js
View File

@@ -151,18 +151,18 @@ self.addEventListener('message', event => {
self.addEventListener('push', event => {
console.log('[ServiceWorker] Push received');
const data = event.data ? event.data.json() : {};
const title = data.title || 'Game Timer Notification';
const options = {
body: data.body || 'You have a new notification',
icon: '/icons/android-chrome-192x192.png',
badge: '/icons/android-chrome-192x192.png',
data: data
};
// const data = event.data ? event.data.json() : {};
// const title = data.title || 'Game Timer Notification';
// const options = {
// body: data.body || 'You have a new notification',
// icon: '/icons/android-chrome-192x192.png',
// badge: '/icons/android-chrome-192x192.png',
// data: data
// };
event.waitUntil(
self.registration.showNotification(title, options)
);
// event.waitUntil(
// self.registration.showNotification(title, options)
// );
});
// This helps with navigation after app is installed