$30 off During Our Annual Pro Sale. View Details »

WebRTC

David
September 25, 2022

 WebRTC

David

September 25, 2022
Tweet

More Decks by David

Other Decks in Programming

Transcript

  1. WEBRTC REAL TIME COMMUNICATION EN EL NAVEGADOR.

  2. David Vílchez @dvilchez BIENVENIDOS Agile galicia

  3. WEBRTC QUÉ ES?

  4. WEBRTC

  5. WEBRTC GETUSERMEDIA (MEDIASTREAM) var constraints = {audio: true, video: true};

    navigator.getUserMedia(constraints, function(stream) { video.src = window.URL.createObjectURL(stream); }, errorCallback);
  6. WEBRTC PEERCONNECTION alice = new RTCPeerConnection(null, null) alice.add(stream) alice.createOffer().then(offer =>

    { return alice.setLocalDescription(offer) .then( () => { sendOffer(“bob”, offer); }); }).catch(errorHandler);
  7. WEBRTC PEERCONNECTION bob = new RTCPeerConnection(null, null) bob.setRemoteDescriptor(offer) .then(() =>

    { bob.createAnswer().then((answer) => { return bob.setLocalDescription(answer) .then(() => { sendAnswer(“alice”, answer); }); }).catch(errorHandler);
  8. WEBRTC SENDOFFER(….. ) SENDANSWER(….. )

  9. WEBRTC SIGNALING

  10. WEBRTC P2P CON SERVIDORES

  11. WEBRTC P2P CON SERVIDORES

  12. None
  13. WEBRTC NO USAR ▸ Video and audio streaming ▸ Comunicación

    asincrona
  14. None
  15. GRACIAS