Skip to content

Commit

Permalink
Merge pull request #94 from Dynamsoft/_dev
Browse files Browse the repository at this point in the history
found 'Notification' incompatibility in IOS(test in IOS16);
  • Loading branch information
Cube authored Jan 13, 2023
2 parents e15e160 + e7c5bb7 commit 809605a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions 1.hello-world/10.read-video-pwa/helloworld-pwa.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ <h1 style="font-size: 1.5em;">Hello World for PWA</h1>
}

(async function() {
Notification.requestPermission().then((result) => {
if (result === 'granted') {
startNotificationLoop();
}
});
if(window.Notification) {
Notification.requestPermission().then((result) => {
if (result === 'granted') {
startNotificationLoop();
}
});
}
try {
const scanner = await (pScanner = pScanner || Dynamsoft.DBR.BarcodeScanner.createInstance());
scanner.onFrameRead = results => {
Expand Down

0 comments on commit 809605a

Please sign in to comment.