Overview
Delivering video, audio, and other data over centralized networks is expensive and inefficient. Rather than building wasteful new data centers or purchasing expensive CDNs, it's more responsible to use existing infrastructure. Almost everybody has spare bandwidth. SwarmCloud creates value by unlocking this underutilized resource.
SwarmCloud’s P2P solution uses WebRTC to create a network between end-user devices accessing the same video. When a viewer requests video content, the system first checks to see if it is available from peers on the network. If so, it pulls the video from the peer instead of retrieving it from the video source. If it doesn’t, it retrieves it directly from the video source.

We are proud to support the largest range of devices available today. Our SDK has been continuously refined by top engineers.
How does it work?
The traditional streaming media mode is that the player requests data from the CDN (source server) for progressive playback. SwarmCloud integrates the SDK on the client side, embeds a layer of proxy between the player and the network. WebRTC is used to create a peer-to-peer mesh network that helps users load video content from each other. Our hybrid switching algorithm determines whether a viewer should load the next segment from SwarmCloud’s p2p network or the publisher’s CDN. This allows SwarmCloud to shrink a content provider’s bandwidth usage, while also maximizing a user’s viewing experience.

Made for Developers
Enabling P2P streaming requires just a few lines of code.
- Web
- Android
- iOS
- Flutter
- React Native
import Hls from '@swarmcloud/hls/hls.min';
if(Hls.isSupported()) {
var hls = new Hls();
hls.loadSource('https://your_stream.m3u8');
hls.attachMedia(video);
} else {
// use ServiceWorker based p2p engine if hls.js is not supported
new Hls.P2pEngine();
}
import com.p2pengine.sdk.P2pEngine
P2pEngine.init(applicationContext, YOUR_TOKEN, null)
val parsedUrl = P2pEngine.instance!!.parseStreamUrl("https://your_stream")
mediaPlayer.play(parsedUrl)
import SwarmCloudKit
let parsedUrl = P2pEngine.shared.parseStreamUrl("https://your_stream.m3u8")
_player = AVPlayer.init(url: URL(string: parsedUrl)!)
import 'package:flutter_p2p_engine/flutter_p2p_engine.dart';
await FlutterP2pEngine.init(
YOUR_TOKEN,
config: P2pConfig.byDefault()
);
url = await FlutterP2pEngine.parseStreamURL(YOUR_STREAM_URL);
player = VideoPlayerController.networkUrl(url);
import { initP2pEngine, parseStreamURL, TrackerZone } from 'react-native-swarmcloud';
initP2pEngine(YOUR_TOKEN, {
trackerZone: TrackerZone.Europe, // Set HongKong or USA if you changed zone
})
.then(() => {
const url = parseStreamURL(YOUR_STREAM_URL);
setSource({ uri: url });
})
Boost User Experience
Delivering high-quality, stable video streams is essential for maintaining service quality and driving user satisfaction. SwarmCloud's P2P MESH streaming solution avoids relying on a single link from client to server, making it more resilient to network disruption and delivering a better user experience.

Save on CDN Expenses
SwarmCloud uses MESH networking to deliver most video. Your CDN is used only when the P2P network is unavailable or to enable faster startup. This saves money and resources.

Easy to Integrate
SwarmCloud integrates simply with just a few lines of code. Switching to P2P-CDN streaming has never been easier, taking just minutes. It's compatible with all CDNs and agnostic to DRM and video codecs — no server-side changes required.
ISP Friendly
Peer-to-peer has traditionally been seen as detrimental to Internet Service Providers due to network strain. SwarmCloud reverses this by connecting only peers grouped by ISP and region, allowing ISPs with OTT services to benefit from P2P in unprecedented ways.
Security and Privacy
- Between peers: Peers connect via WebRTC data channels, a secure tunnel using the SCTP protocol over DTLS encryption.
- Between each viewer and the SwarmCloud backend: Each viewer connects to the backend via secure WebSocket using TLS encryption.
- P2P activity only begins after the user is authorized by the server. The HTTP server sees identical requests (tokens, keys, cookies, etc.) before and after SwarmCloud is enabled.
- To store the downloaded video chunks, the SDK uses areas of the viewer’s device memory that are inaccessible to any other application. In particular, these areas are inaccessible for viewing with in-browser developer tools. No video segments are ever saved to HDD. This protects video chunks from being copied and saved to the viewer’s device.
- SwarmCloud offers GDPR-compliant technology that is both legally and technically safe. The protocol is resilient to DDoS attacks and fraud injection attempts.
Get Started for Free
300GB of free daily traffic is provided to help you get started at zero cost.