पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv0.0.11

video_360

सरल 360 डिग्री वीडियो प्लेयर (एंड्रॉइड - एक्सोप्लेयर, आईओएस - स्विफ्टी360प्लेयर)

AndroidiOS
30-दिन डाउनलोड
755
लाइक
26
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add video_360

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

एक सरल 360-डिग्री वीडियो प्लेयर फ्लटर के लिए, एंड्रॉइड पर ExoPlayer का उपयोग करता है और iOS पर Swifty360Player का उपयोग करता है। यह आवर्धन वीडियो प्लेबैक के साथ पूर्ण गोलाकार दृश्य क्षमता को संभव बनाता है, जो VR सामग्री के लिए आदर्श है। पैकेज प्लेटफॉर्म-विशिष्ट कार्यान्वयन को अब्स्ट्रैक्ट करता है, डेवलपर्स के लिए एक एकीकृत API प्रदान करता है। यह मानक वीडियो फॉर्मेट का समर्थन करता है और न्यूनतम सेटअप के साथ फ्लटर ऐप्स में बिना किसी दिक्कत के एकीकृत हो जाता है। जटिल कस्टमाइज़ेशन के बिना मूल 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

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।