2

Following the Twilio Quickstart guide for programmable video at https://github.com/twilio/video-quickstart-js

I want to be able to trigger a ring or a notification for the other user.

We only have one room, and max 2 participants.

User1 calls ( Joins a room ) and User2 gets a notification about it. If User2 picks up ( they join the room ) otherwise User1 gets a notification that User2 is not available.

For User1, participantConnected seems to be sufficient to check if the User2 picked up the call.

Are there any event to help with triggering notification on denial of call, or trigger a notification for User2?

Mohit
  • 857
  • 1
  • 10
  • 26

1 Answers1

1

Twilio developer evangelist here.

There is nothing within the Twilio Video SDK that provides for notification of users. That is up to your application to implement in whichever way works for you.

philnash
  • 70,667
  • 10
  • 60
  • 88
  • Well, I begun making it in FCM, but it won't work in Safari. Any other suggestions? – Mohit Nov 26 '19 at 20:02
  • [Safari only supports notifications on the desktop](https://developer.apple.com/notifications/safari-push-notifications/) and you would need to implement that separately to your FCM integration. – philnash Nov 26 '19 at 23:43
  • https://github.com/firebase/firebase-js-sdk/issues/1423 FCM currently doesn't seem to support SPN – Mohit Nov 28 '19 at 09:15
  • That's correct, you would have to implement safari push notifications separately. – philnash Nov 29 '19 at 09:09
  • Okay, thanks. So I cannot use Twilio Notify for this? I only see articles relating to FCM https://www.twilio.com/docs/chat/javascript/push-notifications-web – Mohit Nov 30 '19 at 13:20
  • Twilio does nothing to support push notifications in Safari. It only supports web push notifications via FCM right now. – philnash Dec 01 '19 at 06:12
  • Hi, I began integrating this with Safari notifications, it appears that push notifications are not available on Safari mobile. Any other ideas? I only care about foreground, not the background. If users are not on the screen, it's fine if they miss the call. – Mohit Feb 13 '20 at 10:38
  • That is correct, Safari only supports push notifications on the desktop. If you only care about the foreground then I would use something like web sockets or server sent events to alert your front end to an incoming call so that you can then display a message in your UI for your user. – philnash Feb 13 '20 at 22:13