Skip to content

Commit

Permalink
don't use Notification API on mobile Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
linnaea committed Oct 3, 2024
1 parent 543ed4f commit 960d5d9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,15 @@
encodeVideo();
document.getElementById('seekControl').style.display = 'none';
document.getElementById('stepControl').style.display = 'none';
window.Notification?.requestPermission();
try {
if (window.Notification && window.Notification?.permission !== 'granted') {
new Notification('');
Notification.requestPermission();
}
} catch(e) {
if (!(e instanceof TypeError))
Notification.requestPermission();
}
return;
case ALL_STEPS.RING:
let frameWidth = previewFrame.width - config.cropL - config.cropR;
Expand Down

0 comments on commit 960d5d9

Please sign in to comment.