Buscar pacotes, repositórios e categorias de apps

Detalhes do pacotev1.2.0

apivideo_live_stream

Cliente de transmissão ao vivo RTMP para seu aplicativo de áudio/vídeo. Feito com ♥ pela api.video.

AndroidiOS
Downloads em 30 dias
7,6 mil
Curtidas
99
Pontos Pub
140

Instalar pacote

flutter pub add apivideo_live_stream

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

Um cliente de transmissão ao vivo RTMP para Flutter que permite transmissão em tempo real de áudio e vídeo em aplicativos Flutter. Desenvolvido com ❤️ pela api.video, oferece integração perfeita com fluxos de trabalho de transmissão ao vivo no Android e iOS. O pacote simplifica a configuração e gestão de transmissões ao vivo usando protocolos RTMP, sendo ideal para aplicativos interativos como eventos ao vivo, webinars ou plataformas de streaming social. Oferece uma base confiável para desenvolvedores que buscam entregar conteúdo ao vivo de alta qualidade com baixa latência.

Casos de uso

  • Transmissão ao vivo de eventos
  • Transmissão de webinars
  • feeds ao vivo das mídias sociais
  • Chat de vídeo interativo
  • Compartilhamento de conteúdo em tempo real

Principais recursos

  • Suporte de streaming ao vivo RTMP
  • Compatibilidade com Android e iOS
  • Integração simples com api.video
  • Streaming de baixa latência
  • Gerenciamento de conexão segura

Indicado para

  • Desenvolvedores construindo aplicativos de vídeo ao vivo
  • Equipes usando api.video para transmissão
  • Aplicativos que exigem áudio/vídeo em tempo real
  • Startups lançando recursos ao vivo
  • Soluções de streaming com foco em dispositivos móveis

Considerações

  • Requer conta e chave de API do api.video
  • Limitado ao protocolo RTMP
  • Depende de conexão estável com a internet
  • Pode ser necessário configuração adicional para configurações personalizadas de streaming
  • Não adequado para reprodução de vídeo não ao vivo

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

badge   badge   badge

Flutter RTMP live stream client

api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.

Table of contents

Project description

This module is made for broadcasting RTMP live stream from smartphone camera.

Getting started

Installation

Run the following command at the root of your project:

flutter pub add apivideo_live_stream

In your dart file, import the package:

import 'package:apivideo_live_stream/apivideo_live_stream.dart';
Permissions

To be able to broadcast, you must:

  1. On Android: ask for internet, camera and microphone permissions:

<manifest>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.CAMERA" />
</manifest>

The library will require android.permission.CAMERA and android.permission.RECORD_AUDIO at runtime. You don't need to request them.

  1. On iOS: update the Info.plist with a usage description for camera and microphone

<key>NSCameraUsageDescription</key>
<string>Your own description of the purpose</string>
<key>NSMicrophoneUsageDescription</key>
<string>Your own description of the purpose</string>
Code sample
  1. Creates a live stream controller

final ApiVideoLiveStreamController _controller = ApiVideoLiveStreamController(
    initialAudioConfig: AudioConfig(), initialVideoConfig: VideoConfig.withDefaultBitrate());
  1. Initializes the live stream controller
await _controller.initialize();
  1. Adds a CameraPreview widget as a child of your view
@override
Widget build(BuildContext context) {
  return SizedBox(
      width: 300.0,
      height: 300.0,
      child: ApiVideoCameraPreview(controller: _controller));
}

ApiVideoCameraPreview parameters:

  • controller: the live stream controller
  • fit: the fit of the preview (default is BoxFit.contain, see BoxFit for more information)
  • child: a child widget to overlay on top of the preview (optional)
  1. Starts a live stream
_controller.startStreaming("YOUR_STREAM_KEY");
  1. Stops streaming and preview
_controller.stop();
Manage application lifecycle

On the application side, you must manage application lifecycle:

@override
void didChangeAppLifecycleState(AppLifecycleState state) {
  if (state == AppLifecycleState.inactive) {
    _controller.stop();
  } else if (state == AppLifecycleState.resumed) {
    _controller.startPreview();
  }
}

Example App

You can try our example app, feel free to test it.

Setup

Be sure to follow the Flutter installation steps before anything.

  1. Open Android Studio
  2. File > New > Project from Version Control

In URL field, type:

git@github.com:apivideo/api.video-flutter-live-stream.git

Wait for the indexation to finish.

Android

Connect an Android device to your computer and click on the Run main.dart button.

iOS
  1. Connect an iOS device to your computer and click on the Run main.dart button.

  2. The build will fail because you haven't set your development profile, sign your application:

Open Xcode, click on "Open a project or file" and open the YOUR_PROJECT_NAME/example/ios/Runner.xcworkspace file.
Click on Example, go in Signin & Capabilities tab, add your team and create a unique bundle identifier.

Plugins

api.video Flutter live stream library is using external native libraries:

Plugin README
StreamPack StreamPack
HaishinKit HaishinKit

FAQ

If you have any questions, ask us in the community or use issues.

Categorias

Dependências

Lista de dependências 4 itens

Repositório-fonte

Projetos que usam este pacote