rtmp_broadcaster 3.0.1 copy "rtmp_broadcaster: ^3.0.1" to clipboard
rtmp_broadcaster: ^3.0.1 copied to clipboard

An extension of the Flutter camera plugin that enables live video streaming over RTMP on Android and iOS devices.

example/lib/main.dart

// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:rtmp_broadcaster/rtmp_broadcaster.dart';

import 'screens/camera_example_home.dart';
import 'utils/camera_utils.dart';

/// The root widget of the example app.
class CameraApp extends StatelessWidget {
  const CameraApp({super.key, required this.cameras});

  final List<CameraDescription> cameras;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: CameraExampleHome(cameras: cameras),
    );
  }
}

Future<void> main() async {
  // Fetch the available cameras before initializing the app.
  List<CameraDescription> cameras = <CameraDescription>[];
  try {
    WidgetsFlutterBinding.ensureInitialized();
    cameras = await availableCameras();
  } on CameraException catch (e) {
    logError(e.code, e.description ?? 'No description found');
  }
  runApp(CameraApp(cameras: cameras));
}
39
likes
150
points
711
downloads

Documentation

API reference

Publisher

verified publisheremiliodallatorre.it

Weekly Downloads

An extension of the Flutter camera plugin that enables live video streaming over RTMP on Android and iOS devices.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

cross_file, flutter, path_provider

More

Packages that depend on rtmp_broadcaster

Packages that implement rtmp_broadcaster