This repository was archived by the owner on Apr 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Video Chat
Mohamad Nour Chawich edited this page May 2, 2016
·
3 revisions
Wiki ▸ API Reference ▸ Chat ▸ Video Chat
Twilio offers a WebRTC Video calling service that Shoutit use to connect its users.
| Account SID | AC72062980c854618cfa7765121af3085d |
|---|
| Configuration SID | API Key
:---------- | :----------------------------------- | :----------------------------------
Production | VS32da2a0f9dbfe4196f4301331e28bfe7 | SK4717f4a7929e0a0224f120acc6a26f5c
Development | VS62cb86639806a479f8637eeb98eb80ff | SK701ec111c6e494e9e0fa964c2999507d
Local | VS3536d3b62a808cc5ea7c3bbb235a52f5 | SK44baa4734c015a507afe4e18211aff21
| Live Docs | URL |
|---|---|
| Video Auth | /twilio/video_auth |
| Video Identity | /twilio/video_identity |
| Video Call | /twilio/video_call |
Should be initiated only for regular users (not guests) when the app opens.
- Request Twilio Access Token using Video Auth endpoint
- Initializes Twilio SDK with the access token,
Configuration SIDandAPI Key(when necessary)
Make sure the
tokenis not expired by checking returnedexpires_atproperty. This helps deciding whether to continue using the token or requesting new one.
- Request the
identityof the Profile you want to call using Video Identity endpoint - Create Video Conversation
- Repeat the following steps 3 times during 30 seconds (1st try, pause few secs, 2nd try, pause, 3rd try, fail)
- make post request to Video Call endpoint using the other Profile
identity - invite the other Profile to the Video Conversation
- ignore bad response from Twilio when it is about other client not available
- break the loop if there was a different error from Twilio
- pause few seconds
- if there was no answer either by finishing the loop or by an error from Twilio that finished it, Makes post request to Video Call endpoint with other Profile's
identityandmissedthat equalstrue. This sends a Push notification to the other Profile with a missed video call message.