Skip to content

Latest commit

 

History

History
60 lines (36 loc) · 1.71 KB

README.md

File metadata and controls

60 lines (36 loc) · 1.71 KB

DWGNicoVideoExtractor

CI Status Version License Platform

DWGNicoVideoExtractor is a Nico Nico Douga (nicovideo.jp) video URL extractor for iOS.

Screenshot

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • Runs on iOS 6.0 and later

Installation

DWGNicoVideoExtractor is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "DWGNicoVideoExtractor"

Example

NSString *videoID = @"sm23538930";
[DWGNicoVideoExtractor fetchVideoURLFromID:videoID completion:^(NSURL *videoURL, NSError *error) {
    if (error) {
        NSLog(@"%@", error);
        return;
    }

    MPMoviePlayerViewController *vc = [[MPMoviePlayerViewController alloc] initWithContentURL:videoURL];
    [vc.moviePlayer prepareToPlay];
    [vc.moviePlayer play];
    [self presentMoviePlayerViewControllerAnimated:vc];
}];

Restriction

  • Supports embedable videos only
  • Does not support iPhone simulator

TODO

  • Tests

License

DWGNicoVideoExtractor is available under the MIT license. See the LICENSE file for more info.