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

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

flutter_torrent_streamer

टॉरेंट/मैग्नेट लिंक से वीडियो को सीधे प्रसारित करने के लिए एक फ्लटर प्लगइन।

30-दिन डाउनलोड
36
लाइक
29
Pub अंक
30

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

flutter pub add flutter_torrent_streamer

पैकेज अवलोकन

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

एक फ्लटर प्लगइन जो टॉरेंट और मैग्नेट लिंक से वीडियो के सीधे स्ट्रीमिंग की अनुमति देता है। यह पीयर-टू-पीयर तकनीक का उपयोग करके पूर्ण डाउनलोड के बिना सामग्री को प्राप्त और प्ले करता है, हल्के मीडिया उपभोग के लिए आदर्श है। प्लगइन को फ्लटर ऐप्स में आसानी से एकीकृत किया जा सकता है, जो वैध टॉरेंट या मैग्नेट URL से स्ट्रीम शुरू करने के लिए एक सरल API प्रदान करता है। न्यूनतम सेटअप के साथ डिज़ाइन किया गया, यह डाउनलोड के दौरान रियल-टाइम प्ले बैक का समर्थन करता है, जिससे यह ऑन-डिमांड वीडियो एप्लिकेशन के लिए उपयुक्त है।

उपयोग

  • टॉरेंट लिंक से स्ट्रीमिंग वीडियो
  • मैग्नेट यूआरएल के माध्यम से मीडिया प्ले करना
  • हल्के वीडियो प्लेयर बनाना
  • ऑफलाइन-तैयार स्ट्रीमिंग सक्षम करें
  • P2P वीडियो प्लेबैक का एकीकरण

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

  • प्रत्यक्ष टोरेंट/मैग्नेट प्रसारण
  • डाउनलोड के दौरान रीयल-टाइम प्लेबैक
  • न्यूनतम एकीकरण प्रयास
  • प्लेटफॉर्म के अनुकूलता
  • टॉरेंट फ़ाइल्स और मैग्नेट लिंक्स दोनों का समर्थन करता है

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

  • मीडिया ऐप विकासकर्ता
  • P2P स्ट्रीमिंग एप्लिकेशन
  • आवश्यकता के अनुसार वीडियो प्लेटफॉर्म
  • कम स्टोरेज मीडिया एक्सेस की आवश्यकता वाले ऐप्स
  • सरल टॉरेंट एकीकरण की तलाश में विकासकर्ता

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

  • स्थिर इंटरनेट कनेक्शन की आवश्यकता है
  • ट्रैकर उपलब्धता पर निर्भर करता है
  • कुछ क्षेत्रों में कानूनी प्रतिबंधों का सामना करना पड़ सकता है
  • प्रदर्शन नेटवर्क की स्थिति के अनुसार बदलता है
  • कोई बिल्ट-इन टॉरेंट सीडिंग कार्यक्षमता नहीं है

मूल README

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

Flutter Torrent Streamer

pub

A flutter plugin to stream videos directly from torrent/magnet links.

This plugin is still under development and pull requests to make it better are heavily appreciated

Few Important points to note before using this plugin

  • Has only android support for now. (Help to implement iOS support is highly appreciated)
  • Is still under development and APIs may go through breaking changes.
  • Supports streaming and seeking videos while still being downloaded but is still experimental and has been tested to work on MX Player but does not work with video_player plugin.

Installation

Add below line to your pubspec.yaml and run flutter packages get

flutter_torrent_streamer: ^0.0.2

Example

import 'package:flutter_torrent_streamer/flutter_torrent_streamer.dart';  
  
class TorrentStreamerView extends StatefulWidget {
  @override _TorrentStreamerViewState createState() => _TorrentStreamerViewState();
}  
  
class _TorrentStreamerViewState extends State<TorrentStreamerView> {
  bool isStreamReady = false;
  int progress = 0;
  
  @override  
  void initState() {
    super.initState();
    _addTorrentListeners();
  }
  
  void _addTorrentListeners() {
    TorrentStreamer.addEventListener('progress', (data) {
      setState(() => progress = data['progress']);
    });
    
    TorrentStreamer.addEventListener('ready', (_) {
      setState(() => isStreamReady = true);
    });
  }
    
  Future<void> _startDownload() async {
    await TorrentStreamer.start('torrent-link-here');
  }
  
  Future<void> _openVideo(BuildContext context) async {
    if (progress == 100) {
      await TorrentStreamer.launchVideo();
    } else {
      showDialog(
        builder: (BuildContext context) {
          return AlertDialog(
            title: new Text('Are You Sure?'),
            content: new Text('Playing video while it is still downloading is experimental and only works on limited set of apps.'),
            actions: <Widget>[
              FlatButton(
               child: new Text("Cancel"),
                onPressed: () {
                  Navigator.of(context).pop();
                }
              ),
              FlatButton(
                child: new Text("Yes, Proceed"),
                onPressed: () async {
                  await TorrentStreamer.launchVideo();
                  Navigator.of(context).pop();
                }
              )
            ]
          );
        },
        context: context
      );
    }
  }
 
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Column(
        children: <Widget>[
          RaisedButton(
            child: Text('Start Download'),
            onPress: _startDownload
          ),
          Container(height: 8),
          RaisedButton(
	        child: Text('Play Video'),
	        onPress: () => _openVideo(context)
	      )
	    ],
	    crossAxisAlignment: CrossAxisAlignment.center,
	    mainAxisAlignment: MainAxisAlignment.start,
	    mainAxisSize: MainAxisSize.max
	  ),
	  padding: EdgeInsets.all(16)
    );
  }
}  

See example app for more detailed usage.

Using in release builds

If you are using proguard in your app then add the below 2 lines to your proguard rules:

-keep class com.frostwire.jlibtorrent.swig.libtorrent_jni {*;}
-keep class com.frostwire.jlibtorrent.swig.** { *; }

TODO

  • Add support for video_player flutter plugin.
  • Make streaming and seeking more robust for while download still in progress.
  • Run torrent streamer server on local network instead of localhost.
  • Add support for iOS.

श्रेणियाँ

निर्भरताएँ

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

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

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

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