video_provider 1.2.2+4

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new73

Video Provider #

Build Status Pub Version

This library enables you to extract mp4 videos from various video providers. Currently supported:

  • Imgur
  • Gfycat
  • Reddit Videos

You can use VideoProvider offline (producing potentially unavailable videos) or CheckedVideoProvider online (which only returns the videos actually available).

More will follow, feel free to make pull requests or raise issues with examples.

Usage #

A simple usage example:

import 'package:video_provider/video_provider.dart';

main() {
  /**
   * If you only care for quick link conversion and want to check the result
   * yourself, use the VideoProvider:
   */
  List<Video> potentialUris = VideoProvider.fromUri(
    Uri.parse("https://i.imgur.com/example.gifv"),
  ).getVideos();

  // prints https://i.imgur.com/example.mp4
  for (var video in potentialUris) print(video.uri);

  /**
   * If you want to make sure the videos provided are actually available,
   * use the CheckedVideoProvider:
   */
  Stream<Video> checkedUris = CheckedVideoProvider.fromUri(
    Uri.parse("https://gfycat.com/ScratchyBarrenDeermouse-mobile"),
  ).getVideos();

  /**
   * Only prints "https://thumbs.gfycat.com/ScratchyBarrenDeermouse-mobile.mp4",
   * as this particular video does not have a HighRes version
   */
  checkedUris.forEach((video) => print(video.uri));
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1.0.0 #

  • Initial version, created by Stagehand

example/example.dart

import 'package:video_provider/video_provider.dart';

main() {
  /**
   * If you only care for quick link conversion and want to check the result
   * yourself, use the VideoProvider:
   */
  List<Video> potentialUris = VideoProvider.fromUri(
    Uri.parse("https://i.imgur.com/example.gifv"),
  ).getVideos();

  // prints https://i.imgur.com/example.mp4
  for (var video in potentialUris) print(video.uri);

  /**
   * If you want to make sure the videos provided are actually available,
   * use the CheckedVideoProvider:
   */
  Stream<Video> checkedUris = CheckedVideoProvider.fromUri(
    Uri.parse("https://gfycat.com/ScratchyBarrenDeermouse-mobile"),
  ).getVideos();

  /**
   * Only prints "https://thumbs.gfycat.com/ScratchyBarrenDeermouse-mobile.mp4",
   * as this particular video does not have a HighRes version
   */
  checkedUris.forEach((video) => print(video.uri));
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  video_provider: ^1.2.2+4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:video_provider/video_provider.dart';
  
Version Uploaded Documentation Archive
1.2.2+4 Apr 7, 2019 Go to the documentation of video_provider 1.2.2+4 Download video_provider 1.2.2+4 archive
1.2.2+3 Apr 2, 2019 Go to the documentation of video_provider 1.2.2+3 Download video_provider 1.2.2+3 archive
1.2.2+2 Apr 1, 2019 Go to the documentation of video_provider 1.2.2+2 Download video_provider 1.2.2+2 archive
1.2.2+1 Mar 27, 2019 Go to the documentation of video_provider 1.2.2+1 Download video_provider 1.2.2+1 archive
1.2.2 Mar 27, 2019 Go to the documentation of video_provider 1.2.2 Download video_provider 1.2.2 archive
1.2.1 Mar 27, 2019 Go to the documentation of video_provider 1.2.1 Download video_provider 1.2.1 archive
1.2.0 Mar 27, 2019 Go to the documentation of video_provider 1.2.0 Download video_provider 1.2.0 archive
1.1.1 Mar 25, 2019 Go to the documentation of video_provider 1.1.1 Download video_provider 1.1.1 archive
1.1.0 Mar 25, 2019 Go to the documentation of video_provider 1.1.0 Download video_provider 1.1.0 archive
1.0.2 Mar 25, 2019 Go to the documentation of video_provider 1.0.2 Download video_provider 1.0.2 archive

All 12 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
46
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
73
Learn more about scoring.

We analyzed this package on Apr 12, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:video_provider/video_provider.dart.

Health issues and suggestions

Document public APIs. (-0.06 points)

30 out of 31 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
http ^0.11.3+14 0.11.3+17 0.12.0+2
Transitive dependencies
async 2.2.0
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.7
path 1.6.2
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
pedantic ^1.0.0
test ^1.0.0