パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.1.2

ext_video_player

Android および iOS で他の Flutter ウィジェットとインライン表示するための Flutter プラグイン。このプラグインは YouTube 動画および RTMP ストリームの再生もサポートしています。

AndroidiOSWeb
30日間ダウンロード
66
いいね数
88
Pub ポイント
110

パッケージをインストール

flutter pub add ext_video_player

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Android、iOS、Web の Flutter ウィジェット内でインライン動画再生を可能にする Flutter プラグインです。YouTube 動画や RTMP ストリームをアプリインターフェース内で直接再生できます。スムーズな統合を目的としており、開発者が Flutter UI を離れずに動画を埋め込めるように設計されています。最小限の設定で豊富なメディアコンテンツが必要なアプリに最適です。ネイティブ動画プレイヤーを利用しながら、プラットフォーム間で一貫した外観を維持します。

用途

  • FlutterアプリにYouTube動画を埋め込む
  • リアルタイムでRTMPストリームを再生する
  • スクロール可能なレイアウト内に動画コンテンツを統合する
  • メディア豊富な教育アプリの作成
  • ライブストリーミングアプリケーションの構築

主な機能

  • YouTube動画のURLをサポートしています
  • RTMPストリーム再生を処理する
  • Flutter ウィジェットを使用したインライン動画レンダリング
  • クロスプラットフォーム互換性(Android、iOS、Web)
  • 動画制御のためのシンプルな API

適している対象

  • メディア重視のアプリを開発する開発者
  • ライブまたはオンデマンド動画を必要とするアプリ
  • 教育またはエンターテインメントプラットフォーム
  • YouTubeの統合が必要なプロジェクト
  • 動画コンテンツを備えたウェブおよびモバイルアプリ

注意事項

  • オンライン動画の再生にはインターネット接続が必要です
  • RTMP のサポートは、プラットフォームによって異なる場合があります
  • YouTubeの再生には有効なAPIキーが必要です
  • ネイティブプレイヤーと比べてカスタマイズの選択肢が限られている
  • Webサポートにはブラウザ固有の制限がある場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

ext_video_player

Clone of video_player plugin with support for Youtube & RTMP

pub package

NOTICE

This Plugin uses all its code from video_player plugins which is the official video_player plugin Only few part of the code are modified.

Note

RTMP is only supported in Android (Working for iOS)

Installation

First, add ext_video_player as a dependency in your pubspec.yaml file.

iOS

Warning: The video player is not functional on iOS simulators. An iOS device must be used during development/testing.

Add the following entry to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>

This entry allows your app to access video files by URL.

Android

Ensure the following permission is present in your Android Manifest file, located in <project root>/android/app/src/main/AndroidManifest.xml:

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

The Flutter project template adds it, so it may already be there.

Web

Please check readme file of video_player

Example

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

void main() => runApp(VideoApp());

class VideoApp extends StatefulWidget {
  @override
  _VideoAppState createState() => _VideoAppState();
}

class _VideoAppState extends State<VideoApp> {
  VideoPlayerController _controller;

  @override
  void initState() {
    super.initState();
    _controller = VideoPlayerController.network(
        'http://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_20mb.mp4')
      ..initialize().then((_) {
        // Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.
        setState(() {});
      });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Video Demo',
      home: Scaffold(
        body: Center(
          child: _controller.value.initialized
              ? AspectRatio(
                  aspectRatio: _controller.value.aspectRatio,
                  child: VideoPlayer(_controller),
                )
              : Container(),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () {
            setState(() {
              _controller.value.isPlaying
                  ? _controller.pause()
                  : _controller.play();
            });
          },
          child: Icon(
            _controller.value.isPlaying ? Icons.pause : Icons.play_arrow,
          ),
        ),
      ),
    );
  }

  @override
  void dispose() {
    super.dispose();
    _controller.dispose();
  }
}

For more code please check example project

Buy Me a Coffee

Buy Me A Coffee

カテゴリー

依存関係

依存関係一覧 5 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。