From a8cf3cf9e9fd881fd772c4d1f28d4560d84f34d4 Mon Sep 17 00:00:00 2001 From: Charles Dyason Date: Mon, 11 Sep 2023 02:22:56 +0200 Subject: [PATCH] Update readme --- README.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ce644388..b29dcc1b 100644 --- a/README.md +++ b/README.md @@ -163,18 +163,20 @@ See [example](https://github.com/cybex-dev/twilio_voice/blob/master/example/andr ### Web Setup: -There are 2 important files for Twilio incoming/missed call notifications to work: +There are 4 important files for Twilio incoming/missed call notifications to work: +- `twilio.min.js` is the twilio javascript SDK, it is used to handle the incoming calls. - `notifications.js` is the main file, it handles the notifications and the service worker. +- `load-sw.js` is responsible for (re)loading the twilio service worker. - `twilio-sw.js` is the service worker, it is used to handle the incoming calls. Also, the twilio javascript SDK itself, `twilio.min.js` is needed. To ensure proper/as intended setup: -1. Get all 3 files (`notifications.js`, `twilio.min.js` and `twilio-sw.js`) from `example/web` folder -2. Copy all 3 into your own project, -3. (optional) Review & change the `notifications.js`, `twilio-sw.js) files to match your needs. +1. Locate 4 files (`twilio.min.js`, `load-sw.js`, `notifications.js` and `twilio-sw.js`) from `example/web` folder +2. Copy all 4 files into your own project, +3. (optional) Review & change the `notifications.js`, `twilio-sw.js` files to match your needs. Finally, add the following code to your `index.html` file, **at the end of body tag**: @@ -182,8 +184,9 @@ Finally, add the following code to your `index.html` file, **at the end of body - - + + +