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

パッケージ詳細v0.0.11

video_360

シンプルな360度動画プレイヤー(Android - Exoplayer、iOS - Swifty360Player)

AndroidiOS
30日間ダウンロード
755
いいね数
26
Pub ポイント
150

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

flutter pub add video_360

パッケージ概要

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

Flutter用のシンプルな360度ビデオプレーヤーで、AndroidではExoPlayer、iOSではSwifty360Playerを利用しています。完全な球面視聴機能を備えた没入型ビデオ再生を可能にし、VRコンテンツに最適です。このパッケージはプラットフォーム固有の実装を抽象化し、開発者向けに統一されたAPIを提供します。標準的な動画形式をサポートし、最小限の設定でFlutterアプリにスムーズに統合できます。複雑なカスタマイズが不要な基本的な360°ビデオ機能が必要な軽量用途に最適です。

用途

  • 没入型VR動画体験
  • 教育用360°ツアー
  • バーチャル不動産見学
  • インタラクティブな製品プレビュー
  • 旅行と観光コンテンツ

主な機能

  • クロスプラットフォームの360°動画再生
  • Android(ExoPlayer)およびiOS(Swifty360Player)のサポート
  • Flutter とのシンプルな統合
  • 標準の動画形式をサポートしています
  • 必要な最小構成

適している対象

  • VRコンテンツアプリを開発する開発者
  • インタラクティブな360°ビデオを必要とするアプリ
  • 軽量な360°ビデオソリューション
  • モバイル最優先の没入型体験
  • 360°ビデオ機能のプロトタイピング

注意事項

  • AndroidおよびiOSプラットフォームに限定
  • Webまたはデスクトップのサポートなし
  • ネイティブライブラリに依存しています
  • 高度なコントロールにはカスタム実装が必要になる場合があります
  • パフォーマンスはデバイスおよび動画解像度によって異なります

元の README

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

video_360

Simple 360 video player plugin (Android, iOS support)

Notice

The minimum-supported Flutter version has been updated to 3.24. If you are using an earlier version of Flutter, please refer to the previous version of the library.

Flutter Version <= 2.10.5 used this plugin version 0.0.6

Getting Started

The Android uses the open source AndroidX Media3

AndroidX Media3 : 1.10.1

The iOS uses the open source Swifty360Player

Swifty360Player Version: 0.2.7

Requirements

  • Flutter >=3.24.0
  • Dart >=3.5.0

Installation

Add pubspec.yaml dependencies.

dependencies:
  video_360: ^1.0.0

Android Requirements

Minimum SDK Target : 19

iOS Requirements

Minimum iOS Target : 12.0
Swift Version : 5.x

How to use

importing the library:

import 'package:video_360/video_360.dart';

Add Video360View:

Video360View(
    onVideo360ViewCreated: _onVideo360ViewCreated,
    url: YOUR_360_VIDEO_URL,    
    isRepeat: true, // default : false
    onPlayInfo: (Video360PlayInfo info) {
        // Play info Callback
    },
)

Video360Controller Method

play() : video play
stop() : video stop
reset() : video reset
jumpTo() : video jump, parameter is millisecond
seekTo() : video seek, parameter is plus, minus millisecond

sample code:

import 'package:material_ui/material_ui.dart';
import 'package:video_360/video_360.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(MaterialApp(home: MyApp()));
}

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

class _MyAppState extends State<MyApp> {

  Video360Controller? controller;

  String durationText = '';
  String totalText = '';

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {

    var statusBar = MediaQuery.of(context).padding.top;

    var width = MediaQuery.of(context).size.width;
    var height = MediaQuery.of(context).size.height;

    return Scaffold(
      appBar: AppBar(
        title: const Text('Video 360 Plugin example app'),
      ),
      body: Stack(
        children: [
          Center(
            child: Container(
              width: width,
              height: height,
              child: Video360View(
                onVideo360ViewCreated: _onVideo360ViewCreated,
                url: 'https://cdn.bitmovin.com/content/assets/playhouse-vr/m3u8s/105560.m3u8',
                onPlayInfo: (Video360PlayInfo info) {
                  setState(() {
                    durationText = info.duration.toString();
                    totalText = info.total.toString();
                  });
                },
              ),
            ),
          ),
          Column(
            children: [
              Row(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                children: [
                  MaterialButton(
                    onPressed: () {
                      controller?.play();
                    },
                    color: Colors.grey[100],
                    child: Text('Play'),
                  ),
                  MaterialButton(
                    onPressed: () {
                      controller?.stop();
                    },
                    color: Colors.grey[100],
                    child: Text('Stop'),
                  ),
                  MaterialButton(
                    onPressed: () {
                      controller?.reset();
                    },
                    color: Colors.grey[100],
                    child: Text('Reset'),
                  ),
                  MaterialButton(
                    onPressed: () {
                      controller?.jumpTo(80000);
                    },
                    color: Colors.grey[100],
                    child: Text('1:20'),
                  ),
                ],
              ),
              Row(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                children: [
                  MaterialButton(
                    onPressed: () {
                      controller?.seekTo(-2000);
                    },
                    color: Colors.grey[100],
                    child: Text('<<'),
                  ),
                  MaterialButton(
                    onPressed: () {
                      controller?.seekTo(2000);
                    },
                    color: Colors.grey[100],
                    child: Text('>>'),
                  ),
                  Flexible(
                    child: MaterialButton(
                      onPressed: () {
                      },
                      color: Colors.grey[100],
                      child: Text(durationText + ' / ' + totalText),
                    ),
                  ),
                ],
              )
            ],
          )
        ],
      ),
    );
  }

  _onVideo360ViewCreated(Video360Controller? controller) {
    this.controller = controller;
    this.controller.play();
  }
}

カテゴリー

依存関係

依存関係一覧 1 件

  • plugin_platform_interface^2.0.2

ソースリポジトリ

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

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