{"id":17994,"date":"2017-08-24T16:15:03","date_gmt":"2017-08-24T13:15:03","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=17994"},"modified":"2017-08-24T12:02:22","modified_gmt":"2017-08-24T09:02:22","slug":"webrtc-tutorial-beginners","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/","title":{"rendered":"WebRTC Tutorial for Beginners"},"content":{"rendered":"<p>In this tutorial we would explore the WebRTC Framework part of the HTML5 specification. RTC stands for Real-Time Communication since it enables peer to peer communication without any plugins or any other installs. WebRTC also removes the need for an intermediary server for two browsers to communicate and exchange data, audio or video among them.<\/p>\n<p>The APIs are still a work in progress and work remains to be done on them. There might be changes to the APIs as development moves on. The World Wide Web consortium(W3C) and the Internet Engineering Task Force are working to standardize WebRTC. Although it will be rewarding to get on board early on to reap benefits as it matures and becomes a standard. Most current browsers have support for WebRTC albeit through prefixes attached to API calls.<\/p>\n<p>In this article, we will build an application to explore the capabilities of WebRTC and learn more about it.<\/p>\n<h2>1. What is WebRTC and How it works<\/h2>\n<p>WebRTC is a framework that enables peer to peer connections and allows exchange of audio, video and data between the connected peers. WebRTC was thought up to remove the need for a server that acts as the intermediary in any conversation between clients. With WebRTC the role of the server is relegated to just helping two peers to discover each other and setup a direct connection.<\/p>\n<p>Before we start building applications and exploring WebRTC APIs I would like to explain how it works. The players in this scene are the two browser instances wanting to connect. A signalling server that serves the purpose of helping the browsers establish a connection. The WebRTC consists of the following APIs:<\/p>\n<ol>\n<li> getUserMedia <\/li>\n<li> RTCPeerConnection <\/li>\n<li> RTCDataChannel <\/li>\n<\/ol>\n<p>The <code>getUserMedia<\/code> API call in JavaScript allows access to the local webcam and audio devices. Once we have access to the audio and video feed we can display the same on our page. We can use <code>RTCPeerConnection<\/code> APIs to establish a connection with a remote peer and share the local feed to implement a video call. To establish a connection we do need a server but once a connection is established there is no need for a server anymore as we exchange data directly. Although the way things stand right now, we do need <code>STUN, TURN<\/code> servers to penetrate through firewalls and Netstats.<br \/>\nThis is not all we can use the <code>RTCDataChannel<\/code> API to send and receive arbitrary data to\/from a remote peer using a connection established with <code>RTCPeerConnection<\/code> API. The capabilities of these APIs opens up a world of possibilities and applications that can be created.<\/p>\n<h2>2. Tools &amp; Technologies<\/h2>\n<p>The tools we are going to use to build our application are:<\/p>\n<ol>\n<li> <a href=\"https:\/\/nodejs.org\/en\/download\/\" target=\"_blank\" rel=\"noopener\">Node.js v6.3.0<\/a> <\/li>\n<li> <a href=\"https:\/\/www.npmjs.com\/package\/express\" target=\"_blank\" rel=\"noopener\">Express Module<\/a> <\/li>\n<li> <a href=\"https:\/\/socket.io\/\" target=\"_blank\" rel=\"noopener\">Socket.io Module<\/a> <\/li>\n<li> <a href=\"https:\/\/code.visualstudio.com\/download\" target=\"_blank\" rel=\"noopener\">Visual Studio Code IDE<\/a> <\/li>\n<\/ol>\n<p>Node.js is all about JavaScript running on the server. We will use Node.js and Express Module to quickly spin up a web server for our application. Visual Studio Code IDE is one of many IDE available for Node development, you can choose any other preferred one.<\/p>\n<h2>3. Project Structure<\/h2>\n<p>The screenshot below shows the layout of the project we are building. Below the screenshot is a brief description of each artifact.<\/p>\n<figure id=\"attachment_18367\" aria-describedby=\"caption-attachment-18367\" style=\"width: 422px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/WEBRTCProjectLayout.jpg\"><img decoding=\"async\" class=\"size-full wp-image-18367\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/WEBRTCProjectLayout.jpg\" alt=\"\" width=\"422\" height=\"289\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/WEBRTCProjectLayout.jpg 422w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/WEBRTCProjectLayout-300x205.jpg 300w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/a><figcaption id=\"caption-attachment-18367\" class=\"wp-caption-text\">Project Layout<\/figcaption><\/figure>\n<p><strong><em>js<\/em><\/strong><br \/>\nWe place our JavaScript code files here.<br \/>\n<strong><em>index.html<\/em><\/strong><br \/>\nThis file is demo page for <code>getUserMedia<\/code>.<br \/>\n<strong><em>RTCDemo1.html<\/em><\/strong><br \/>\nThis file contains the markup for one of our video chat clients.<br \/>\n<strong><em>RTCDemo2.html<\/em><\/strong><br \/>\nThis is the other client in our video chat sample.<br \/>\n<strong><em>webrtc.server.js<\/em><\/strong><br \/>\nThis is our Socket.io based signalling server.<br \/>\n<strong><em>index.js<\/em><\/strong><br \/>\nThis is our basic web server created using express module.<br \/>\n<strong><em>RTCChannelDemo1.html<\/em><\/strong><br \/>\nThis page acts as one of the peers in our <code>RTCDataChannel<\/code> demo.<br \/>\n<strong><em>RTCChannelDemo2.html<\/em><\/strong><br \/>\nThis page also acts as one of the peers in our <code>RTCDataChannel<\/code> demo.<\/p>\n<h2>4. Capturing Audio &amp; Video<\/h2>\n<p>Let us begin by trying to write code to access the local webcam feed from a webpage. Edit the <code>index.html<\/code> file to add the following HTML Markup:<\/p>\n<pre class=\"brush: html;\">&lt;video autoplay&gt;&lt;\/video&gt;\r\n&lt;button type=\"button\" id=\"btnShowCamera\" &gt;Show Webcam&lt;\/button&gt;\r\n<\/pre>\n<p>Here we have added a <code>video<\/code> element to display the stream from webcam. Notice the attribute <code>autoplay<\/code>. This is critical as otherwise you would only see a static capture from the webcam, if at all. Let us add an event handler for the <code>button<\/code> element placed on the page. Add the following JavaScript to the <code>webrtc.demo.js<\/code> file. Do not forget to refer to it in the index.html page as well using a script tag.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>webrtc.demo.js<\/em><\/span><\/p>\n<pre class=\"brush: js;\">function GetUserMedia(){\r\n    navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia\r\n                    || navigator.mozGetUserMedia || navigator.msGetUserMedia;\r\n    return navigator.getUserMedia;\r\n}\r\n\r\nfunction showWebcam(){\r\n    var userMedia = GetUserMedia();\r\n    if(userMedia){        \r\n        navigator.getUserMedia({video: true, audio: true}, function(stream){\r\n    \r\n            document.getElementsByTagName(\"video\")[0].src = window.URL.createObjectURL(stream);\r\n    \r\n        }, function(error){\r\n            console.log(\"There was an error in GetUserMedia!!!\");\r\n        });\r\n    }\r\n}\r\ndocument.getElementById(\"btnShowCamera\").addEventListener(\"click\", function(event){\r\n    showWebcam();\r\n});\r\n<\/pre>\n<p>The <code>GetUserMedia<\/code> function in the code above tries to shield our code from the cross browser differences in implementations. Like I noted before, WebRTC is still in progress but as things get standardized you can expect the vendor prefixed versions to go away. When we call the <code>getUserMedia<\/code> function we pass a constraint object indicating the streams we want to request, viz., Audio, Video. The next argument is a callback to handle the returned stream object with the third argument acting as an error handler.<\/p>\n<p>Run the code now using the commands below and navigate to <code>http:\/\/localhost:8090\/<\/code>. Click on the Show Webcam button and reply yes or grant permission to allow access to webcam in the prompt that comes up. You should be able to see the video feed from the webcam on the page.<\/p>\n<figure id=\"attachment_18380\" aria-describedby=\"caption-attachment-18380\" style=\"width: 825px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/UserMediaDemo.jpg\"><img decoding=\"async\" class=\"size-full wp-image-18380\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/UserMediaDemo.jpg\" alt=\"\" width=\"825\" height=\"393\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/UserMediaDemo.jpg 825w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/UserMediaDemo-300x143.jpg 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/UserMediaDemo-768x366.jpg 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/a><figcaption id=\"caption-attachment-18380\" class=\"wp-caption-text\">getUserMedia Demo<\/figcaption><\/figure>\n<h2>5. Setting up Peer to Peer Connection<\/h2>\n<p>To begin with connecting two separate clients, we start with creating a small signalling server of our own using <code>socket.io<\/code> Module. This will allow us to act as an intermediary to introduce the two clients we will create shortly. The code to handle the forwarding of signals on the server looks like below:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>index.js<\/em><\/span><\/p>\n<pre class=\"brush: js;\">const express = require(\"express\");\r\nconst app = express();\r\nconst hostname = \"127.0.0.1\";\r\nconst port = 8090;\r\n\r\nvar http = require('http').Server(app);\r\nvar io = require(\"socket.io\")(http);\r\napp.use(express.static('.'));\r\n\r\nio.on('connection', function(client){\r\n    console.log(\"Connection established!\");\r\n    client.on(\"candidate\", function(msg){\r\n        console.log(\"candidate message recieved!\");\r\n        client.broadcast.emit(\"candidate\", msg);\r\n    });\r\n    client.on(\"sdp\", function(msg){\r\n        console.log(\"sdp message broadcasted!\");\r\n        client.broadcast.emit(\"sdp\", msg);\r\n    });\r\n    client.on(\"desc\", function(desc){\r\n        console.log(\"description received!\");\r\n        client.broadcast.emit(\"desc\", desc);\r\n    });\r\n    client.on(\"answer\", function(answer){\r\n        console.log(\"answer broadcasted\");\r\n        client.broadcast.emit(\"answer\", answer);\r\n    });\r\n});\r\n\r\nhttp.listen(port, hostname);\r\n<\/pre>\n<p>All we are doing is attaching the socket module to our web server so that it could listen to incoming connection requests and take action. Once a connection is established we can pass messages to any of the connected peers. The peers can also communicate through the same semantics with the server.<\/p>\n<p>We are leveraging this to facilitate the initial handshake between the two peers we will create. Once the peers are connected they no longer need to use this signalling server and can talk directly to each other exchanging data.<\/p>\n<p>Let us create two peers which will connect and exchange video feed with each other. Each peer resides in a separate Html file and has the below markup.<\/p>\n<pre class=\"brush: html;\">&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"eng\"&gt;\r\n    &lt;head&gt;\r\n        &lt;title&gt;WCG -- WebRTC Tutorial For Beginners&lt;\/title&gt;\r\n    &lt;\/head&gt;\r\n&lt;body&gt;\r\n    &lt;video id=\"remoteview\" autoplay&gt;&lt;\/video&gt;\r\n    &lt;video id=\"selfview\" autoplay&gt;&lt;\/video&gt;\r\n    &lt;button type=\"button\" id=\"makeCall\"&gt;Make Call&lt;\/button&gt;\r\n   \r\n    &lt;script src=\"\/socket.io\/socket.io.js\"&gt;&lt;\/script&gt;\r\n    &lt;script&gt;\r\n        var socket = io();\r\n    &lt;\/script&gt;\r\n    &lt;script src=\"\/js\/webrtc.server.js\"&gt;&lt;\/script&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>The above markup creates a couple of video elements with ids <code>remoteview &amp; selfview<\/code>. There is also a button that says &#8220;Make Call&#8221; and initiates the video call. We also call in the client library of <code>Socket.io<\/code> which enables us to signal via the server to the other peer to establish a connection. We instantiate the socket and connect to the signalling server in the next script block. Finally we call our own <code>webrtc.server.js<\/code> JS file which has the following JavaScript code.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>webrtc.server.js<\/em><\/span><\/p>\n<pre class=\"brush: js;\">\/\/To iron over browser implementation inconsistencies like prefixed naming conventions\r\nGetUserMedia();\r\nGetRTCPeerConnection();\r\nGetRTCSessionDescription();\r\nGetRTCIceCandidate();\r\n\r\n\/\/Initializing a peer connection\r\nvar caller = new window.RTCPeerConnection();\r\n\r\n\/\/Listen for ICE Candidates and send them to remote peers\r\ncaller.onicecandidate = function(evt){\r\n    if(!evt.candidate) return;\r\n    console.log(\"onicecandidate called\");\r\n    onIceCandidate(caller, evt);    \r\n};\r\n\r\n\/\/onaddstream handler to receive remote feed and show in remoteview video element\r\ncaller.onaddstream = function(evt){\r\n    console.log(\"onaddstream called\");\r\n    if(window.URL){\r\n        document.getElementById(\"remoteview\").src = window.URL.createObjectURL(evt.stream);\r\n    } else {\r\n        document.getElementById(\"remoteview\").src = evt.stream;\r\n    }\r\n};    \r\n\/\/Get local audio\/video feed and show it in selfview video element \r\nnavigator.getUserMedia({video: true, audio: true}, function(stream){\r\n    if(window.URL){\r\n        document.getElementById(\"selfview\").src = window.URL.createObjectURL(stream);\r\n    } else {\r\n        document.getElementById(\"selfview\").src = stream;\r\n    }\r\n    caller.addStream(stream);    \r\n\r\n}, function(evt){\r\n    console.log(\"Error occurred!\");\r\n});\r\nfunction GetRTCIceCandidate(){\r\n    window.RTCIceCandidate = window.RTCIceCandidate || window.webkitRTCIceCandidate\r\n                || window.mozRTCIceCandidate || window.msRTCIceCandidate;\r\n\r\n    return window.RTCIceCandidate;\r\n}\r\nfunction GetUserMedia(){\r\n    navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia\r\n                    || navigator.mozGetUserMedia || navigator.msGetUserMedia;\r\n    return navigator.getUserMedia;\r\n}\r\nfunction GetRTCPeerConnection(){\r\n    window.RTCPeerConnection = window.RTCPeerConnection || window.webkitRTCPeerConnection\r\n                        || window.mozRTCPeerConnection || window.msRTCPeerConnection;\r\n    return window.RTCPeerConnection;\r\n}\r\nfunction GetRTCSessionDescription(){\r\n    window.RTCSessionDescription = window.RTCSessionDescription || window.webkitRTCSessionDescription\r\n                    ||  window.mozRTCSessionDescription || window.msRTCSessionDescription;\r\n    return window.RTCSessionDescription;\r\n}\r\n\r\n\/\/Create and send offer to remote peer on button click\r\ndocument.getElementById(\"makeCall\").addEventListener(\"click\", function(){   \r\n    caller.createOffer().then(function(desc){\r\n        caller.setLocalDescription(new RTCSessionDescription(desc));\r\n        socket.emit(\"sdp\", JSON.stringify({\"sdp\": desc}));\r\n    });\r\n});\r\n\r\n\/\/Send the ICE Candidate to the remote peer\r\nfunction onIceCandidate(peer, evt){\r\n    if(evt.candidate){        \r\n        socket.emit(\"candidate\", JSON.stringify({\"candidate\": evt.candidate}));\r\n    }\r\n}\r\n\r\n\/\/Communications with the remote peer through signaling server\r\nsocket.on(\"connect\", function(client){\r\n    \/\/Connection established with the signaling server\r\n    console.log(\"connected!\");\r\n\r\n    \/\/Listening for the candidate message from a peer sent from onicecandidate handler\r\n    socket.on(\"candidate\", function(msg){\r\n        console.log(\"candidate received\");\r\n        caller.addIceCandidate(new RTCIceCandidate(JSON.parse(msg).candidate));\r\n        \r\n    });\r\n\r\n    \/\/Listening for Session Description Protocol message with session details from remote peer\r\n    socket.on(\"sdp\", function(msg){\r\n        console.log(\"sdp received\");\r\n        var sessionDesc = new RTCSessionDescription(JSON.parse(msg).sdp);\r\n        caller.setRemoteDescription(sessionDesc);\r\n        caller.createAnswer().then(function(sdp){\r\n            caller.setLocalDescription(new RTCSessionDescription(sdp));\r\n            socket.emit(\"answer\", JSON.stringify({\"sdp\": sdp}));\r\n        });         \r\n    });\r\n\r\n    \/\/Listening for answer to offer sent to remote peer\r\n    socket.on(\"answer\", function(answer){\r\n        console.log(\"answer received\");\r\n        caller.setRemoteDescription(new RTCSessionDescription(JSON.parse(answer).sdp));\r\n    });\r\n});\r\n<\/pre>\n<p>The functions with names starting with <code>Get*<\/code> are needed to protect our code due to cross browser compatibility issues. Like I said before that WebRTC is still being standardized and browser vendors have prefixed their implementations with prefixes. Apart from this we instantiate an <code>RTCPeerConnection<\/code> on load and register a handler for <code>ice candidates<\/code> and <code>stream<\/code>. ICE Candidates are the peers available in the network. Streams are added to the <code>RTCPeerConnection<\/code> object for sharing with remote peers. The flow of the whole operation is as follows:<\/p>\n<ol>\n<li> Register with the signalling server. <\/li>\n<li> Create a <code>RTCPeerConnection<\/code> and register <code>onicecandidate<\/code> and <code>onaddstream<\/code> event handlers. <\/li>\n<li> Get the local video and audio streams with <code>getUserMedia<\/code> API call and add to the <code>RTCPeerConnection<\/code> object.<\/li>\n<li> Either create and offer and send it out to the other peer to begin a call or create an answer on the receipt of an offer from another peer.<\/li>\n<li> Should start to see the live video\/audio feed both local and remote on both ends.<\/li>\n<\/ol>\n<figure id=\"attachment_18382\" aria-describedby=\"caption-attachment-18382\" style=\"width: 840px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCPeerConnectionDemo.jpg\"><img decoding=\"async\" class=\"size-full wp-image-18382\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCPeerConnectionDemo.jpg\" alt=\"\" width=\"840\" height=\"422\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCPeerConnectionDemo.jpg 840w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCPeerConnectionDemo-300x151.jpg 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCPeerConnectionDemo-768x386.jpg 768w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/a><figcaption id=\"caption-attachment-18382\" class=\"wp-caption-text\">RTCPeerConnection Demo<\/figcaption><\/figure>\n<h2>6. Exchanging Data<\/h2>\n<p>Now that we have seen the <code>RTCPeerConnection<\/code> and <code>getUserMedia<\/code> APIs in action let us look at <code>RTCDataChannel<\/code> API. Although is less glamorous than the other two in terms of output, it can lay its own claim to fame by providing arbitrary data exchange channel among peers. This gives us a lot of abilities to write multi player online games with a <code>RTCDataChannel<\/code> providing superior performance since the players are connected directly to each other.<\/p>\n<p>To demonstrate the API, let us write an example of its use to send and receive text messages back and forth between two peers. We create two Html pages to host each peer, namely <code>RTCChannelDemo1.html<\/code> and <code>RTCChannelDemo2.html<\/code>. The markup of both these pages should be as follows:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>RTCChannelDemo1.html, RTCChannelDemo2.html<\/em><\/span><\/p>\n<pre class=\"brush: html;\">&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n    &lt;title&gt;WCG -- WebRTC Tutorial for Beginners&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n    &lt;textarea id=\"remoteUser\" rows=\"10\" disabled &gt;&lt;\/textarea&gt;\r\n    &lt;textarea id=\"self\" rows=\"10\"&gt;&lt;\/textarea&gt;\r\n    &lt;button id=\"makeCall\" type=\"button\" &gt;Connect&lt;\/button&gt;\r\n    &lt;script src=\"\/socket.io\/socket.io.js\"&gt;&lt;\/script&gt;\r\n    &lt;script&gt;\r\n        var socket = io();\r\n    &lt;\/script&gt;\r\n    &lt;script src=\"\/js\/webrtc.datachannel.js\"&gt;&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>In these pages we have a couple of <code>textarea<\/code> elements. The first one shows the text received from the remote peer and we type text to send in the second one. There is also a <code>button<\/code> element to start connecting with remote peer. The script tags include the <code>Socket.io.js<\/code> file, instantiating the socket and our JavaScript file <code>webrtc.datachannel.js<\/code>. All the code to establish a connection and exchange data resides in our JavaScript file which looks like below:<\/p>\n<pre class=\"brush: js;\">\/\/To iron over browser implementation anomalies like prefixes\r\nGetUserMedia();\r\nGetRTCPeerConnection();\r\nGetRTCSessionDescription();\r\nGetRTCIceCandidate();\r\n\r\n\/\/Initializing a peer connection\r\nvar caller = new window.RTCPeerConnection();\r\nvar remoteCaller = new window.RTCPeerConnection();\r\nvar dataChannel = caller.createDataChannel('myChannel');\r\nvar remoteDataChannel;\r\nvar remoteUserMessage = document.getElementById(\"remoteUser\");\r\nvar sendMessage = document.getElementById(\"self\");\r\n\r\n\/\/Handler for receiving remote channel\r\ncaller.ondatachannel = function(channel){\r\n    remoteDataChannel = channel.channel;\r\n};\r\ndataChannel.onopen = function(){\r\n    console.log(\"Channel Opened\");\r\n};\r\n\r\ndataChannel.onclose = function(){\r\n    console.log(\"Channel Closed\");\r\n};\r\n\r\ndataChannel.onmessage = function(event){\r\n    remoteUserMessage.value = event.data;\r\n};\r\n\r\ndataChannel.onerror = function(){\r\n\r\n};\r\n\/\/Listen for ICE Candidates and send them to remote peers\r\ncaller.onicecandidate = function(evt){\r\n    if(!evt.candidate) return;\r\n    console.log(\"onicecandidate called\");\r\n    onIceCandidate(caller, evt);    \r\n};\r\n\r\n\/\/onaddstream handler to receive remote feed and show in remoteview video element\r\ncaller.onaddstream = function(evt){\r\n    console.log(\"onaddstream called\");\r\n    \r\n};    \r\n\r\nfunction GetRTCIceCandidate(){\r\n    window.RTCIceCandidate = window.RTCIceCandidate || window.webkitRTCIceCandidate\r\n                || window.mozRTCIceCandidate || window.msRTCIceCandidate;\r\n\r\n    return window.RTCIceCandidate;\r\n}\r\nfunction GetUserMedia(){\r\n    navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia\r\n                    || navigator.mozGetUserMedia || navigator.msGetUserMedia;\r\n    return navigator.getUserMedia;\r\n}\r\nfunction GetRTCPeerConnection(){\r\n    window.RTCPeerConnection = window.RTCPeerConnection || window.webkitRTCPeerConnection\r\n                        || window.mozRTCPeerConnection || window.msRTCPeerConnection;\r\n    return window.RTCPeerConnection;\r\n}\r\nfunction GetRTCSessionDescription(){\r\n    window.RTCSessionDescription = window.RTCSessionDescription || window.webkitRTCSessionDescription\r\n                    ||  window.mozRTCSessionDescription || window.msRTCSessionDescription;\r\n    return window.RTCSessionDescription;\r\n}\r\n\r\n\/\/Create and send offer to remote peer on button click\r\ndocument.getElementById(\"makeCall\").addEventListener(\"click\", function(){   \r\n    caller.createOffer().then(function(desc){\r\n        caller.setLocalDescription(new RTCSessionDescription(desc));\r\n        socket.emit(\"sdp\", JSON.stringify({\"sdp\": desc}));\r\n    });\r\n});\r\n\r\nsendMessage.addEventListener(\"keyup\", function(evt){\r\n    \r\n    remoteDataChannel.send(sendMessage.value);\r\n});\r\n\/\/Send the ICE Candidate to the remote peer\r\nfunction onIceCandidate(peer, evt){\r\n    if(evt.candidate){        \r\n        socket.emit(\"candidate\", JSON.stringify({\"candidate\": evt.candidate}));\r\n    }\r\n}\r\n\r\n\/\/Communications with the remote peer through signaling server\r\nsocket.on(\"connect\", function(client){\r\n    \/\/Connection established with the signaling server\r\n    console.log(\"connected!\");\r\n\r\n    \/\/Listening for the candidate message from a peer sent from onicecandidate handler\r\n    socket.on(\"candidate\", function(msg){\r\n        console.log(\"candidate received\");\r\n        caller.addIceCandidate(new RTCIceCandidate(JSON.parse(msg).candidate));\r\n        \r\n    });\r\n\r\n    \/\/Listening for Session Description Protocol message with session details from remote peer\r\n    socket.on(\"sdp\", function(msg){\r\n        console.log(\"sdp received\");\r\n        var sessionDesc = new RTCSessionDescription(JSON.parse(msg).sdp);\r\n        caller.setRemoteDescription(sessionDesc);\r\n        caller.createAnswer().then(function(sdp){\r\n            caller.setLocalDescription(new RTCSessionDescription(sdp));\r\n            socket.emit(\"answer\", JSON.stringify({\"sdp\": sdp}));\r\n        });         \r\n    });\r\n\r\n    \/\/Listening for answer to offer sent to remote peer\r\n    socket.on(\"answer\", function(answer){\r\n        console.log(\"answer received\");\r\n        caller.setRemoteDescription(new RTCSessionDescription(JSON.parse(answer).sdp));\r\n    });\r\n});\r\n<\/pre>\n<p>This code like in the previous section establishes a <code>RTCPeerConnection<\/code> between peers. It then creates a data channel from the <code>RTCPeerConnection<\/code> object. It also waits for the remote channel to be passed into the <code>ondatachannel<\/code> handler. Furthermore, the code sends the text from the second <code>textarea<\/code> element through the remote channel in the <code>keyup<\/code> event handler.<\/p>\n<figure id=\"attachment_18384\" aria-describedby=\"caption-attachment-18384\" style=\"width: 488px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCDataChannelPeer1.jpg\"><img decoding=\"async\" class=\"size-full wp-image-18384\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCDataChannelPeer1.jpg\" alt=\"\" width=\"488\" height=\"251\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCDataChannelPeer1.jpg 488w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCDataChannelPeer1-300x154.jpg 300w\" sizes=\"(max-width: 488px) 100vw, 488px\" \/><\/a><figcaption id=\"caption-attachment-18384\" class=\"wp-caption-text\">RTCChannel Demo<\/figcaption><\/figure>\n<figure id=\"attachment_18385\" aria-describedby=\"caption-attachment-18385\" style=\"width: 437px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCDataChannelPeer2.jpg\"><img decoding=\"async\" class=\"size-full wp-image-18385\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCDataChannelPeer2.jpg\" alt=\"\" width=\"437\" height=\"264\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCDataChannelPeer2.jpg 437w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/RTCDataChannelPeer2-300x181.jpg 300w\" sizes=\"(max-width: 437px) 100vw, 437px\" \/><\/a><figcaption id=\"caption-attachment-18385\" class=\"wp-caption-text\">RTCChannel Demo<\/figcaption><\/figure>\n<h2>7. Code in Action<\/h2>\n<p>To see all of this in action we need to run the following commands at the root of the project:<\/p>\n<pre class=\"brush: bash;\">&gt; npm install\r\n<\/pre>\n<p>followed by<\/p>\n<pre class=\"brush: bash;\">&gt; node index.js\r\n<\/pre>\n<p>To look at the <code>getUserMedia<\/code> demo we navigate to the <code>http:\/\/localhost:8090<\/code> URL and click the <code>Show Webcam<\/code> button.<br \/>\nFor the <code>RTCPeerConnection<\/code> API demo we need to navigate to <code>http:\/\/localhost:8090\/RTCDemo1.html<\/code> in one tab and <code>http:\/\/localhost:8090\/RTCDemo2.html<\/code> in the other. We need to click the <code>Make Call<\/code> button.<br \/>\nAnd lastly, for the <code>RTCDataChannel<\/code> API demo we need to navigate to <code>http:\/\/localhost:8090\/RTCChannelDemo1.html<\/code> and <code>http:\/\/localhost:8090\/RTCChannelDemo2.html<\/code> in two separate tabs.<\/p>\n<h2>8. Download the Source Code<\/h2>\n<p>This was an example of the WebRTC APIs.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here : <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/WCG-WebRTC-Tutorial-For-Beginners.zip\" target=\"_blank\" rel=\"noopener\"><strong>WebRTC Tutorial for Beginners<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we would explore the WebRTC Framework part of the HTML5 specification. RTC stands for Real-Time Communication since it enables peer to peer communication without any plugins or any other installs. WebRTC also removes the need for an intermediary server for two browsers to communicate and exchange data, audio or video among them. &hellip;<\/p>\n","protected":false},"author":213,"featured_media":927,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[58,491],"class_list":["post-17994","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-development","tag-html5-2","tag-webrtc"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WebRTC Tutorial for Beginners - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"In this tutorial we would explore the WebRTC Framework part of the HTML5 specification. RTC stands for Real-Time Communication since it enables peer to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WebRTC Tutorial for Beginners - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"In this tutorial we would explore the WebRTC Framework part of the HTML5 specification. RTC stands for Real-Time Communication since it enables peer to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-24T13:15:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Siddharth Seth\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Siddharth Seth\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/\"},\"author\":{\"name\":\"Siddharth Seth\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/9c939eb4c915443c7e493c813d979592\"},\"headline\":\"WebRTC Tutorial for Beginners\",\"datePublished\":\"2017-08-24T13:15:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/\"},\"wordCount\":1660,\"commentCount\":8,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg\",\"keywords\":[\"html5\",\"webrtc\"],\"articleSection\":[\"Web Dev\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/\",\"name\":\"WebRTC Tutorial for Beginners - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg\",\"datePublished\":\"2017-08-24T13:15:03+00:00\",\"description\":\"In this tutorial we would explore the WebRTC Framework part of the HTML5 specification. RTC stands for Real-Time Communication since it enables peer to\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Dev\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/web-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"WebRTC Tutorial for Beginners\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/9c939eb4c915443c7e493c813d979592\",\"name\":\"Siddharth Seth\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/86a5133a5e9d79f7997e2649b1afe58e895c0d88df47b3359103ec4c1a2077d6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/86a5133a5e9d79f7997e2649b1afe58e895c0d88df47b3359103ec4c1a2077d6?s=96&d=mm&r=g\",\"caption\":\"Siddharth Seth\"},\"description\":\"Siddharth is a Software Development Professional with a Master degree in Computer Applications from IGNOU. He has over 14 years of experience. And currently focused on Software Architecture, Cloud Computing, JavaScript Frameworks for Client and Server, Business Intelligence.\",\"sameAs\":[\"https:\/\/www.webcodegeeks.com\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/siddharth-seth\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WebRTC Tutorial for Beginners - Web Code Geeks - 2026","description":"In this tutorial we would explore the WebRTC Framework part of the HTML5 specification. RTC stands for Real-Time Communication since it enables peer to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/","og_locale":"en_US","og_type":"article","og_title":"WebRTC Tutorial for Beginners - Web Code Geeks - 2026","og_description":"In this tutorial we would explore the WebRTC Framework part of the HTML5 specification. RTC stands for Real-Time Communication since it enables peer to","og_url":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2017-08-24T13:15:03+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg","type":"image\/jpeg"}],"author":"Siddharth Seth","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Siddharth Seth","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/"},"author":{"name":"Siddharth Seth","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/9c939eb4c915443c7e493c813d979592"},"headline":"WebRTC Tutorial for Beginners","datePublished":"2017-08-24T13:15:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/"},"wordCount":1660,"commentCount":8,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg","keywords":["html5","webrtc"],"articleSection":["Web Dev"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/","url":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/","name":"WebRTC Tutorial for Beginners - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg","datePublished":"2017-08-24T13:15:03+00:00","description":"In this tutorial we would explore the WebRTC Framework part of the HTML5 specification. RTC stands for Real-Time Communication since it enables peer to","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/web-development\/webrtc-tutorial-beginners\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Web Dev","item":"https:\/\/www.webcodegeeks.com\/category\/web-development\/"},{"@type":"ListItem","position":3,"name":"WebRTC Tutorial for Beginners"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/9c939eb4c915443c7e493c813d979592","name":"Siddharth Seth","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/86a5133a5e9d79f7997e2649b1afe58e895c0d88df47b3359103ec4c1a2077d6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/86a5133a5e9d79f7997e2649b1afe58e895c0d88df47b3359103ec4c1a2077d6?s=96&d=mm&r=g","caption":"Siddharth Seth"},"description":"Siddharth is a Software Development Professional with a Master degree in Computer Applications from IGNOU. He has over 14 years of experience. And currently focused on Software Architecture, Cloud Computing, JavaScript Frameworks for Client and Server, Business Intelligence.","sameAs":["https:\/\/www.webcodegeeks.com"],"url":"https:\/\/www.webcodegeeks.com\/author\/siddharth-seth\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/17994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/213"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=17994"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/17994\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/927"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=17994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=17994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=17994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}