3. Introduction
HTML5 RTC is also known as Web RTC and supports
browser-to-browser applications for voice calling, video
chat, and P2P file sharing.
RTC : Real Time Communication
It provides browsers and mobile applications with Real-Time
Communications (RTC) capabilities via simple APIs.
List of technologies that can be used for ral time communications : http://www.leggetter.co.uk/real-
time-web-technologies-guide/
5. HTML5 Overview
HTML5 is a new standard for structuring and presenting content on the World Wide
Web.
HTML5 standard incorporates features like video playback and drag-and-drop that
have been previously dependent on third-party browser plug-ins such as Adobe Flash,
Microsoft Silverlight, and Google Gears.
Browser Support
All the latest versions of Apple Safari, Google Chrome, Mozilla Firefox, and Opera all
support many HTML5 features and Microsoft Edge has support for some HTML5
functionality.
The mobile web browsers that come pre-installed on iPhones, iPads, and Android
phones all have excellent support for HTML5.
6. HTML5 Overview
New Features
New Semantic Elements − These are like <header>, <footer>, and <section>.
Forms 2.0 − Improvements to HTML web forms where new attributes have been introduced
for <input> tag.
Persistent Local Storage − To achieve without resorting to third-party plugins.
WebSocket − A next-generation bidirectional communication technology for web
applications.
Server-Sent Events − HTML5 introduces events which flow from web server to the web
browsers called Server-Sent Events (SSE).
7. HTML5 Overview
New Features
Canvas − This supports a two-dimensional drawing surface that you can program with
JavaScript.
Audio & Video − You can embed audio or video on your web pages without resorting to
third-party plugins.
Geolocation − Now visitors can choose to share their physical location with your web
application.
Microdata − This lets you create your own vocabularies beyond HTML5 and extend your web
pages with custom semantics.
Drag and drop − Drag and drop the items from one location to another location on a the
same webpage.
8. WHY HTML5 RTC ?
History
One of the last major challenges for the web was to enable easy and inexpensive human
communication via voice and video.
RTC has been corporate and complex, requiring expensive audio and video technologies to be
licensed or developed in house.
Integrating RTC technology with existing content, data and services has been difficult and
time consuming, particularly on the web.
Need
Many web services already use RTC, but need downloads, native apps or plugins. These includes
Skype,
Facebook (which uses Skype)
Google Hangouts (which use the Google Talk plugin).
Downloading, installing and updating plugins can be complex, error prone and annoying.
9. WHY HTML5 RTC ?
Benefits
It enables rich and high-quality RTC applications to be developed for the browser, mobile
platforms, and IoT devices, and allow them all to communicate via a common set of
protocols.
It provides low cost and high quality data, audio and video communication
Browsers
HTML5 RTC is currently supported by Google Chrome, Mozilla Firefox, and Opera, in both
their desktop and Android versions.
Microsoft’s Internet Explorer and Apple’s Safari have yet to add full support for HTML5 RTC.
10. HTML5 RTC Javascript APIs
RTC Tasks
HTML5 RTC applications need to do several things:
Retrieving audio and video streams online.
Enable communication between users in audio and video format.
Enable transfer of random data formats between users.
Get network information such as IP addresses and ports, and exchange this with other
WebRTC clients (known as peers) to enable connection, even through NATs and firewalls.
Coordinate signaling communication to report errors and initiate or close sessions.
Exchange information about media and client capability, such as resolution and codecs.
11. RTCPeerConnection
is the WebRTC component that handles stable and efficient communication of streaming
data between peers. This requires a mechanism to coordinate communication and to send
control messages, a process known as signaling.
HTML5 RTC Javascript APIs
RTCDataChannel
enables peer-to-peer exchange of random data, with low time lag and high processing
speed. Examples gaming, remote desktop apps and real time text chat
API
MediaStream (getUserMedia)
provides access to multimedia streams (video, audio, or both) from local devices without the
need to install additional software. Used for realtime communication and recording tutorials.
12. MediaStream (getUserMedia) API
This API allows web applications to access a user's camera and microphone.
The API is only capable of acquiring audio and video, not sending the data or storing it in a
file.
It exposes only one method, getUserMedia(), that belongs to the window.navigator object of
the DOM.
The getUserMedia() method takes 3 parameters
1. Contraints
2. Success callback which processes a MediaStream
3. Failure callback which processes an error object
RTC => all users can exchange information instantly or with hardly noticable time lag. In this context, the term "real-time" is synonymous with "live.“
Instant Messaging, Video calls, data transfer
RTC Technologies SignalR, Websockets, Server Sent Events
3 Core areas of HTML5 RTC
Previous Version => HTML 4.01
HTML5 is designed, as much as possible, to be backward compatible with existing web browsers. New features build on existing features and allow you to provide fallback content for older browsers.
Forms => Type attribute: date,datetime, number range,email
Output element tag, place holder attribute
Storage => session storage and local storage instead of session cookies.
Sockets => bidirectional communication technology for web applications which operates over a single socket and is exposed via a JavaScript interface in HTML 5 compliant browsers.
Using SSE you can push DOM events continously from your web server to the visitor's browser.
Canvas => to draw graphics using JavaScript. It can be used to draw graphs, make photo compositions or do simple (and not so simple) animations.
Audio Video => HTML5 features, include native audio and video support without the need for Flash.
Location => do fancy location-aware things like finding local businesses or showing your location on a map
Drag => makes it easy to copy, reorder and deletion of items with the help of mouse clicks
Need => Plugins can be difficult to deploy, debug, troubleshoot, test and maintain—and may require licensing and integration with complex, expensive technology. It's often difficult to persuade people to install plugins in the first place!
Note: that a platform 'supports WebRTC'. Often this actually just means that getUserMedia is supported, but not any of the other RTC components
Video surveillance of home or work.
A combination of The RTCPeerConection and getUserMedia can enable an implementation of audio or video chat.
WebRTC developers can choose whatever messaging protocol they prefer, such as SIP or XMPP, and any appropriate duplex (two-way) communication channel for signaling
RTCDataChannel
Gaming
Remote desktop applications
Real-time text chat
File transfer
we need to send data across the Internet. This can be done using the RTCPeerConnection API. To store the data we can use the MediaStreamRecorder API.
The navigator object contains information about the browser.
Note: There is no public standard that applies to the navigator object, but all major browsers support it.
The Window.URL property returns an object that provides static methods used for creating and managing object URLs. It can also be called as a constructor to construct URL objects.