패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.2.0

apivideo_live_stream

음성/영상 애플리케이션용 플러터 RTMP 라이브 스트리밍 클라이언트. api.video에서 마음을 담아 제작했습니다.

AndroidiOS
30일 다운로드
6.7천
좋아요
99
Pub 점수
140

패키지 설치

flutter pub add apivideo_live_stream

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Flutter 앱에서 실시간 오디오 및 비디오 방송을 가능하게 하는 Flutter RTMP 라이브 스트리밍 클라이언트입니다. api.video가 ❤️로 개발하여 Android 및 iOS에서 라이브 스트리밍 워크플로우와 원활하게 통합됩니다. RTMP 프로토콜을 사용하여 라이브 스트림의 설정 및 관리를 단순화하여, 라이브 이벤트, 웨비나 또는 소셜 스트리밍 플랫폼과 같은 인터랙티브 앱에 이상적입니다. 고품질, 저지연 라이브 콘텐츠를 제공하려는 개발자에게 신뢰할 수 있는 기반을 제공합니다.

사용 사례

  • 라이브 이벤트 방송
  • 웹세미나 스트리밍
  • 소셜 미디어 라이브 피드
  • 인터랙티브 비디오 채팅
  • 실시간 콘텐츠 공유

주요 기능

  • RTMP 라이브 스트리밍 지원
  • 안드로이드 및 iOS 호환성
  • api.video와의 간단한 통합
  • 저지연 스트리밍
  • 보안 연결 처리

적합한 대상

  • 라이브 비디오 앱을 개발하는 개발자
  • 스트리밍에 api.video를 사용하는 팀
  • 실시간 오디오/비디오가 필요한 앱
  • 스타트업이 실시간 기능 출시
  • 모바일 우선 스트리밍 솔루션

고려 사항

  • api.video 계정과 API 키가 필요합니다
  • RTMP 프로토콜로 제한
  • 안정적인 인터넷 연결에 의존합니다
  • 사용자 지정 스트리밍 설정을 위해 추가 구성이 필요할 수 있습니다
  • 실시간이 아닌 비디오 재생에 적합하지 않습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

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.

카테고리

의존성

의존성 목록 4 개

소스 저장소

이 패키지를 사용하는 프로젝트