Slide 1

Slide 1 text

AN INTRODUCTION TO TWILIO VIDEO Phil Nash - Developer Evangelist @philnash https://philna.sh [email protected]

Slide 2

Slide 2 text

ROOMS

Slide 3

Slide 3 text

PEER TO PEER Signalling is orchestrated by the Twilio service.

Slide 4

Slide 4 text

PEER TO PEER Media is shared directly between peers.

Slide 5

Slide 5 text

GROUP Signalling is orchestrated by the Twilio service.

Slide 6

Slide 6 text

GROUP Media is also sent via the Twilio service.

Slide 7

Slide 7 text

GROUP This allows for recording or adding other input streams, e.g. Twilio Voice Video recordings Twilio Voice

Slide 8

Slide 8 text

• Default group type • Up to 50 participants • Need to select group-small • Up to 4 participants • Cheaper LARGE GROUPS SMALL GROUPS

Slide 9

Slide 9 text

DEMO

Slide 10

Slide 10 text

USER IDENTITY AND ACCESS

Slide 11

Slide 11 text

IDENTITY It’s up to you!

Slide 12

Slide 12 text

ACCESS We have to agree on this together

Slide 13

Slide 13 text

ACCESS TOKENS Enter the JSON Web Token

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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" }

Slide 16

Slide 16 text

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" }

Slide 17

Slide 17 text

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" }

Slide 18

Slide 18 text

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" }

Slide 19

Slide 19 text

DEMO

Slide 20

Slide 20 text

DEBUGGING https://jwt.io

Slide 21

Slide 21 text

HOOKING UP THE INTERFACE

Slide 22

Slide 22 text

Room Participant Track Local Remote

Slide 23

Slide 23 text

Participants join a Room Participants publish Tracks Other Participants subscribe to Tracks Tracks are attached to the page

Slide 24

Slide 24 text

DEMO

Slide 25

Slide 25 text

THANK YOU Phil Nash - Developer Evangelist @philnash https://philna.sh [email protected]