flutter_rtmp_publisher 0.0.1 flutter_rtmp_publisher: ^0.0.1 copied to clipboard
This Plugins helps to brodcast Live via RTMP right from your flutter application
import 'package:flutter/material.dart';
import 'package:flutter_rtmp_publisher/flutter_rtmp_publisher.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter RTMP Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Flutter RTMP Demo'),
),
body: Container(
child: RaisedButton(
child: Text("Start Stream"),
onPressed: () {
RTMPPublisher.streamVideo("<PLACE_YOUR_RTMP_STREAM_URL>");
},
),
),
);
}
}