Skip to content

Live/VOD P2P Engine for Flutter App powered by WebRTC Datachannel.

License

Notifications You must be signed in to change notification settings

wwtsu/flutter-p2p-engine

 
 

Repository files navigation

English | 简体中文

cdnbye logo

Live/VOD P2P Engine for Flutter

pub

Features

  • Support iOS and Android platform
  • Support live and VOD streams over HLS protocol(m3u8)
  • Support encrypted HLS stream
  • Support cache to avoid repeating the download of TS file
  • Very easy to integrate with an existing flutter project
  • Support any flutter player
  • Efficient scheduling policies to enhance the performance of P2P streaming
  • Highly configurable
  • Use IP database to group up peers by ISP and regions

Installation

Add cdnbye as a dependency in your pubspec.yaml file.

Environment Configuration

See documentation

Example

import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';
import 'package:cdnbye/cdnbye.dart';

// Init p2p engine
_initEngine();

// Start playing video
_loadVideo();

_initEngine() async {
    await Cdnbye.init(
      YOUR_TOKEN,
      config: P2pConfig.byDefault()
    );
}

_loadVideo() async {
    var url = YOUR_STREAM_URL;
    url = await Cdnbye.parseStreamURL(url);           // Parse your stream url
    player = VideoPlayerController.network(url);
    player.play();
}

Obtain Token

See here

Consloe

Register your AppId at https://oms.cdnbye.com, where you can view p2p-related information.

Issue & Feature Request

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.

Related Projects

FAQ

We have collected some frequently asked questions. Before reporting an issue, please search if the FAQ has the answer to your problem.

Contact Us

Email:service@cdnbye.com

About

Live/VOD P2P Engine for Flutter App powered by WebRTC Datachannel.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 57.9%
  • Objective-C 16.8%
  • Java 16.7%
  • Ruby 8.6%