aliyun_live 0.0.7 copy "aliyun_live: ^0.0.7" to clipboard
aliyun_live: ^0.0.7 copied to clipboard

轻度封装阿里云直播SDK.

example/lib/main.dart

import 'package:aliyun_live_example/live_page.dart';
import 'package:aliyun_live_example/player_page.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: MainPage(),
    );
  }
}

class MainPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(title: Text("阿里云直播SDK演示")),
      body: Row(
        children: [
          MaterialButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (BuildContext context) {
                    return LivePage();
                  }),
                );
              },
              child: Text("推流")),
          MaterialButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (BuildContext context) {
                    return PlayerPage();
                  }),
                );
              },
              child: Text("拉流")),
        ],
      ),
    );
  }
}
1
likes
25
pub points
0%
popularity

Publisher

unverified uploader

轻度封装阿里云直播SDK.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on aliyun_live