Why LiveSwitch Cloud
LiveSwitch Cloud is a highly flexible, fully managed, enterprise-grade, live video broadcasting platform with stunning video quality and exceptional access to real-time metrics, reports, and integrations.
LiveSwitch provides unparalleled flexibility to combine peer-to-peer (P2P)-, Selective Forwarding Unit (SFU)-, and Mixing Control Unit (MCU)-based media flows in a single session and switch dynamically while the session is live.
LiveSwitch provides a full cross-platform WebRTC stack. You can use the following exclusive features in your app:
- Token-based authentication
- Support for multiple simultaneous devices
- Powerful channel-based session management
- P2P, MCU, and SFU modes
- Support for H.264, VP8, VP9, G.711 and Opus codecs
- Presence management
- REST API and Webhooks control
- WebSocket-based media communication for the cases when WebRTC is blocked on the network (Beta, available for .NET and browsers only)
- Live call analytics
SFU for Video Conferencing
LiveSwitch supports SFU that uses a one-up, many-down architecture. With SFU, participants send their media to the server only once. The server subsequently distributes the media to connected downstream clients.
SFU reduces upstream bandwidth and client load. This allows you to scale your app out much further on the client. The server forwards the media packets without decoding or re-encoding them. Thus, you can keep the server load minimal to make the most of each instance.
You can also use simulcast in a conference or broadcast. Simulcast allows downstream clients to receive the best possible quality stream.
Mixing for Multiparty Audio and Video
LiveSwitch supports MCU that mixes audio and video into a single stream based on standard or custom video templates. If a connection goes over MCU, it offloads the stream to the servers.
MCU connection has only one upload stream and one download stream for each call participant. This is especially useful for legacy and resource-constrained devices. The server handles all the mixing and delivers the stream to users in their devices' format.
Online Demo
A demo is available online on the LiveSwitch Video Chat demo page. You can open the demo in a few browser windows or ask some friends to help you out.
Platform Support
LiveSwitch provides client SDKs for all modern platforms, with libraries written in C#, JavaScript, Java, and Objective-C. LiveSwitch supports Android, iOS, macOS, almost any flavor of .NET, Windows 10, and a few other minor platforms.
Download the LiveSwitch Cloud SDK
LiveSwitch SDK is available for multiple platforms. Each SDK is packaged as a single download and is available on your LiveSwitch Cloud Console's Downloads page.
In each of the client platform downloads, you'll find two folders:
- Examples folder which contains source code for demos that you can use as a starting point to build your own apps.
- Libraries folder which contains compiled binaries for the platform to include in your own apps.
Create a Sample App
You can learn how to use LiveSwitch by following the Getting Started Guide and create a sample app. This guide includes step-by-step tutorials to set up your development environment and create apps with all the basic functionalities of LiveSwitch for C#, Android, iOS, and TypeScript. These functionalities include client registration, media streaming, screen sharing, text chat, and file transferring.
Explore the Example App
You can also learn LiveSwitch by exploring the Chat and the Layout Manager examples in the downloaded package for all supported platforms.
The Chat example demonstrates the following:
- Switch among P2P, SFU, and MCU modes
- Perform token-based authentication
- Send and display a chat message
- Capture screen
- Change audio and video devices
- Simulcast
- Fallback to the Media-over-WebSockets protocol for the cases when WebRTC is blocked on the network (Beta)
The Layout Manager example demonstrates how to lay out views according to set parameters.
To build the example, navigate to the folder for your platform and load the project in an appropriate Integrated Development Environment (IDE) for your platform:
- For C#, use Visual Studio.
- For Web, we recommend Visual Studio. The example includes both TypeScript and JavaScript flavors.
- For Android, use Android Studio.
- For iOS and macOS, use Xcode.
WebRTC Support
LiveSwitch supports WebRTC. LiveSwitch's network tunneling strategies are identical to those recommended by the WebRTC specification. LiveSwitch's WebRTC implementation provides complete audio, video, and data-channel stack that is fully interoperable with other modern WebRTC implementations.
Browser | Supported by LiveSwitch? |
---|---|
Chrome | Yes |
Firefox | Yes |
Opera | Yes |
Safari | Yes. LiveSwitch fully supports plugin-free WebRTC communications in iOS 11+ and Safari 11+ for macOS High Sierra. |
Internet Explorer | Yes. LiveSwitch is bundled with an ActiveX plugin for Internet Explorer users. This is tightly integrated with the JavaScript SDK so that the browser automatically uses the plugin if native WebRTC functionality is unavailable. |
Edge | Yes |
Media-Over-WebSockets Support (Beta)
Media-over-WebSockets is a feature that supports sending the media over the WebSocket protocol and joining WebRTC-based conferences. This feature is helpful in the circumstances where WebRTC connections cannot be established due to network policies. This allows end-clients to establish WebSocket-based connections to the WebSocket Media Server. The WebSocket Media Server then establishes WebRTC-based media connections to the Media Server.
*This feature is disabled by default on LiveSwitch Cloud. The beta version can be made available to interested customers for a limited time without an additional fee. Please contact our Support team if you are interested in enabling this feature.
Platform Support
Platform | Supported by LiveSwitch? |
---|---|
.NET | Yes |
iOS | No |
Android | No |
Maui | No |
Browser Support
Browser | Supported by LiveSwitch? |
---|---|
Chrome | Yes |
Firefox | No |
Opera | No |
Safari | Yes |
Internet Explorer | No |
Edge | No |
Third-Party Dependencies
Internal Dependencies
LiveSwitch uses the following libraries:
Library | Vendor | License | Platform |
---|---|---|---|
BouncyCastle | Open-source software (OSS) | MIT | All except native iOS/macOS for DTLS encryption. |
libssl / libcrypto | OSS | Apache 1.0 / BSD | Native iOS/macOS for DTLS encryption. |
SkiaSharp | Microsoft | MIT | .NET (Media Server) for video mixing. |
librtmp | MPlayer | LGPLv2.1 | .NET (Media Server) for RTMP |
libavcodec | FFMpeg | LGPLv2.1 | .NET (Media Server) for encoding AAC audio |
External Dependencies
The following libraries are necessary for capturing and processing audio and video:
Library | Vendor | License | Platform |
---|---|---|---|
NAudio | OSS | Ms-PL | .NET for audio capture and playback |
AForge.NET | OSS | LGPL v3 | .NET for camera capture |
Sarxos | OSS | MIT | Java for camera capture |
libvpx | WebM Project | New BSD | All for video encoding/decoding |
libopus | Xiph.Org | BSD | All for audio encoding/decoding |
libaudioprocessing | BSD | All except iOS/macOS for echo cancellation | |
libyuv | BSD | All for YUV conversion | |
libopenh264* | Cisco | Two-Clause BSD / AVC/H.264 Patent Portfolio License | All except iOS/macOS for video encoding/decoding (downloaded at runtime) |
* libopenh264 isn't included or shipped in release artifacts. It's downloaded at runtime by clients that are configured to use software H.264.
Optional Dependencies
The following libraries are optional:
Library | Vendor | License | Used By |
---|---|---|---|
log4net | Apache | Apache 2.0 | .NET for logging |
Json.NET | Newtonsoft | MIT | .NET for JSON serialization |
Redis | OSS | BSD | LiveSwitch Gateway state provider |
LiveSwitch Cloud Usage-Based Billing
Customers on a usage-based billing plan are charged based on the usage of the service. They are charged for the number of minutes consumed for the number of upstream, downstream, screen share, and such.
Note
Customers are billed depending on the agreed-upon rates in their contract. Please refer to your contract or contact Sales for any pricing-specific questions.
Currently, these four types of events are used to calculate participant messages and minutes:
- channel_client_left_events
- connection_initializing_events
- connection_connected_events
- connection_terminated_events
The usage calculation starts from the terminated events and looks back in time for the appropriate connection/initialization events. Using the terminated events as the start point enables ongoing sessions to be easily filtered and those for which a terminated event was never registered.
Messages are calculated from the number of bytes sent as tracked by all four event types. Messages are calculated by dividing the total bytes into 1 KB increments.
The usage calculation also varies based on the maximum pixel count for high-definition video and standard-definition video. The maximum pixel count is the maximum of the frame width x frame height (in pixels) across all transmitted frames.
Following two types of resolution are supported:
- High Definition (HD) = 1920p x 1080p (at the maximum)
- Standard Definition (SD) = 1280p x 720p (at the maximum)
For example, 1920 x 1080 is accepted as HD. 1920 x 1080 = 2073600 gives the threshold for maximum pixel count. Anything < 2073600 is SD. If the maximum pixel count >= 2073600, then it's HD. So, if all frames are SD, but a single frame has a pixel count >= 2073600, then the maximum pixel count is the width x height for that single HD frame, and the usage is billed as HD.
Note
LiveSwitch doesn’t support 4K.
FAQ
I mute my video or audio. Does this affect usage minute calculations?
- No
I change direction to inactive on an upstream. I am not sending any data. Am I still charged minutes?
- No
There is only one participant in a call. So, there is one MCU/SFU upstream, but no downstream. Are usage minutes still calculated for the upstream?
- Yes
In Peer-to-Peer (P2P), are we charged minutes?
- Yes
What triggers the start/stop of minutes calculation?
- Usage is calculated from the time the connection connects until it disconnects.
Data Collection
LiveSwitch Cloud collects usage data for billing purposes as well as for providing real-time monitoring and historical information on the LiveSwitch Cloud Console. This data is encrypted and stored on services managed by LiveSwitch. LiveSwitch Cloud does not store any audio/video data unless recording is explicitly enabled, nor do we store any messages sent on the channels. This minimizes the risk of any possible data exposure to our customers.
For data elements we do capture, the only one that is not under the control of the developer is the end user’s IP address. WebRTC requires knowledge of the source IP address of the connecting client, therefore we must collect this information. We also use this information to identify the region the client is connecting from to display on the Unique IPs by Location
graph. We do not sell or use this information in any way outside the scope of LiveSwitch Cloud itself.
Developers on LiveSwitch Cloud have some responsibilities when it comes to personal identifiable information (PII) as well. While LiveSwitch Cloud stores everything in an encrypted fashion, to be compliant with local regulations, you may need to anonymize certain parts of the information that is sent to LiveSwitch Cloud when you are building your application.
Here are the events that we capture and store:
- Client Registered
- Client Unregistered
- Client Updated
- Client Joined Channel
- Client Left Channel
- Channel Activated
- Channel Deactivated
- Channel RTMP Started
- Channel RTMP Stopped
- Connection Initializing
- Connection Connecting
- Connection Connected
- Connection Closing
- Connection Failing
- Connection Closed
- Connection Failed
- Connection Updated
- Connection Stats
Here are the data elements in these events that are available to developers using the LiveSwitch Cloud SDK or on the LiveSwitch Cloud Console which may potentially need to be anonymized by the developer using the LiveSwitch SDK if, for some reason, they need to include PII in them:
- Client Properties
- user_id
- user_alias
- device_id
- device_alias
- external_id
- tag
- roles
- region
- Channel Properties
- id
- tag
- Connection Properties
- tag
Numerous mechanisms can be used by developers on LiveSwitch Cloud to anonymize this data, from UUIDs to encryption, the exact method is up to the developer of the application, provided they require such steps to be taken.
Also, please note that most data is not PII and, therefore, does not matter as far as all the above comments are concerned. Typical use cases for tags, for example, would be information on meeting state, which is not PII. Just be careful that you don’t use, for example, a channel name like “/my-cancer-doctor/my-full-name”.