Skip to content

Instantly share code, notes, and snippets.

@captainbrosset
Last active February 4, 2025 09:14
Show Gist options
  • Save captainbrosset/1e3254e70d24ffb27dd449a5fe9f8e3f to your computer and use it in GitHub Desktop.
Save captainbrosset/1e3254e70d24ffb27dd449a5fe9f8e3f to your computer and use it in GitHub Desktop.

Revisions

  1. captainbrosset revised this gist Feb 4, 2025. 1 changed file with 0 additions and 19 deletions.
    19 changes: 0 additions & 19 deletions incoming-call-notification-with-custom-buttons.js
    Original file line number Diff line number Diff line change
    @@ -1,19 +0,0 @@
    const title = "Incoming call";

    const options = {
    scenario: "incoming-call",
    title: "Andrew Bares",
    body: "Incoming Call - Mobile",
    actions: [
    {
    action: "accept-audio-call",
    title: "audio"
    },
    {
    action: "accept-video-call",
    title: "video"
    }
    ]
    }

    serviceWorkerRegistration.showNotification(title, options);
  2. captainbrosset revised this gist Feb 4, 2025. 2 changed files with 19 additions and 0 deletions.
    19 changes: 19 additions & 0 deletions incoming-call-notification-with-custom-buttons.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    const title = "Incoming call";

    const options = {
    scenario: "incoming-call",
    title: "Andrew Bares",
    body: "Incoming Call - Mobile",
    actions: [
    {
    action: "accept-audio-call",
    title: "audio"
    },
    {
    action: "accept-video-call",
    title: "video"
    }
    ]
    }

    serviceWorkerRegistration.showNotification(title, options);
    File renamed without changes.
  3. captainbrosset created this gist Feb 4, 2025.
    8 changes: 8 additions & 0 deletions show-notification.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    const title = "Andrew Bares";

    const options = {
    scenario: "incoming-call",
    body: "Incoming Call - Mobile",
    }

    serviceWorkerRegistration.showNotification(title, options);