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

패키지 상세v0.0.11

video_360

간단한 360도 비디오 플레이어 (안드로이드 - Exoplayer, iOS - Swifty360Player)

AndroidiOS
30일 다운로드
755
좋아요
26
Pub 점수
150

패키지 설치

flutter pub add video_360

패키지 개요

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

Flutter용 간단한 360도 비디오 플레이어로, 안드로이드에서는 ExoPlayer, iOS에서는 Swifty360Player를 활용합니다. 완전한 구형 시청 기능을 갖춘 몰입형 비디오 재생을 가능하게 하며, VR 콘텐츠에 적합합니다. 이 패키지는 플랫폼별 구현을 추상화하여 개발자에게 통합된 API를 제공합니다. 표준 비디오 형식을 지원하며 최소한의 설정으로 Flutter 앱에 원활하게 통합됩니다. 복잡한 사용자 정의가 필요 없는 기본적인 360도 비디오 기능을 필요로 하는 가벼운 사용 사례에 설계되었습니다.

사용 사례

  • 몰입형 VR 비디오 경험
  • 교육용 360도 투어
  • 가상 부동산 투어
  • 인터랙티브 제품 미리보기
  • 여행 및 관광 콘텐츠

주요 기능

  • 다중 플랫폼 360도 비디오 재생
  • Android(ExoPlayer) 및 iOS(Swifty360Player) 지원
  • Flutter와의 간단한 통합
  • 표준 비디오 형식을 지원합니다
  • 필요한 최소 구성

적합한 대상

  • VR 콘텐츠 앱을 개발하는 개발자
  • 인터랙티브 360도 비디오가 필요한 앱
  • 경량 360도 비디오 솔루션
  • 모바일 중심의 몰입형 경험
  • 360도 비디오 기능 프로토타이핑

고려 사항

  • Android 및 iOS 플랫폼에 한정
  • 웹 또는 데스크톱 지원 없음
  • 네이티브 라이브러리에 의존합니다
  • 고급 컨트롤은 사용자 정의 구현이 필요할 수 있습니다
  • 성능은 기기 및 비디오 해상도에 따라 달라집니다

원본 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

소스 저장소

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

아직 데이터가 없습니다.