cdnbye 1.3.0 copy "cdnbye: ^1.3.0" to clipboard
cdnbye: ^1.3.0 copied to clipboard

discontinuedreplaced by: flutter_p2p_engine
PlatformAndroidiOS

CDNBye flutter P2P Engine scales live/vod video streaming by peer-to-peer network using bittorrent-like protocol. Powered by WebRTC Datachannel, this SDK can interconnect with the Web side plug-in of [...]

example/lib/main.dart

import 'package:cdnbye_example/global/cdnByeListener.dart';
import 'package:cdnbye_example/pages/videoList.dart';
import 'package:cdnbye_example/pages/videoPage.dart';
import 'package:flutter/material.dart';
import 'package:cdnbye/cdnbye.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  _listen(Map info) {
    // 写入消息
    CdnByeListener().videoInfo.value = info;
  }

  @override
  void initState() {
    // 初始化
    Cdnbye.init(
      'ZMuO5qHZg', // replace with your token
      config: P2pConfig(
        logLevel: P2pLogLevel.none,
      ),
      infoListener: _listen,
      bufferedDurationGeneratorEnable: true,
    );

    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Video Demo',
      theme: ThemeData(
        scaffoldBackgroundColor: Color(0xFFf5f5f4),
      ),
      home: VideoList(),
    );
  }
}
20
likes
135
points
71
downloads

Publisher

verified publishercdnbye.com

Weekly Downloads

CDNBye flutter P2P Engine scales live/vod video streaming by peer-to-peer network using bittorrent-like protocol. Powered by WebRTC Datachannel, this SDK can interconnect with the Web side plug-in of CDNBye, which breaks the gap between the browser and mobile application. As expected, it supports any flutter player!

Documentation

API reference

License

MIT (license)

Dependencies

flutter, safemap

More

Packages that depend on cdnbye