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

पैकेज विवरणv1.30.0

better_player

उन्नत वीडियो प्लेयर। यह कई सामान्य उपयोग मामलों को हल करता है और चलाने में आसान है।

30-दिन डाउनलोड
6.4 हज़ार
लाइक
1.3 हज़ार
Pub अंक
160

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

flutter pub add better_player

पैकेज अवलोकन

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

Better Player एक उन्नत वीडियो प्लेयर है जो Flutter के लिए है, जो सामान्य वीडियो प्लेबैक चुनौतियों को एक सरल, समझने में आसान API के साथ हल करता है। इसमें विभिन्न प्रकार के स्ट्रीमिंग प्रोटोकॉल, एडाप्टिव बिटरेट स्ट्रीमिंग का समर्थन है और कस्टमाइज़ेबल UI घटक प्रदान करता है। उपयोग में आसान डिज़ाइन के साथ, यह विकासकर्ताओं को विभिन्न प्लेटफॉर्मों पर विश्वसनीय वीडियो प्लेबैक कार्यक्षमता तेजी से लागू करने में सक्षम बनाता है। पैकेज अच्छी तरह से दस्तावेज़ित है और सक्रिय रूप से बनाए रखा जा रहा है, जिससे यह उच्च गुणवत्ता वाले वीडियो अनुभव की आवश्यकता वाले ऐप्स के लिए आदर्श है।

उपयोग

  • स्ट्रीमिंग वीडियो सामग्री
  • अनुकूलित बीटरेट प्ले बैक
  • कस्टम वीडियो यूआई
  • ऑफलाइन वीडियो प्ले बैक
  • लाइव वीडियो स्ट्रीमिंग

मुख्य विशेषताएँ

  • कई वीडियो प्रारूपों का समर्थन
  • निर्मित नियंत्रण और गीत
  • विस्तारयोग्य विजेट प्रणाली
  • कम लेटेंसी प्लेबैक
  • HLS और DASH के साथ एकीकरण

इनके लिए उपयुक्त

  • वीडियो-भारी एप्लिकेशन
  • शैक्षिक प्लेटफॉर्म
  • मीडिया स्ट्रीमिंग सेवाएं
  • आवश्यकता के अनुसार वीडियो ऐप्स
  • लाइव इवेंट ब्रॉडकास्टिंग

विचार योग्य बातें

  • उन्नत विशेषताओं के लिए अतिरिक्त सेटअप की आवश्यकता होती है
  • सीमित प्लेटफॉर्म-विशिष्ट कस्टमाइज़ेशन
  • बाह्य निर्भरताओं पर निर्भर करता है
  • एप्लिकेशन के आकार में वृद्धि हो सकती है
  • नेटवर्क अनुमतियों का सही तरीके से निपटान की आवश्यकता है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Better Player

pub package pub package pub package

Better Player handles the complex video playback edge cases so you don't have to. Originally based on video_player, it's now fully independent. It tackles HLS, DRM, and caching out of the box.

[IMPORTANT] Migrating from 0.0.84 to 1.x.x? See the Migration Guides section below.


📱 Visual Showcase

Default Controls Settings Menu Audio Tracks Event Listener

🏆 vs Competitors

Why choose Better Player? Here is how it stacks up against the alternatives.

Feature Better Player video_player chewie media_kit
Engine ExoPlayer/AVPlayer/Shaka ExoPlayer/AVPlayer video_player libmpv
UI Controls ✅ Built-in & Customizable ❌ None ✅ Built-in ✅ Built-in
HLS / DASH ✅ Native ⚠️ Basic ⚠️ Basic ✅ Native
DRM Support ✅ Widevine/FairPlay/ClearKey ❌ None ❌ None ❌ None
Subtitles ✅ Advanced (WebVTT, HTML, SRT) ⚠️ Basic (SRT only) ⚠️ Basic ✅ Advanced
Caching ✅ Built-in ❌ None ❌ None ❌ None
Playlists ✅ Built-in ❌ None ❌ None ✅ Built-in

🚀 Key Features

  • Adaptive Streaming: Play HLS, DASH, and Smooth Streaming with automatic track selection.
  • DRM Support: Protect your content with Widevine, FairPlay, and ClearKey.
  • Smart Caching: Cache videos for seamless offline playback.
  • Picture in Picture (PiP): Keep videos playing while users multitask.
  • Advanced Subtitles: Parse SRT and WebVTT, including HTML tags.

📦 Quick Start

1. Add dependency

Add Better Player to your pubspec.yaml:

dependencies:
  better_player: ^1.10.0
2. Basic Usage

Use the network factory to get a player up and running fast.

import 'package:better_player/better_player.dart';

// Inside your build method
AspectRatio(
  aspectRatio: 16 / 9,
  child: BetterPlayer.network(
    "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
    betterPlayerConfiguration: PlayerConfiguration(
      aspectRatio: 16 / 9,
      looping: true,
      autoPlay: true,
    ),
  ),
)
3. Advanced Controller Usage

Need full control? Initialize a BetterPlayerController manually.

BetterPlayerController _controller = BetterPlayerController(
    const PlayerConfiguration(),
    betterPlayerDataSource: PlayerDataSource(
        DataSourceType.network,
        "https://example.com/video.mp4",
    ),
);

BetterPlayer(controller: _controller)

🤖 AI Agent Quick Reference

Writing a script or prompt? Feed this to your AI to get the right code on the first try.

  • Initialization: Always initialize BetterPlayerController in initState() with a PlayerConfiguration and PlayerDataSource.
  • Core Classes:
    • BetterPlayerController: Manages state and configuration.
    • PlayerDataSource: Wraps video URL, DRM config, subtitles, headers.
    • PlayerConfiguration: UI, looping, autoPlay, aspect ratio.
    • PlayerControlsConfiguration: Colors, icons, padding for the control bar.
  • Subtitles: Pass PlayerSubtitlesSource directly into PlayerDataSource.
  • Disposal: Default is autoDispose: true. Avoid manual controller.dispose() unless you opt out.

🔄 Migration Guides

Moving from another package? Follow these guides:


📖 Resources


🤝 Contributing

Bugs? Feature requests? Open an issue. Better yet, submit a PR.

💼 Enterprise Support

Need a custom video source adapter, bespoke DRM implementation, or tailored UI controls? I'm available for consulting.

Let's talk on LinkedIn →

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 17 आइटम

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

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