57
COMMUNICATE ALL THE COMMUNICATE ALL THE THINGS!!! THINGS!!!

COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

COMMUNICATE ALL THECOMMUNICATE ALL THETHINGS!!!THINGS!!!

Page 2: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

http://goo.gl/v3aHL9http://goo.gl/v3aHL9Follow AlongFollow Along

#boisecodecamp @geekgonenomad

Page 3: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

What are we going toWhat are we going tocover?cover?

#boisecodecamp @geekgonenomad

Page 4: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

WebRTCWebRTCRespokeRespokeCode SamplesCode Samples</QA></QA>

#boisecodecamp @geekgonenomad

Page 5: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Who Is This Guy?Who Is This Guy?

#boisecodecamp @geekgonenomad

Page 6: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Kyle TyackeKyle TyackeFlash / Web DevFlash / Web DevDeveloper Evangelist RespokeDeveloper Evangelist RespokeBeer GeekBeer Geek

#boisecodecamp @geekgonenomad

Page 7: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Who Are You?Who Are You?

#boisecodecamp @geekgonenomad

Page 8: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

What the Heck IsWhat the Heck IsWebRTC?WebRTC?

#boisecodecamp @geekgonenomad

Page 9: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

WebRTCWebRTC“is a free, open project that“is a free, open project thatenables web browsers withenables web browsers withReal-Time CommunicationsReal-Time Communications(RTC) capabilities via simple(RTC) capabilities via simpleJavaScript APIs.”JavaScript APIs.”

#boisecodecamp @geekgonenomad

Page 10: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

WebRTCWebRTC“is a “is a freefree, open project that, open project thatenables web browsers withenables web browsers withReal-Time CommunicationsReal-Time Communications(RTC) capabilities via simple(RTC) capabilities via simpleJavaScript APIs.”JavaScript APIs.”

#boisecodecamp @geekgonenomad

Page 11: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

WebRTCWebRTC“is a free, “is a free, openopen project that project thatenables web browsers withenables web browsers withReal-Time CommunicationsReal-Time Communications(RTC) capabilities via simple(RTC) capabilities via simpleJavaScript APIs.”JavaScript APIs.”

#boisecodecamp @geekgonenomad

Page 12: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

WebRTCWebRTC“is a free, open project that“is a free, open project thatenables web browsers withenables web browsers withReal-Time CommunicationsReal-Time Communications(RTC) capabilities via simple(RTC) capabilities via simpleJavaScript APIs.”JavaScript APIs.”

#boisecodecamp @geekgonenomad

Page 13: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

WebRTCWebRTC“is a free, open project that“is a free, open project thatenables web browsers withenables web browsers withReal-Time CommunicationsReal-Time Communications(RTC) capabilities via simple(RTC) capabilities via simpleJavaScript APIsJavaScript APIs.”.”

#boisecodecamp @geekgonenomad

Page 14: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

ContributorsContributors

#boisecodecamp @geekgonenomad

Page 15: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

WebRTC in the WildWebRTC in the Wild

#boisecodecamp @geekgonenomad

Page 16: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Amazon MaydayAmazon Mayday

#boisecodecamp @geekgonenomad

Page 17: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

GoogleHangoutsGoogleHangoutshttps://plus.google.com/hangoutshttps://plus.google.com/hangouts

#boisecodecamp @geekgonenomad

Page 18: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

PeerCDNPeerCDNhttps://peercdn.com/https://peercdn.com/

#boisecodecamp @geekgonenomad

Page 19: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

SharefestSharefesthttps://sharefest.mehttps://sharefest.me

#boisecodecamp @geekgonenomad

Page 20: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

CubeslamCubeslamhttps://www.cubeslam.comhttps://www.cubeslam.com

#boisecodecamp @geekgonenomad

Page 21: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

ApolloApollohttps://github.com/respoke/apollohttps://github.com/respoke/apollo

#boisecodecamp @geekgonenomad

Page 22: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

How Does WebRTC Work?How Does WebRTC Work?

#boisecodecamp @geekgonenomad

Page 23: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

When Bob Met AliceWhen Bob Met Alice

#boisecodecamp @geekgonenomad

Page 24: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

An Ideal World!An Ideal World!

#boisecodecamp @geekgonenomad

Page 25: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

The Real World...The Real World...

#boisecodecamp @geekgonenomad

Page 26: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

ICE, ICE, BabyICE, ICE, Baby

#boisecodecamp @geekgonenomad

Page 27: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

The Complete ConnectionThe Complete Connection

#boisecodecamp @geekgonenomad

Page 28: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Simple Right?Simple Right?

#boisecodecamp @geekgonenomad

Page 29: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

#boisecodecamp @geekgonenomad

Page 30: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Respoke?Respoke?A set of API's that givesA set of API's that gives

developers the ability to easilydevelopers the ability to easilyadd real-time communicationadd real-time communication

to their applications.to their applications.

#boisecodecamp @geekgonenomad

Page 31: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Like WebRTC?Like WebRTC?

#boisecodecamp @geekgonenomad

Page 32: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Sort of...Sort of...

#boisecodecamp @geekgonenomad

Page 33: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Remember This?Remember This?

#boisecodecamp @geekgonenomad

Page 34: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

#boisecodecamp @geekgonenomad

Page 35: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

#boisecodecamp @geekgonenomad

Page 36: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

But Wait! There's More...But Wait! There's More...

#boisecodecamp @geekgonenomad

Page 37: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Open SourceOpen SourceCross-browser SupportCross-browser SupportEndpoint DiscoveryEndpoint DiscoveryEndpoint MessagingEndpoint MessagingGroupsGroupsPresencePresencePhone System SupportPhone System SupportMobile SDKsMobile SDKs#boisecodecamp @geekgonenomad

Page 38: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

<CODE/><CODE/>

Page 39: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Create a RespokeCreate a RespokeAccountAccount

www.respoke.iowww.respoke.io

Page 40: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Connecting toConnecting toRespokeRespoke

http://goo.gl/fajmx8http://goo.gl/fajmx8

#boisecodecamp @geekgonenomad

Page 41: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

// App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d"; var endpointId;

// Create the client object using the App ID var client = respoke.createClient({ appId: appid, developmentMode: true });

// "connect" event fired after successful connection to Respoke client.listen('connect', function() { $("#status").html("Connected to Respoke as \"" + endpointId + "\""); });

// Connect to Respoke when the user clicks "connect" $("#doLogin").click(function() { // Update the status message $("#status").html("Connecting...");

// Grab our username endpointId = $("#endpoint").val();

// Connect to Respoke client.connect({ endpointId: endpointId }); });

Page 42: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

MessagingMessaginghttp://goo.gl/vq8XCyhttp://goo.gl/vq8XCy

#boisecodecamp @geekgonenomad

Page 43: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

// Listen for incoming messagesclient.listen('message', function(evt) { $("#messages").append( "<li>" + evt.message.message + "</li>" );});

// Send message$("#sendMessage").click(function() { // Get the recipients name var remote = $("#remoteId").val();

// Make an endpoint for that recipient var endpoint = client.getEndpoint({ id: remote });

// Grab the text to send var messageText = $("#textToSend").val();

// Send it endpoint.sendMessage({ message: messageText });

// Show yourself the message $("#messages").append( "<li>" + messageText + "</li>" );

// Clear the text you just sent $("#textToSend").val('');});

Page 44: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Group MessagingGroup Messaginghttp://goo.gl/DNxVuchttp://goo.gl/DNxVuc

#boisecodecamp @geekgonenomad

Page 45: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

<!DOCTYPE html>

<head> <title>Respoke - Group Messaging Example</title> <!-- Respoke client library --> <script src="https://cdn.respoke.io/respoke.min.js"></script>

<!-- jQuery, for this example --> <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>

<!-- Some simple styles to make things perty --> <link rel="stylesheet" type="text/css" href="style.css"> </style></head>

<body> <h3 id="status">Not Connected to Respoke</h3> <h3 id="groupStatus">Not Connected to Group</h3> <div id="login"> <input id="endpoint" placeholder="Username" type="text" /> <button id="doLogin">Connect</button> </div>

<div id="messaging"> <ul id="messages"></ul> <br /> <textarea id="groupMsg" placeholder="Message to Send" rows="4"></textarea> <br/> <button id='sendMessage'>Message Group</button> <button id='leaveGroup'>Leave Group</button> </div>

<script type="text/javascript"> // App ID value from the dev portal. You can play

Page 46: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Video CallingVideo Callinghttp://goo.gl/m4tZwXhttp://goo.gl/m4tZwX

#boisecodecamp @geekgonenomad

Page 47: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

// The options for our video call including constraints and callbacksvar callOptions = { constraints: { audio: true, video: true },

// Your video onLocalMedia: function(evt) { setVideo('localVideoSource', evt.element) },

// Their video onConnect: function(evt) { setVideo('remoteVideoSource', evt.element) }};

// Listen for incoming callsclient.listen('call', function(evt) { activeCall = evt.call;

// We only want to answer if we didn't initiate the call if (activeCall.caller !== true) { activeCall.answer(callOptions);

// The hangup event indicates the call is over activeCall.listen('hangup', function() { hangUp(); }); }});

// Call the recipient$("#doCall").click(function() { var recipientId = $("#remoteId").val();

Page 48: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Screen SharingScreen Sharinghttp://goo.gl/2pOJ3Ahttp://goo.gl/2pOJ3A

#boisecodecamp @geekgonenomad

Page 49: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

<!DOCTYPE html>

<head> <title>Respoke - Screensharing Example</title> <!-- Respoke client library --> <!-- <script src="https://cdn.respoke.io/respoke.min.js"></script> --> <script src="https://cdn.respoke.io/respoke.min.js"></script>

<!-- jQuery, note that we are loading over HTTPS from google's CDN --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

<!-- Some simple styles to make things perty --> <link rel="stylesheet" type="text/css" href="style.css">

<!-- Chrome screensharing extension --> <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/lefkijobnhaffcfhfgpkpkpfgcdcfjbc"></head>

<body> <h3 id="status">Not Connected</h3> <h4 id="sharing"></h3> <div id="login"> <input id="endpoint" placeholder="Username" type="text" /> <button id="doLogin">Connect</button> </div> <div> <input id="remoteId" placeholder="User to Call" type="text" /> <button id="doStartScreenShare">Share Screen</button> <button id="doStopScreenShare">Stop Sharing</button> </div>

<!-- Video object to attach the stream to --> <video id="localVideoElement"></video>

Page 50: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Docs and AdditionalDocs and AdditionalExamplesExamples

https://docs.respoke.io/https://docs.respoke.io/

#boisecodecamp @geekgonenomad

Page 51: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

What's It All Mean?What's It All Mean?

#boisecodecamp @geekgonenomad

Page 52: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

FasterFasterDevelopmentDevelopment

#boisecodecamp @geekgonenomad

Page 53: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Better UserBetter UserExperienceExperience

#boisecodecamp @geekgonenomad

Page 54: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Happy BossesHappy Bosses

#boisecodecamp @geekgonenomad

Page 55: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

Happy Happy BossesBosses Users! Users!

#boisecodecamp @geekgonenomad

Page 56: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

CommunicationCommunicationshould be a should be a featurefeature,,

not a not a productproduct......

Page 57: COMMUNICATE ALL THE THINGS!!! · // App ID value from the dev portal. You can play // around with the supplied ID or replace it with // your own. var appid = "b4931d40-ff2b-4c46-8487-bf955a75501d";

[email protected]@respoke.io

Kyle TyackeKyle Tyacke

http://ktyacke.github.io/respoke-webrtc-preso/http://ktyacke.github.io/respoke-webrtc-preso/Examples and SourceExamples and Source

www.respoke.iowww.respoke.io@geekgonenomad@geekgonenomad