Go to main content
1/17
Contents
Title and Copyright Information
Preface
Audience
Related Documents
Documentation Accessibility
1
Creating HTML5 Applications for WebRTC-Enabled Browsers
About Applications for WebRTC-Enabled Browsers
About Your Application Development Environment
About WebRTC Session Controller Signaling Engine
About the WebRTC Session Controller and Your Applications
About Supported WebRTC-Enabled Browsers
About JavaScript
About the Browser Protocols and Your Applications
About the Sample Applications
About the Conventions Used in This Guide
2
Setting Up Security
Handling Login to WebRTC Session Controller
Login Using Basic Authentication
Redirecting After a Successful Login
Login Using OAuth Authentication
Understanding OAuth 2.0 Concepts
Understanding OAuth Terminology
About the OAuth/WSC Entities and Their Relationships
About the OAuth Protocol Endpoints
The OAuth2 Authentication Process
Login Using Form-Based Authentication
Login Using REST Authentication
Handling Logout from WebRTC Session Controller
3
About Using the WebRTC Session Controller JavaScript API
About the wsc Namespace
About Using the WebRTC Session Controller JavaScript API Library
About the API to Use for General Tasks
About the API Used for Call-Related Tasks
About the API Used for Message-Related Tasks
About Extending WebRTC Session Controller JavaScript API
Managing Sessions with wsc.Session
Authenticating Users with wsc.AuthHandler
How Your Application Saves Session Information
Handling Session State Changes
Debugging Your Application with wsc.LOGLEVEL
Managing Calls with wsc.CallPackage
Managing a Call with wsc.Call
Specifying the Media Stream for Calls in the CallConfig Object
Defining Data Transfers with dataChannelConfig Parameter
Handling Changes in Call States
Handling Changes in Media Stream States
Transferring Data With wsc.DataTransfer
Sending Data Using wsc.DataSender
Receiving Data Using wsc.DataReceiver
About the Code Segments Displayed in This Guide
About the Application HTML File
About Web Applications Using WebRTC Session Controller JavaScript API
General Call Logic of Your Applications
General Notifications Logic of Your Applications
WebRTC Session Controller Support Libraries
Including WebRTC Browser Support
Verifying Browser Capabilities
About Monitoring Your Application WebSocket Connection
Managing Interactive Connectivity Establishment Interval
About the Use of ICE and ICE Candidate Trickling
About WebRTC Session Controller Signaling Engine and the ICE Interval
Retrieving the Current ICE Interval for the Call
Setting Up the ICE Interval for the Call
About Handling Events in the Application Environment
Supporting Web Client Notifications in Your Applications
About the WebRTC Session Controller Notification Service
About Employing Your Current Notification System
How the Notification Process Works
Handling Multiple Sessions
The Process Workflow for Your Web Application
Before You Proceed
About the General Requirements to Provide Notifications
Register with the Cloud Messaging System
Enable Your Applications to Use WebRTC Session Controller Notification Service
Obtain the Registration ID to Allow Push Notifications
General Tasks to Implement Session Rehydration
Handling Hibernation Requests from the Server
Tasks that Use WebRTC Session Controller Web SDK APIs
Provide the Device Token and Application Information when Creating the Session Object
Store the Session ID
Implement Session Hibernation and Handle its Scenarios
Send Notifications to the Callee when Callee Client Session is in Hibernated State
Rehydrate the Session with the Session ID
Responding to Hibernation Requests from the Server
Managing the Sessions in Your Application
About Session Rehydration Scenarios
Handling Session Rehydration on the Same Client Device
How WebRTC Session Controller Restores Application Data on the Same Device
Recreating the Session When the Application Page Reloads
Restoring CallPackage Data After Pages Reload
Restoring Extended MessageAlertPackage Data After Pages Reload
Restoring a Call Session
Restoring a Subscription Session
Resuming Your Application Operation
Handling Session Rehydration When the User Moves to Another Device
About the Supported Operating Systems
Configuring WebRTC Session Controller to Support Transfer of Session Data
About the WebSocket Disconnection
About the Normalized Session Data User to Support Handovers
About the Handover Scenario on the Original Device
Completing the Tasks to Support Session Rehydration in Another Supported Device
Suspending the Session on the Original Device
Sending the Handover Request with Your Session Data
Recreating the Application Session for the Handover Recipient
Configuring Screen Sharing
About the Requirements
How the Screen Sharing Process Works
Verifying Browser Capabilities
Providing the Required User Interfaces and Event handlers
Verifying the Availability of the Plug-in Interface
Providing the logic to Initiate a Screen Sharing Session
4
Setting Up Audio Calls in Your Applications
About Implementing the Audio Call Feature in Your Applications
About the WebRTC Session Controller JavaScript API Used in Implementing Audio Calls
Setting Up Audio Calls in Your Applications
Overview of Setting Up the Audio Call Feature in Your Application
Setting Up the General Elements for the Audio Call Feature
Setting Up the Main Objects and Values
Current Stage in the Development of the Audio Call Feature
Enabling Users to Make Audio Calls From Your Application
Setting Up the Configuration for Calls Supported by the Application
Setting Up the Session Object
Setting Up the Call Package for the Session
Handling Session State Changes
Obtaining the Callee Information
Current Stage in the Development of the Audio Call Feature in Your Application
Initial Actions of the Sample Audio Call Application
Implementing the Logic to Set Up the Call Session
Starting a Call From Your Application
Retrieving the Appropriate Authentication Headers
About Digest Access Authentication
Creating the authHeader Object for the Response
Setting Up the Event Handler for Call State Changes
Setting Up the Event Handler for the Media Streams
Current Stage in the Development of the Audio Call Feature in Your Application
How the Sample Audio Call Application Starts a Call
Enabling Your Application Users to Receive Calls
Responding to Your User's Actions on an Incoming Call
Current Stage in the Development of the Audio Call Feature in Your Application
How the Sample Audio Call Application Handles Incoming Calls
How a Call is Established in the Sample Audio Call Application
Monitoring the Call
How the Sample Audio Call Application Monitors a Call
Ending the Call
Current Stage in the Development of the Audio Call Feature in Your Application
Closing the Session When the User Logs Out
Other Actions on Calls
Gathering Information on the Current Call
Supporting Multiple Calls Using CallPackage
Managing Interactive Connectivity Establishment Interval
About the Use of ICE and ICE Candidate Trickling
About WebRTC Session Controller Signaling Engine and the ICE Interval
Retrieving the Current ICE Interval for the Call
Setting Up the ICE Interval for the Call
Enabling Trickle ICE to Improve Application Performance
Updating a Call
Reconnecting Dropped Calls
Handling Dual Tone Multi Frequency in Calls
5
Setting Up Video Calls in Your Applications
About Implementing the Video Call Feature in Your Applications
About the WebRTC Session Controller JavaScript API Used in Implementing Video Calls
Setting Up Video Calls in Your Applications
Setting Up the Video Display
Specifying the Video Direction in the Call Configuration
Managing the Video Display on Your Application Page
Managing the Video Streams in the Media Stream Event Handler
6
Setting Up Data Transfers in Your Applications
About Data Transfers and Signaling Engine
About Setting Up Data Transfers in Your Applications
About the API Used to Manage the Transfer of Data
Managing Data Channels Using wsc.DataTransfer
Sending Data Using wse.DataSender
Handling Incoming Data Using wsc.DataReceiver
Setting up Data Transfers in Your Application
Setting Up the General Elements for the Data Transfer Feature
Declaring Variables Specific to the Chat Sessions
Setting Up the Configuration for Data Transfers in Chat Sessions
Defining the Data Transfer in the CallConfig Object
Assigning the Data Transfer Event Handler to the Call Package
Obtaining the Callee Information
Starting the Call with the Data Transfer Feature in the Call
Responding to Your User's Actions on an Incoming Call
Setting Up the Chat Session User Interface
Setting Up the Data Transfer State Event Handler for the Chat Session
Managing the Flow of Data
Handling the Open State of the Data Channel
Handling the Received Text
Sending the Text
Handling the Closed State of the Data Channel
Monitoring the Chat Session
7
Setting Up Message Alert Notifications
About Message Alert Notifications and Signaling Engine
Handling Message Notifications in Your Web Applications
About the API Used to Manage Message Alert Notifications
Managing Message Alert Notifications with wsc.MessageAlertPackage
Handling Notifications with wsc.Notification
Subscribing to Notifications with wsc.Subscription
Getting Message Summary Information
Retrieving Message Counts from Message-Summary Notifications
Managing Subscriptions
Enabling the User to Subscribe to Notifications
Setting Up a Subscription
Creating a Subscription
Verifying that a Subscription is Active
Handling the Ending of a Subscription
Restoring a Subscription
Managing Notifications
Handling Message Notifications
8
Developing Rich Communication Services Applications
About Rich Communication Services
About WebRTC Session Controller RCS Support
Prerequisites
About the Examples in This Chapter
Capabilities Exchange
Sample Capability Exchange HTML File
Initiate a Capability Exchange Query
Handle a Capability Query Response
Handle an Incoming Capability Query
Handle Capability Exchange Errors
Initiate a Capability Exchange Request in a Call
Sending a Standalone Message
Messaging Sample HTML File
Send a Message
Handle an Incoming Message
Handle Messaging Success Events
Handle Messaging Error Events
Creating an RCS Chat Application
Chat Sample HTML File
Implementing Chat
Initiate the Chat Session
Send a Chat Message
Handle Incoming Chat Requests
Handle Chat Signaling State Changes
Handle Chat Connection State Changes
Handle Incoming Chat Messages
Handle Message Transmission Success and Failure Events
Handle Participant Typing Notifications
Implementing File Transfer
File Exchange Example HTML File
Setup a File Transfer Session
Control and Return Information on the File Transfer
Terminate the File Transfer Session
Send a File from Your Application
Handle Incoming File Transfer Requests
Handle File Transfer Signaling State Changes
Handle File Transfer Connection State Changes
Handle Message Transmission Success and Failure Events
Handle File Data Transmission
Handle File Transfer Progress Updates
9
Using the WebRTC Browser Extension
About WebRTC Session Controller Browser Plug-in Support
About the WebRTC Plug-in
Integrating WebRTC Session Controller with Temasys WebRTC Plug-in
Application Logic for Media Streams
Android Applications
iOS Applications
10
Extending Your Applications Using WebRTC Session Controller JavaScript API
About the Default Messaging Mechanism Used by Your Applications
About Extending the WSC Namespace
Extending Objects Using the wsc.extend Method
Extending Sessions with wsc.ExtensibleSession Class
Extending and Overriding WebRTC Session Controller JavaScript API Object Methods
Handling Extended Call Sessions with CallPackage.onMessage
Preparing Custom Calls with CallPackage.prepareCall
Inserting Calls into a Session with CallPackage.putCall
Processing Custom Messages for a Call with Call.onMessage
Extending Headers in Call Messages
Handling Custom Message Notifications
Handling Extensions to Notifications with MessageAlertPackage.onMessage
Handling Extra Headers in Messages
About Extra Headers in Messages
Handling Extra Headers
Managing Calls with Extra Headers
Working with wsc.ExtensibleSession
Creating an Extensible Session in Your Application
Creating Custom Packages Using the ExtensibleSession Object
Saving Your Custom Session
Sending And Receiving Custom Messages
About the API Classes Used to Create Custom Message
wsc.Message
wsc.Message#control
wsc.Message#header
wsc.Message#payload
Managing Custom Message Data Flows
Sending a Custom Message to Signaling Engine
Processing an Incoming Custom Message
Customizing Your Applications by Extending the Package Objects
Working with Extended CallPackage Objects
Creating an Extended Call Package
Registering the Extended Package with the Session
Extending the Methods and Event Handlers in the Extended Call Package
Working with Extended Calls
Working with Extended MessageAlertPackage Objects
Extending the Methods and Event Handlers
Extending the MessageAlertPackage to Support Other Message Events
11
Debugging and Troubleshooting Your WebRTC-Enabled Applications
About the Runtime Checks on the Environment
Browsers and Connections
Testing Browser Compatibility
Monitoring Network Connections
Monitoring the WebSocket
Verifying the WebRTC Connection to a Peer
Media Devices
Selecting Appropriate Source for the Audio Elements
Selecting Appropriate Source for the Video Elements
About Debugging Your Applications
About the Log Information
About the Log Recording Points During the Life Cycle of a Session
Sample of a Log Output
About the Configuration of Application Debug Log File
12
Developing WebRTC-Enabled Android Applications
About the Android SDK
About the Android SDK WebRTC Call Workflow
Prerequisites
Android SDK System Requirements
About the Examples in This Chapter
General Android SDK Best Practices
Installing the Android SDK
WebRTC Session Controller SDK Required Permissions
Configuring Logging
Authenticating with WebRTC Session Controller
Initialize the CookieManager
Initialize a URL Connection
Configure Authorization Headers if Required
Configure the SSL Context if Required
Build the HTTP Context
Connect to the URL
Configuring Interactive Connectivity Establishment (ICE)
About Monitoring Your Application WebSocket Connection
Configuring Support for Notifications
About the WebRTC Session Controller Notification Service
About Employing Your Current Notification System
How the Notification Process Works
Handling Multiple Sessions
The Process Workflow for Your Android Application
About the WebRTC Session Controller Android APIs for Client Notifications
About the General Requirements to Provide Notifications
Register with Google
Obtain the Registration ID for your Application
Enable Your Applications to Use the WebRTC Session Controller Notification Service
Inform the Device to Deliver Push Notifications to Your Application
Store the Session ID
Implement Session Rehydration
Handling Hibernation Requests from the Server
Tasks that Use WebRTC Session Controller Android APIs
Associate the Device Token when Building the WebRTC Session
Associate the Hibernation Handler for the Session
Implement the HibernationHandler Interface
Implement Session Hibernation
Send Notifications to the Callee when Callee Client Session is in Hibernated State
Provide the Session ID to Rehydrate the Session
Respond to Hibernation Requests from the Server
Creating a WebRTC Session Controller Session
Implement the ConnectionCallback Interface
Create a Session Observer Object
Build the Session Object
Configure Session Properties
Adding WebRTC Voice Support to your Android Application
Initialize the CallPackage Object
Place a WebRTC Voice Call from Your Android Application
Initialize the Call Object
Configure Trickle ICE
Create a Call Observer Object
Register the CallObserver with the Call Object
Create a CallConfig Object
Configure the Local MediaStream for Audio
Start the Audio Call
Terminating the Audio Call
Receiving a WebRTC Voice Call in Your Android Application
Create a CallPackage Observer
Bind the CallPackage Observer to the CallPackage
Adding WebRTC Video Support to your Android Application
Initializing the PeerConnectionFactory Object
Find and Return the Video Capture Device
Create a GLSurfaceView in Your User Interface Layout
Initialize the GLSurfaceView Control
Placing a WebRTC Video Call from Your Android Application
Create a CallConfig Object
Configure the Local MediaStream for Audio and Video
Start the Video Call
Terminate the Video Call
Receiving a WebRTC Video Call in Your Android Application
Supporting SIP-based Messaging in Your Android Application
About the Major Classes Used to Support SIP-based Messaging
Setting up the SIP-based Messaging Support in Your Android Application
Enabling SIP-based Messaging
Sending SIP-based Messages
Handling Incoming SIP-based Messages
Adding WebRTC Data Channel Support to Your Android Application
About the Major Classes and Protocols Used to Support Data Channels
Initialize the CallPackage Object
Sending Data from Your Android Application
Create a Call Observer
Configure the Data Channel for the Data Transfers
Create a CallConfig Object
Register the Observer for the Data Channel
Set Up the Data Transfer Observer to Send Data
Handle Changes in the State of the Data Transfer
Start the Call
Send the Data Content
Terminate the Data Channel in the Call
Receiving Data Content in Your Android Application
Register the Observer for the Receiver of the Data Channel
Set Up the Data Receiver to Receive Incoming Data
Accept the Call
Upgrading and Downgrading Calls
Handle Upgrade and Downgrade Requests from Your Application
Handle Incoming Upgrade Requests
Handling Session Rehydration When the User Moves to Another Device
About the Supported Operating Systems
Configuring WebRTC Session Controller to Support Transfer of Session Data
About the WebSocket Disconnection
About the Normalized Session Data User to Support Handovers
About the Handover Scenario on the Original Device
About the WebRTC Session Controller Android APIs for Device Handover
Completing the Tasks to Support Session Rehydration in Another Supported Device
Suspending the Session on the Original Device
Sending the Session Data to the Application Service
Requesting for the Session Data from the Application Service
Recreating the Application Session with the StateInfo Object
Rehydrating a WebRTC Call After a Device Handover
Extending Your Applications with WebRTC Session Controller Android SDK
About the Classes and Methods Used to Extend Android Applications
Extending WebRTC Session Controller Android Applications
Extending Your Session Application Using the Session Object
Extending Your Application Using Extension Headers
13
Developing WebRTC-Enabled iOS Applications
About the iOS SDK
Supported Architectures
About the iOS SDK WebRTC Call Workflow
Prerequisites
iOS SDK System Requirements
About the Examples in This Chapter
Installing the iOS SDK
Authenticating with WebRTC Session Controller
Initialize a URL Object
Configure Authorization Headers
Connect to the URL
Configure the SSL Context
Retrieve the Response Headers from the Request
Build the HTTP Context
Configure Interactive Connectivity Establishment (ICE)
Configuring Support for Notifications
About the WebRTC Session Controller Notification Service
About Employing Your Current Notification System
How the Notification Process Works
Handling Multiple Sessions
The Notification Process Workflow for Your iOS Application
About the WebRTC Session Controller APIs for Client Notifications
About the General Requirements to Provide Notifications
Registering with Apple Push Notification Service
Obtaining the Device Token
Enabling Your Applications to Use the WebRTC Session Controller Notification Service
Informing the Device to Deliver Push Notifications to Your Application
Storing the Device Token
Storing the Session ID
Implement Session Rehydration
Handling Hibernation Requests from the Server
Tasks that Use WebRTC Session Controller iOS APIs
Associate the Device Token when Building the WebRTC Session
Associate the Hibernation Handler for the Session
Implement the HibernationHandler Interface
Implement Session Hibernation
Send Notifications to the Callee when the Client Session is in Hibernated State
Provide the Session ID to Rehydrate the Session
Responding to Hibernation Requests from the Server
Creating a WebRTC Session Controller Session
Implement the WSCSessionConnectionDelegate Protocol
Implement the WSCSession Connection Observer Protocol
Build the Session Object and Open the Session Connection
Configure Additional WSCSession Properties
Adding WebRTC Voice Support to your iOS Application
Initialize the CallPackage Object
Place a WebRTC Voice Call from Your iOS Application
Add the Audio Capture Device to Your Session
Initialize the Call Object
Configure Trickle ICE
Create a WSCCallObserverDelegate Protocol
Register the WSCCallObserverDelegate Protocol with the Call Object
Create a WSCCallConfig Object
Configure the Local MediaStream for Audio
Start the Audio Call
Terminating the Audio Call
Receiving a WebRTC Voice Call in Your iOS Application
Create a WSCCallPackageObserverDelegate
Bind the CallPackage Observer to the CallPackage
Adding WebRTC Video Support to your iOS Application
Add the Audio and Video Capture Devices to Your Session
Configure a View Controller to Display Incoming Video
Placing a WebRTC Video Call from Your iOS Application
Create a WSCCallConfig Object
Configure the Local WSCMediaStream for Audio and Video
Bind the Video Track to the View Controller
Start the Video Call
Terminate the Video Call
Receiving a WebRTC Video Call in Your iOS Application
Supporting SIP-based Messaging in Your iOS Application
About the Major Classes Used to Support SIP-based Messaging
Setting up the SIP-based Messaging Support in Your iOS Application
Enabling SIP-based Messaging
Sending SIP-based Messages
Handling Incoming SIP-based Messages
Adding WebRTC Data Channel Support to Your iOS Application
About the Major Classes and Protocols Used to Support Data Channels
About the Sample Code Excerpts in This Section
About the Data Transfers and Data Channels
Setting Up DataTransferObserverDelegate Protocol to Handle Data Transfers
Initialize the CallPackage Object
Sending Data from Your iOS Application
Configure the Data Channel for the Data Transfers
Handling the Data Channel States
Create a WSCCallConfig Object with Data Channel Option
Configure the Local MediaStream for Audio and Video
Set Up Your Application to Receive Incoming Data
Start the Data Channel Call
Send the Data Content
Terminate the Data Channel in the Call
Receiving Data Content in Your iOS Application
Implement WSCCallPackageObserverDelegate Protocol to Verify Data Channel Capability
Handling the Data Channel States
Implement the DataReceiverObserverDelegate Protocol to Listen for Messages
Accept the Call
Receiving Data
Upgrading and Downgrading Calls
Handle Upgrade and Downgrade Requests from Your Application
Handle Incoming Upgrade Requests
Handling Session Rehydration When the User Moves to Another Device
About the Supported Operating Systems
Configuring WebRTC Session Controller to Support Transfer of Session Data
About the WebSocket Disconnection
About the Normalized Session Data User to Support Handovers
About the Handover Scenario on the Original Device
About the WebRTC Session Controller iOS APIs for Device Handover
Completing the Tasks to Support Session Rehydration in Another Supported Device
Suspending the Session on the Original Device
Sending the Session Data to the Application Service
Requesting for the Session Data from the Application Service
Recreating the Application Session with the StateInfo Object
Rehydrating a WebRTC Call After a Device Handover
Extending Your Applications with WebRTC Session Controller iOS SDK
Extending an Existing Package
Building an Extended Session
Creating a WSC Frame
Sending a WSC message Frame to the Session
Adding a SubSession to the Session
Adding a New Package
About Extension Headers and JSON Messages
14
WebRTC Session Controller JavaScript API Error Codes and Errors
About wsc.ERRORCODE
About the Error Codes
Using wsc.ErrorInfo
About the Error Handlers
Handling Errors Related to Sessions
Handling Errors Related to Calls
Handling Errors Related to Data Transfers
Handling Errors Related to Subscriptions
Scripting on this page enhances content navigation, but does not change the content in any way.