An introduction to Twilio Video

An introduction to Twilio Video

8ec1383b240b5ba15ffb9743fceb3c0e?s=128

Phil Nash

August 06, 2019
Tweet

Transcript

  1. AN INTRODUCTION TO TWILIO VIDEO Phil Nash - Developer Evangelist

    @philnash https://philna.sh philnash@twilio.com
  2. ROOMS

  3. PEER TO PEER Signalling is orchestrated by the Twilio service.

  4. PEER TO PEER Media is shared directly between peers.

  5. GROUP Signalling is orchestrated by the Twilio service.

  6. GROUP Media is also sent via the Twilio service.

  7. GROUP This allows for recording or adding other input streams,

    e.g. Twilio Voice Video recordings Twilio Voice
  8. • Default group type • Up to 50 participants •

    Need to select group-small • Up to 4 participants • Cheaper LARGE GROUPS SMALL GROUPS
  9. DEMO

  10. USER IDENTITY AND ACCESS

  11. IDENTITY It’s up to you!

  12. ACCESS We have to agree on this together

  13. ACCESS TOKENS Enter the JSON Web Token

  14. JSON WEB TOKENS Standards based method for transmitting information between

    parties as a JSON object that can be verified and trusted because it is signed using a shared secret. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsIm N0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGki OiJTSzMzNTVhZDZjMWUwZDcyYTc0NjcyZTliOW UyMzMwMmNjLTE1NjQ3MjQzMjAiLCJncmFudHMi OnsiaWRlbnRpdHkiOiJwaGlsLTY3MTUiLCJ2aW RlbyI6eyJyb29tIjoiU3VwZXJjbGFzcyJ9fSwi aWF0IjoxNTY0NzI0MzIwLCJleHAiOjE1NjQ3Mj c5MjAsImlzcyI6IlNLMzM1NWFkNmMxZTBkNzJh NzQ2NzJlOWI5ZTIzMzAyY2MiLCJzdWIiOiJBQz gxZWJmZTFjMGI1YzY3NjlhYTVkNzQ2MTIxMjg0 MDU2In0.V- JM1EOuhBLo9_gEDgVBWXulbRYcNEYHjnhIU8O9 h50
  15. JSON WEB TOKENS Standards based method for transmitting information between

    parties as a JSON object that can be verified and trusted because it is signed using a shared secret. { "jti": "SK3355ad6c1e0d72a74672e9b9e23302cc-1564724320", "grants": { "identity": "phil-6715", "video": { "room": "Superclass" } }, "iat": 1564724320, "exp": 1564727920, "iss": "SK3355ad6c1e0d72a74672e9b9e23302cc", "sub": "AC81ebfe1c0b5c6769aa5d746121284056" }
  16. TWILIO ACCESS TOKENS JWTs with a specific structure, including an

    issuer, subject and grants with the resources that are being authorised. https://www.twilio.com/docs/iam/access-tokens { "jti": "SK3355ad6c1e0d72a74672e9b9e23302cc-1564724320", "grants": { "identity": "phil-6715", "video": { "room": "Superclass" } }, "iat": 1564724320, "exp": 1564727920, "iss": "SK3355ad6c1e0d72a74672e9b9e23302cc", "sub": "AC81ebfe1c0b5c6769aa5d746121284056" }
  17. TWILIO ACCESS TOKENS JWTs with a specific structure, including an

    issuer, subject and grants with the resources that are being authorised. https://www.twilio.com/docs/iam/access-tokens { "jti": "SK3355ad6c1e0d72a74672e9b9e23302cc-1564724320", "grants": { "identity": "phil-6715", "video": { "room": "Superclass" } }, "iat": 1564724320, "exp": 1564727920, "iss": "SK3355ad6c1e0d72a74672e9b9e23302cc", "sub": "AC81ebfe1c0b5c6769aa5d746121284056" }
  18. TWILIO ACCESS TOKENS JWTs with a specific structure, including an

    issuer, subject and grants with the resources that are being authorised. https://www.twilio.com/docs/iam/access-tokens { "jti": "SK3355ad6c1e0d72a74672e9b9e23302cc-1564724320", "grants": { "identity": "phil-6715", "video": { "room": "Superclass" } }, "iat": 1564724320, "exp": 1564727920, "iss": "SK3355ad6c1e0d72a74672e9b9e23302cc", "sub": "AC81ebfe1c0b5c6769aa5d746121284056" }
  19. DEMO

  20. DEBUGGING https://jwt.io

  21. HOOKING UP THE INTERFACE

  22. Room Participant Track Local Remote

  23. Participants join a Room Participants publish Tracks Other Participants subscribe

    to Tracks Tracks are attached to the page
  24. DEMO

  25. THANK YOU Phil Nash - Developer Evangelist @philnash https://philna.sh philnash@twilio.com