CDNBye hlsjs-p2p-engine

repository·master·Indexed 22 days ago

https://github.com/cdnbye/hlsjs-p2p-engine

A WebRTC-based P2P engine for hls.js that scales HLS video streaming (Live and VOD) by turning viewers into a scalable CDN. It uses WebRTC data channels to share data between peers, reducing bandwidth costs and supporting encrypted streams. Compatible with popular HTML5 players including video.js, Clappr, JWPlayer, and Flowplayer, with a seamless fallback to standard server-based streaming if WebRTC is unsupported.

Tokens
925
Snippets
0
Records
6
Agent score
27%

What's inside cdnbye-hlsjs-p2p-engine

  1. Overview of CDNBye HLS P2P Engine

    master

    CDNBye is a plugin for hls.js that uses WebRTC DataChannel technology to enable P2P (Peer-to-Peer) streaming for HLS (m3u8) live and VOD content. It aims to reduce bandwidth costs for video providers and improve playback experience for users by sharing data between peers watching the same content.

    Key Features:

    • Native Browser Support: Uses WebRTC; no plugins required. Works better as more users join (BitTorrent-like algorithm).
    • Seamless Integration: Does not modify hls.js source code and can be integrated with just a few lines of code.
    • Fallback Mechanism: Automatically switches to standard HTTP downloading if the browser does not support WebRTC.
    • High Compatibility: Supports encrypted HLS and integrates with popular players like video.js, Clappr, Flowplayer, and DPlayer.
    • Smart Scheduling: Tracker servers use intelligent scheduling based on user IP, ISP, and geographic location.
  2. Overview of CDNBye hlsjs-p2p-engine

    master

    CDNBye hlsjs-p2p-engine is a WebRTC-based P2P engine designed to scale live and VOD video streaming using a BitTorrent-like protocol. It works by creating a peer-to-peer network via WebRTC data channels, which can be layered over existing CDNs or origin servers.

    Key features include:

    • WebRTC Data Channels: Lightweight P2P communication without requiring plugins.
    • HLS Support: Works with both live and VOD streams using the HLS (m3u8) protocol, including encrypted streams.
    • Seamless Fallback: Automatically falls back to standard server-based streaming if the browser does not support WebRTC.
    • Compatibility: Agnostic to CDNs, DRM, and video codecs. No changes are required on the server side.
    • Player Integration: Compatible with hls.js and popular HTML5 players like video.js, Clappr, JWPlayer, and Flowplayer.
  3. Monitor P2P Traffic via Dashboard

    master

    After integrating the P2P plugin, you can monitor your domain's performance using the CDNBye dashboard.

    1. Visit the dashboard.
    2. Register an account.
    3. Bind your domain.

    You can then view metrics such as P2P traffic volume, number of online users, and geographic distribution of users.

  4. Integrate CDNBye with HLS players

    master

    CDNBye is designed to be easily integrated into existing hls.js projects. It supports most popular web players. For detailed integration steps, refer to the official documentation.

  5. Browser compatibility for CDNBye

    master

    CDNBye's compatibility depends on the browser's support for both WebRTC and Hls.js.

    FeatureChromeFirefoxmacOS SafariAndroid WeChat/QQOperaEdgeIEiOS Safari
    WebRTC Datachannel
    Hls.js
    CDNBye

    Note: iOS Safari (Mobile) does not support the MediaSource API, which prevents CDNBye from working on that platform. For iOS support, consider using hls-sw-p2p-engine (ServiceWorker-based) or the dedicated ios-p2p-engine.