From e179efc395ea8f287a9a9acb1b4b1398e92e24ce Mon Sep 17 00:00:00 2001 From: SoneeJohn Date: Sun, 27 Dec 2015 10:57:34 -0400 Subject: [PATCH 01/26] Change `streamURLs` to contain NSURLs instead of NSStrings --- YTVimeoExtractor/YTVimeoVideo.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/YTVimeoExtractor/YTVimeoVideo.m b/YTVimeoExtractor/YTVimeoVideo.m index beddfbf..01bdfc5 100644 --- a/YTVimeoExtractor/YTVimeoVideo.m +++ b/YTVimeoExtractor/YTVimeoVideo.m @@ -72,11 +72,12 @@ - (void)extractVideoInfoWithCompletionHandler:(void (^)(NSError *error))completi NSInteger quality = [[info valueForKey:@"quality"]integerValue]; NSString *urlString = info[@"url"]; + NSURL *url = [NSURL URLWithString:urlString]; //Only if the file is playable on OS X or iOS natively if([urlString rangeOfString:@".mp4"].location != NSNotFound){ - streamURLs[@(quality)] = urlString; + streamURLs[@(quality)] = url; } } From 385ae372660f52a0061b3c73f7d5df0cd5b33cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Sun, 27 Dec 2015 11:06:05 -0400 Subject: [PATCH 02/26] Change `thumbnailURLs` to contain NSURLs instead of NSStrings --- YTVimeoExtractor/YTVimeoVideo.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/YTVimeoExtractor/YTVimeoVideo.m b/YTVimeoExtractor/YTVimeoVideo.m index 01bdfc5..d188e43 100644 --- a/YTVimeoExtractor/YTVimeoVideo.m +++ b/YTVimeoExtractor/YTVimeoVideo.m @@ -98,7 +98,8 @@ - (void)extractVideoInfoWithCompletionHandler:(void (^)(NSError *error))completi for (NSString *key in thumbnailsInfo) { NSInteger thumbnailquality = [key integerValue]; - NSString *thumbnailURL = thumbnailsInfo[key]; + NSString *thumbnailString = thumbnailsInfo[key]; + NSURL *thumbnailURL = [NSURL URLWithString:thumbnailString]; thumbnailURLs [@(thumbnailquality)] = thumbnailURL; } From aa90fdc32b0e27d267a1d71576010e0cbf2df084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Sun, 27 Dec 2015 11:11:55 -0400 Subject: [PATCH 03/26] Add support for generics --- YTVimeoExtractor/YTVimeoVideo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YTVimeoExtractor/YTVimeoVideo.h b/YTVimeoExtractor/YTVimeoVideo.h index 6fc40ab..9779ff7 100644 --- a/YTVimeoExtractor/YTVimeoVideo.h +++ b/YTVimeoExtractor/YTVimeoVideo.h @@ -104,12 +104,12 @@ typedef NS_ENUM(NSUInteger, YTVimeoVideoQuality) { * A `NSDictionary` object that contains the various stream URLs. * @see YTVimeoVideoQuality */ -@property (nonatomic, readonly) NSDictionary *__nullable streamURLs; +@property (nonatomic, readonly) NSDictionary *__nullable streamURLs; /** * A `NSDictionary` object that contains the various thumbnail URLs. * @see YTVimeoVideoThumbnailQuality */ -@property (nonatomic, readonly) NSDictionary *__nullable thumbnailURLs; +@property (nonatomic, readonly) NSDictionary *__nullable thumbnailURLs; /** * A `NSDictionary` object that contains all the metadata about the video. */ From 452f9d512d869298a72101a407ab57e9567ea5ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Sun, 27 Dec 2015 11:19:04 -0400 Subject: [PATCH 04/26] Update build status image --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 30bb9e9..3371bab 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## YTVimeoExtractor -[![Build Status](https://travis-ci.org/SoneeJohn/YTVimeoExtractor.svg?branch=v1.0.0-develop)](https://travis-ci.org/SoneeJohn/YTVimeoExtractor) +[![Build Status](https://travis-ci.org/lilfaf/YTVimeoExtractor.svg?branch=development)](https://travis-ci.org/lilfaf/YTVimeoExtractor) YTVimeoExtractor extracts the MP4 streams of Vimeo videos, which then can be used to play via a `MPMoviePlayerViewController` or `AVPlayerView`. From d80f87b5e3f51dca8dbf8395278f5f706c2ad2a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Sun, 27 Dec 2015 11:46:01 -0400 Subject: [PATCH 05/26] Add two convenience methods - These are used to quickly extract specific streams. For example, you can now quickly get the highest stream URL or the lowest stream URL. --- YTVimeoExtractor/YTVimeoVideo.h | 14 ++++++++++++++ YTVimeoExtractor/YTVimeoVideo.m | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/YTVimeoExtractor/YTVimeoVideo.h b/YTVimeoExtractor/YTVimeoVideo.h index 9779ff7..aac4c9a 100644 --- a/YTVimeoExtractor/YTVimeoVideo.h +++ b/YTVimeoExtractor/YTVimeoVideo.h @@ -114,5 +114,19 @@ typedef NS_ENUM(NSUInteger, YTVimeoVideoQuality) { * A `NSDictionary` object that contains all the metadata about the video. */ @property (nonatomic, readonly) NSDictionary *__nullable metaData; +/** + * Convenience method to get the highest quality stream URL. + * + * @see YTVimeoVideoQuality + * @return The highest quality stream URL. + */ +-(NSURL *__nullable)highestQualityStreamURL; +/** + * Convenience method to get the lowest quality stream URL. + * + * @see YTVimeoVideoQuality + * @return The lowest quality stream URL. + */ +-(NSURL *__nullable)lowestQualityStreamURL; @end diff --git a/YTVimeoExtractor/YTVimeoVideo.m b/YTVimeoExtractor/YTVimeoVideo.m index d188e43..05a5d8a 100644 --- a/YTVimeoExtractor/YTVimeoVideo.m +++ b/YTVimeoExtractor/YTVimeoVideo.m @@ -110,6 +110,20 @@ - (void)extractVideoInfoWithCompletionHandler:(void (^)(NSError *error))completi }); } +#pragma mark - +-(NSURL *)highestQualityStreamURL{ + + NSURL *url = self.streamURLs[@(YTVimeoVideoQualityHD1080)] ?: self.streamURLs[@(YTVimeoVideoQualityHD720)] ?: self.streamURLs [@(YTVimeoVideoQualityMedium480)]?: self.streamURLs[@(YTVimeoVideoQualityMedium360)]?:self.streamURLs[@(YTVimeoVideoQualityLow270)]; + + return url; +} + +-(NSURL *)lowestQualityStreamURL{ + + NSURL *url = self.streamURLs[@(YTVimeoVideoQualityLow270)] ?: self.streamURLs[@(YTVimeoVideoQualityMedium360)] ?: self.streamURLs [@(YTVimeoVideoQualityMedium480)]?: self.streamURLs[@(YTVimeoVideoQualityHD720)]?:self.streamURLs[@(YTVimeoVideoQualityHD1080)]; + + return url; +} #pragma mark - NSObject - (NSString *) description From 404f8ec2a3274913daee85863e2de97f602e2845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Sun, 27 Dec 2015 11:59:52 -0400 Subject: [PATCH 06/26] Add test for convenience methods --- YTVimeoExtractorTests/YTVimeoVideoTestCase.m | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/YTVimeoExtractorTests/YTVimeoVideoTestCase.m b/YTVimeoExtractorTests/YTVimeoVideoTestCase.m index a7c5f6b..f46a28b 100644 --- a/YTVimeoExtractorTests/YTVimeoVideoTestCase.m +++ b/YTVimeoExtractorTests/YTVimeoVideoTestCase.m @@ -80,6 +80,35 @@ -(void)testThumbnails{ [self waitForExpectationsWithTimeout:15 handler:nil]; } +-(void)testConvenienceMethods{ + __weak XCTestExpectation *expectation = [self expectationWithDescription:@""]; + + NSString *filePath = [[[NSBundle bundleForClass:[self class]] resourcePath] stringByAppendingPathComponent:@"testdata.plist"]; + + NSData *buffer = [NSData dataWithContentsOfFile:filePath]; + NSDictionary *myDictionary = (NSDictionary*) [NSKeyedUnarchiver unarchiveObjectWithData:buffer]; + + YTVimeoVideo *video = [[YTVimeoVideo alloc]initWithIdentifier:@"147318819" info:myDictionary]; + + [video extractVideoInfoWithCompletionHandler:^(NSError * _Nullable error) { + + XCTAssertNotNil(video.streamURLs); + + NSURL *highestURL = video.streamURLs[@(YTVimeoVideoQualityHD1080)] ?: video.streamURLs[@(YTVimeoVideoQualityHD720)] ?: video.streamURLs [@(YTVimeoVideoQualityMedium480)]?: video.streamURLs[@(YTVimeoVideoQualityMedium360)]?:video.streamURLs[@(YTVimeoVideoQualityLow270)]; + + NSURL *lowestURL = video.streamURLs[@(YTVimeoVideoQualityLow270)] ?: video.streamURLs[@(YTVimeoVideoQualityMedium360)] ?: video.streamURLs[@(YTVimeoVideoQualityMedium480)]?: video.streamURLs[@(YTVimeoVideoQualityHD720)]?:video.streamURLs[@(YTVimeoVideoQualityHD1080)]; + + XCTAssertEqual(highestURL, [video highestQualityStreamURL]); + + XCTAssertEqual(lowestURL, [video lowestQualityStreamURL]); + + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:15 handler:nil]; +} + /* -(void)testUnsuitableStreamThatAlsoHasSuitableStreams{ __weak XCTestExpectation *expectation = [self expectationWithDescription:@""]; From 458a747cf74cd88ba2ce31e1556e88e95c1a451e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Sun, 27 Dec 2015 12:17:07 -0400 Subject: [PATCH 07/26] Update Demo Projects --- .../YTVimeoExtractor OS X Demo/ViewController.m | 8 +++++--- .../YTVimeoExtractor iOS Demo/ViewController.m | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/YTVimeoExtractor Demo/YTVimeoExtractor OS X Demo/ViewController.m b/YTVimeoExtractor Demo/YTVimeoExtractor OS X Demo/ViewController.m index 10511fc..df4d90c 100644 --- a/YTVimeoExtractor Demo/YTVimeoExtractor OS X Demo/ViewController.m +++ b/YTVimeoExtractor Demo/YTVimeoExtractor OS X Demo/ViewController.m @@ -29,12 +29,14 @@ - (IBAction)playAction:(id)sender { [self.titleTextField setStringValue:video.title]; - NSDictionary *streamURLs = video.streamURLs; + //Will get the lowest available quality. + //NSURL *lowQualityURL = [video lowestQualityStreamURL]; + //Will get the highest available quality. - NSString *url = streamURLs[@(YTVimeoVideoQualityHD1080)] ?: streamURLs[@(YTVimeoVideoQualityHD720)] ?: streamURLs [@(YTVimeoVideoQualityMedium480)]?: streamURLs[@(YTVimeoVideoQualityMedium360)]?:streamURLs[@(YTVimeoVideoQualityLow270)]; + NSURL *highQualityURL = [video highestQualityStreamURL]; - AVPlayer *player = [[AVPlayer alloc]initWithURL:[NSURL URLWithString:url]]; + AVPlayer *player = [[AVPlayer alloc]initWithURL:highQualityURL]; self.playerView.player = player; self.playerView.videoGravity = AVLayerVideoGravityResizeAspectFill; diff --git a/YTVimeoExtractor Demo/YTVimeoExtractor iOS Demo/ViewController.m b/YTVimeoExtractor Demo/YTVimeoExtractor iOS Demo/ViewController.m index 8978e57..9028371 100644 --- a/YTVimeoExtractor Demo/YTVimeoExtractor iOS Demo/ViewController.m +++ b/YTVimeoExtractor Demo/YTVimeoExtractor iOS Demo/ViewController.m @@ -35,12 +35,13 @@ -(IBAction)playVideoAction:(id)sender{ if (video) { self.titleLabel.text = [NSString stringWithFormat:@"Video Title: %@",video.title]; - NSDictionary *streamURLs = video.streamURLs; + //Will get the lowest available quality. + //NSURL *lowQualityURL = [video lowestQualityStreamURL]; + //Will get the highest available quality. - NSString *url = streamURLs[@(YTVimeoVideoQualityHD1080)] ?: streamURLs[@(YTVimeoVideoQualityHD720)] ?: streamURLs [@(YTVimeoVideoQualityMedium480)]?: streamURLs[@(YTVimeoVideoQualityMedium360)]?:streamURLs[@(YTVimeoVideoQualityLow270)]; + NSURL *highQualityURL = [video highestQualityStreamURL]; - NSURL *movieURL = [NSURL URLWithString:url]; - MPMoviePlayerViewController *moviePlayerViewController = [[MPMoviePlayerViewController alloc]initWithContentURL:movieURL]; + MPMoviePlayerViewController *moviePlayerViewController = [[MPMoviePlayerViewController alloc]initWithContentURL:highQualityURL]; [self presentMoviePlayerViewControllerAnimated:moviePlayerViewController]; }else{ From 0da03199a5862b425e2fccb7a7d57a9a3a8e4326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Sun, 27 Dec 2015 12:19:56 -0400 Subject: [PATCH 08/26] Update README.md To reflect new convenience methods. --- README.md | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 3371bab..16e9112 100644 --- a/README.md +++ b/README.md @@ -43,20 +43,26 @@ Use the two block methods in the `YTVimeoExtractor` class. Both methods will cal ### OS X Example ```objc -[[YTVimeoExtractor sharedExtractor]fetchVideoWithVimeoURL:@"https://vimeo.com/channels/staffpicks/147876560" withReferer:nil completionHandler:^(YTVimeoVideo * _Nullable video, NSError * _Nullable error) { +[[YTVimeoExtractor sharedExtractor]fetchVideoWithVimeoURL:self.urlTextField.stringValue withReferer:nil completionHandler:^(YTVimeoVideo * _Nullable video, NSError * _Nullable error) { if (video) { - NSDictionary *streamURLs = video.streamURLs; + [self.titleTextField setStringValue:video.title]; + + //Will get the lowest available quality. + //NSURL *lowQualityURL = [video lowestQualityStreamURL]; + //Will get the highest available quality. - NSString *url = streamURLs[@(YTVimeoVideoQualityHD1080)] ?: streamURLs[@(YTVimeoVideoQualityHD720)] ?: streamURLs [@(YTVimeoVideoQualityMedium480)]?: streamURLs[@(YTVimeoVideoQualityMedium360)]?:streamURLs[@(YTVimeoVideoQualityLow270)]; + NSURL *highQualityURL = [video highestQualityStreamURL]; + - AVPlayer *player = [[AVPlayer alloc]initWithURL:[NSURL URLWithString:url]]; + AVPlayer *player = [[AVPlayer alloc]initWithURL:highQualityURL]; self.playerView.player = player; self.playerView.videoGravity = AVLayerVideoGravityResizeAspectFill; [self.playerView.player play]; - + [self.playerView becomeFirstResponder]; + }else{ [[NSAlert alertWithError:error]runModal]; @@ -64,23 +70,26 @@ Use the two block methods in the `YTVimeoExtractor` class. Both methods will cal }]; + ``` ### iOS Example ```objc - [[YTVimeoExtractor sharedExtractor]fetchVideoWithVimeoURL:@"https://vimeo.com/channels/staffpicks/147876560" withReferer:nil completionHandler:^(YTVimeoVideo * _Nullable video, NSError * _Nullable error) { + [[YTVimeoExtractor sharedExtractor]fetchVideoWithVimeoURL:self.urlField.text withReferer:nil completionHandler:^(YTVimeoVideo * _Nullable video, NSError * _Nullable error) { if (video) { - NSDictionary *streamURLs = video.streamURLs; + self.titleLabel.text = [NSString stringWithFormat:@"Video Title: %@",video.title]; + //Will get the lowest available quality. + //NSURL *lowQualityURL = [video lowestQualityStreamURL]; + //Will get the highest available quality. - NSString *url = streamURLs[@(YTVimeoVideoQualityHD1080)] ?: streamURLs[@(YTVimeoVideoQualityHD720)] ?: streamURLs [@(YTVimeoVideoQualityMedium480)]?: streamURLs[@(YTVimeoVideoQualityMedium360)]?:streamURLs[@(YTVimeoVideoQualityLow270)]; + NSURL *highQualityURL = [video highestQualityStreamURL]; - NSURL *movieURL = [NSURL URLWithString:url]; - MPMoviePlayerViewController *moviePlayerViewController = [[MPMoviePlayerViewController alloc]initWithContentURL:movieURL]; - + MPMoviePlayerViewController *moviePlayerViewController = [[MPMoviePlayerViewController alloc]initWithContentURL:highQualityURL]; + [self presentMoviePlayerViewControllerAnimated:moviePlayerViewController]; }else{ @@ -105,12 +114,13 @@ If the Vimeo video has domain-level restrictions and can only be played from par if (video) { - NSDictionary *streamURLs = video.streamURLs; + //Will get the lowest available quality. + //NSURL *lowQualityURL = [video lowestQualityStreamURL]; + //Will get the highest available quality. - NSString *url = streamURLs[@(YTVimeoVideoQualityHD1080)] ?: streamURLs[@(YTVimeoVideoQualityHD720)] ?: streamURLs [@(YTVimeoVideoQualityMedium480)]?: streamURLs[@(YTVimeoVideoQualityMedium360)]?:streamURLs[@(YTVimeoVideoQualityLow270)]; + NSURL *highQualityURL = [video highestQualityStreamURL]; - NSURL *movieURL = [NSURL URLWithString:url]; - MPMoviePlayerViewController *moviePlayerViewController = [[MPMoviePlayerViewController alloc]initWithContentURL:movieURL]; + MPMoviePlayerViewController *moviePlayerViewController = [[MPMoviePlayerViewController alloc]initWithContentURL:highQualityURL]; [self presentMoviePlayerViewControllerAnimated:moviePlayerViewController]; }else{ From 61b074b844fab5edbd36ad01c83f23493f469e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Sun, 27 Dec 2015 12:21:48 -0400 Subject: [PATCH 09/26] Update CFBundleVersion to 1.0.1 --- YTVimeoExtractor/Info.plist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YTVimeoExtractor/Info.plist b/YTVimeoExtractor/Info.plist index 0bff09c..007954e 100644 --- a/YTVimeoExtractor/Info.plist +++ b/YTVimeoExtractor/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.0 + 1.0.1 CFBundleSignature ???? CFBundleVersion - $(CURRENT_PROJECT_VERSION) + 1.0.1 NSHumanReadableCopyright Copyright © 2015 Louis Larpin. All rights reserved. NSPrincipalClass From 51845c428b3b2d105ce621399de2929ebb6b9742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Tue, 29 Dec 2015 12:48:52 -0400 Subject: [PATCH 10/26] Update YTVimeoExtractor.podspec --- YTVimeoExtractor.podspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/YTVimeoExtractor.podspec b/YTVimeoExtractor.podspec index d46b506..f42d66a 100644 --- a/YTVimeoExtractor.podspec +++ b/YTVimeoExtractor.podspec @@ -9,7 +9,8 @@ Pod::Spec.new do |s| DESC s.homepage = "https://github.com/lilfaf/YTVimeoExtractor" s.license = { :type => 'MIT', :file => 'LICENSE' } - s.author = { "Louis Larpin" => "louis.larpin@gmail.com" } + s.authors = { "Louis Larpin" => "louis.larpin@gmail.com", + "Soneé John" => "sonee@alphasoftware"} } s.source = { :git => "https://github.com/lilfaf/YTVimeoExtractor.git", :tag => "1.0.0" } s.ios.deployment_target = '7.0' From 162072f63714c2ba86bdbb18e2eddc31e01a370b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Tue, 29 Dec 2015 12:52:05 -0400 Subject: [PATCH 11/26] Update YTVimeoExtractor.podspec --- YTVimeoExtractor.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YTVimeoExtractor.podspec b/YTVimeoExtractor.podspec index f42d66a..c4e874c 100644 --- a/YTVimeoExtractor.podspec +++ b/YTVimeoExtractor.podspec @@ -9,8 +9,8 @@ Pod::Spec.new do |s| DESC s.homepage = "https://github.com/lilfaf/YTVimeoExtractor" s.license = { :type => 'MIT', :file => 'LICENSE' } - s.authors = { "Louis Larpin" => "louis.larpin@gmail.com", - "Soneé John" => "sonee@alphasoftware"} } + s.authors = { 'Louis Larpin' => 'louis.larpin@gmail.com', + 'Soneé John' => 'sonee@alphasoftware'} } s.source = { :git => "https://github.com/lilfaf/YTVimeoExtractor.git", :tag => "1.0.0" } s.ios.deployment_target = '7.0' From 2eb36c625671a22bd8d85c65042a15b4cdc4d521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Fri, 29 Jan 2016 08:50:21 -0400 Subject: [PATCH 12/26] Revert "Update YTVimeoExtractor.podspec" This reverts commit 162072f63714c2ba86bdbb18e2eddc31e01a370b. --- YTVimeoExtractor.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YTVimeoExtractor.podspec b/YTVimeoExtractor.podspec index c4e874c..f42d66a 100644 --- a/YTVimeoExtractor.podspec +++ b/YTVimeoExtractor.podspec @@ -9,8 +9,8 @@ Pod::Spec.new do |s| DESC s.homepage = "https://github.com/lilfaf/YTVimeoExtractor" s.license = { :type => 'MIT', :file => 'LICENSE' } - s.authors = { 'Louis Larpin' => 'louis.larpin@gmail.com', - 'Soneé John' => 'sonee@alphasoftware'} } + s.authors = { "Louis Larpin" => "louis.larpin@gmail.com", + "Soneé John" => "sonee@alphasoftware"} } s.source = { :git => "https://github.com/lilfaf/YTVimeoExtractor.git", :tag => "1.0.0" } s.ios.deployment_target = '7.0' From 079a779568492e08f7edab6329ce5c3fdae85995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Fri, 29 Jan 2016 08:50:28 -0400 Subject: [PATCH 13/26] Revert "Update YTVimeoExtractor.podspec" This reverts commit 51845c428b3b2d105ce621399de2929ebb6b9742. --- YTVimeoExtractor.podspec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/YTVimeoExtractor.podspec b/YTVimeoExtractor.podspec index f42d66a..d46b506 100644 --- a/YTVimeoExtractor.podspec +++ b/YTVimeoExtractor.podspec @@ -9,8 +9,7 @@ Pod::Spec.new do |s| DESC s.homepage = "https://github.com/lilfaf/YTVimeoExtractor" s.license = { :type => 'MIT', :file => 'LICENSE' } - s.authors = { "Louis Larpin" => "louis.larpin@gmail.com", - "Soneé John" => "sonee@alphasoftware"} } + s.author = { "Louis Larpin" => "louis.larpin@gmail.com" } s.source = { :git => "https://github.com/lilfaf/YTVimeoExtractor.git", :tag => "1.0.0" } s.ios.deployment_target = '7.0' From e0e7b76348ed2a9a2de1c226068fa4dddfd3a46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Fri, 29 Jan 2016 08:57:59 -0400 Subject: [PATCH 14/26] Update README.md --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 9010045..b69d958 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,8 @@ ## YTVimeoExtractor -<<<<<<< HEAD -[![Build Status](https://travis-ci.org/lilfaf/YTVimeoExtractor.svg?branch=development)](https://travis-ci.org/lilfaf/YTVimeoExtractor) -======= [![Build Status](https://travis-ci.org/lilfaf/YTVimeoExtractor.svg?branch=master)](https://travis-ci.org/lilfaf/YTVimeoExtractor) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ->>>>>>> master YTVimeoExtractor extracts the MP4 streams of Vimeo videos, which then can be used to play via a `MPMoviePlayerViewController` or `AVPlayerView`. From 48133e628e8c0520e26708518776d806a46a35af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Sat, 30 Jan 2016 20:23:09 -0400 Subject: [PATCH 15/26] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b69d958..af8fb86 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ YTVimeoExtractor extracts the MP4 streams of Vimeo videos, which then can be use |---------------|----------------| | `YTVimeoExtractor` | The `YTVimeoExtractor` is the main class and its sole purpose is to fetch information about Vimeo videos. Use the two main methods `fetchVideoWithIdentifier:withReferer:completionHandler:` or `fetchVideoWithVimeoURL:withReferer:completionHandler:` to obtain video information. | | `YTVimeoExtractorOperation` | `YTVimeoExtractorOperation` is a subclass of `NSOperation` and is used to fetch and parse out information about Vimeo videos. This a low level class. Generally speaking, you should use the higher level `YTVimeoExtractor` class. | -|`YTVimeoURLParser` | `YTVimeoURLParser` is used to validate and parse put Vimeo URLs. The sole purpose of the class is to check if a given URL can be handled by the `YTVimeoExtractor` class.| +|`YTVimeoURLParser` | `YTVimeoURLParser` is used to validate and parse put Vimeo URLs. The main purpose of the class is to check if a given URL can be handled by the `YTVimeoExtractor` class.| |`YTVimeoVideo`| `YTVimeoVideo` represents a Vimeo video. Use this class to access information about a particular video. Generally, you should not initialize this class, instead use the two main methods of the `YTVimeoExtractor` class.| ## Installation From 57d1e5d2f3a0f78dfe2ce506146a32db3897a86c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sonee=CC=81=20John?= Date: Mon, 1 Feb 2016 13:58:10 -0400 Subject: [PATCH 16/26] Add `HTTPLiveStreamURL` property Will assign a value to it soon ;) #38 --- YTVimeoExtractor/YTVimeoVideo.h | 1 + 1 file changed, 1 insertion(+) diff --git a/YTVimeoExtractor/YTVimeoVideo.h b/YTVimeoExtractor/YTVimeoVideo.h index aac4c9a..f0ef1c8 100644 --- a/YTVimeoExtractor/YTVimeoVideo.h +++ b/YTVimeoExtractor/YTVimeoVideo.h @@ -129,4 +129,5 @@ typedef NS_ENUM(NSUInteger, YTVimeoVideoQuality) { */ -(NSURL *__nullable)lowestQualityStreamURL; +@property (nonatomic, readonly) NSURL *__nullable HTTPLiveStreamURL; @end From a05f11f2af886619fcd0d13c6ac5875e317adf7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sonee=CC=81=20John?= Date: Mon, 1 Feb 2016 14:09:45 -0400 Subject: [PATCH 17/26] Assign value to `HTTPLiveStreamURL` #38 --- YTVimeoExtractor/YTVimeoVideo.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YTVimeoExtractor/YTVimeoVideo.m b/YTVimeoExtractor/YTVimeoVideo.m index 05a5d8a..a8e0d5d 100644 --- a/YTVimeoExtractor/YTVimeoVideo.m +++ b/YTVimeoExtractor/YTVimeoVideo.m @@ -62,7 +62,7 @@ - (void)extractVideoInfoWithCompletionHandler:(void (^)(NSError *error))completi NSArray *filesInfo = [self.infoDict valueForKeyPath:@"request.files.progressive"]; - + _HTTPLiveStreamURL = [NSURL URLWithString:[self.infoDict valueForKeyPath:@"request.files.hls.url"]]?:nil; NSMutableDictionary *streamURLs = [NSMutableDictionary new]; NSMutableDictionary *thumbnailURLs = [NSMutableDictionary new]; From d8d8fbee81af61b117adce8067149d721ac614fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Fri, 5 Feb 2016 09:06:09 -0400 Subject: [PATCH 18/26] Revert "Assign value to `HTTPLiveStreamURL`" This reverts commit a05f11f2af886619fcd0d13c6ac5875e317adf7b. --- YTVimeoExtractor/YTVimeoVideo.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YTVimeoExtractor/YTVimeoVideo.m b/YTVimeoExtractor/YTVimeoVideo.m index a8e0d5d..05a5d8a 100644 --- a/YTVimeoExtractor/YTVimeoVideo.m +++ b/YTVimeoExtractor/YTVimeoVideo.m @@ -62,7 +62,7 @@ - (void)extractVideoInfoWithCompletionHandler:(void (^)(NSError *error))completi NSArray *filesInfo = [self.infoDict valueForKeyPath:@"request.files.progressive"]; - _HTTPLiveStreamURL = [NSURL URLWithString:[self.infoDict valueForKeyPath:@"request.files.hls.url"]]?:nil; + NSMutableDictionary *streamURLs = [NSMutableDictionary new]; NSMutableDictionary *thumbnailURLs = [NSMutableDictionary new]; From 6296f9d7b015a6e1dc20009caa91234a391d77fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Fri, 5 Feb 2016 09:06:13 -0400 Subject: [PATCH 19/26] Revert "Add `HTTPLiveStreamURL` property" This reverts commit 57d1e5d2f3a0f78dfe2ce506146a32db3897a86c. --- YTVimeoExtractor/YTVimeoVideo.h | 1 - 1 file changed, 1 deletion(-) diff --git a/YTVimeoExtractor/YTVimeoVideo.h b/YTVimeoExtractor/YTVimeoVideo.h index f0ef1c8..aac4c9a 100644 --- a/YTVimeoExtractor/YTVimeoVideo.h +++ b/YTVimeoExtractor/YTVimeoVideo.h @@ -129,5 +129,4 @@ typedef NS_ENUM(NSUInteger, YTVimeoVideoQuality) { */ -(NSURL *__nullable)lowestQualityStreamURL; -@property (nonatomic, readonly) NSURL *__nullable HTTPLiveStreamURL; @end From 3ab0e806724d43e852718bf3ccc8c66a9abf17c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Fri, 5 Feb 2016 09:10:04 -0400 Subject: [PATCH 20/26] Change version number to v1.1.0 --- YTVimeoExtractor/Info.plist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YTVimeoExtractor/Info.plist b/YTVimeoExtractor/Info.plist index 007954e..6be6456 100644 --- a/YTVimeoExtractor/Info.plist +++ b/YTVimeoExtractor/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.1 + 1.1.0 CFBundleSignature ???? CFBundleVersion - 1.0.1 + 1.1.0 NSHumanReadableCopyright Copyright © 2015 Louis Larpin. All rights reserved. NSPrincipalClass From 5aa45a76742f254d26ef9a0f715c570b7970cc6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Fri, 5 Feb 2016 09:13:49 -0400 Subject: [PATCH 21/26] Create CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ + From 47d71ff43f1871f8d61de409ae7602a8fd4b76c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Fri, 5 Feb 2016 09:35:40 -0400 Subject: [PATCH 22/26] Update documentation --- YTVimeoExtractor/YTVimeoVideo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YTVimeoExtractor/YTVimeoVideo.h b/YTVimeoExtractor/YTVimeoVideo.h index aac4c9a..ae93b7f 100644 --- a/YTVimeoExtractor/YTVimeoVideo.h +++ b/YTVimeoExtractor/YTVimeoVideo.h @@ -115,14 +115,14 @@ typedef NS_ENUM(NSUInteger, YTVimeoVideoQuality) { */ @property (nonatomic, readonly) NSDictionary *__nullable metaData; /** - * Convenience method to get the highest quality stream URL. + * Get the highest quality stream URL. * * @see YTVimeoVideoQuality * @return The highest quality stream URL. */ -(NSURL *__nullable)highestQualityStreamURL; /** - * Convenience method to get the lowest quality stream URL. + * Get the lowest quality stream URL. * * @see YTVimeoVideoQuality * @return The lowest quality stream URL. From b183a0056e532cccce67b6799d087f26bbf47c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Fri, 5 Feb 2016 09:39:10 -0400 Subject: [PATCH 23/26] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b13789..70e1668 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,9 @@ +### Version 1.1.0 +* The `streamURLs` and `thumbnailURLs` are now dictionaries that contain NSURLs ([e179efc](https://github.com/lilfaf/YTVimeoExtractor/commit/e179efc395ea8f287a9a9acb1b4b1398e92e24ce), [385ae37](https://github.com/lilfaf/YTVimeoExtractor/commit/385ae372660f52a0061b3c73f7d5df0cd5b33cc3)) + * Add support for Objective-C generics +* Add two methods to easily retrieve certain URLs from the `streamURLs` dictionary: + * `- highestQualityStreamURL` & `- lowestQualityStreamURL` ([d80f87b](https://github.com/lilfaf/YTVimeoExtractor/commit/d80f87b5e3f51dca8dbf8395278f5f706c2ad2a8)) + +### Version 1.0.0 +* Intial version From 84690f6aeb780e26c4ecbbec52619b69ad3873da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Fri, 5 Feb 2016 09:44:20 -0400 Subject: [PATCH 24/26] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index af8fb86..ebae879 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Use the two block methods in the `YTVimeoExtractor` class. Both methods will cal ### OS X Example ```objc -[[YTVimeoExtractor sharedExtractor]fetchVideoWithVimeoURL:self.urlTextField.stringValue withReferer:nil completionHandler:^(YTVimeoVideo * _Nullable video, NSError * _Nullable error) { +[[YTVimeoExtractor sharedExtractor]fetchVideoWithVimeoURL:@"https://vimeo.com/channels/staffpicks/147876560" withReferer:nil completionHandler:^(YTVimeoVideo * _Nullable video, NSError * _Nullable error) { if (video) { @@ -104,7 +104,7 @@ Use the two block methods in the `YTVimeoExtractor` class. Both methods will cal ```objc - [[YTVimeoExtractor sharedExtractor]fetchVideoWithVimeoURL:self.urlField.text withReferer:nil completionHandler:^(YTVimeoVideo * _Nullable video, NSError * _Nullable error) { + [[YTVimeoExtractor sharedExtractor]fetchVideoWithVimeoURL:@"https://vimeo.com/channels/staffpicks/147876560" withReferer:nil completionHandler:^(YTVimeoVideo * _Nullable video, NSError * _Nullable error) { if (video) { From 1d5c151dc7f57648c74fa05eee5aa80d6718bd11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Sun, 7 Feb 2016 13:14:30 -0400 Subject: [PATCH 25/26] Bump version to 1.1.0 --- YTVimeoExtractor.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YTVimeoExtractor.podspec b/YTVimeoExtractor.podspec index d46b506..59fe30f 100644 --- a/YTVimeoExtractor.podspec +++ b/YTVimeoExtractor.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "YTVimeoExtractor" - s.version = "1.0.0" + s.version = "1.1.0" s.summary = "Fetches Vimeo's mp4 URLs for iOS." s.description = <<-DESC YTVimeoExtractor is a class which lets you get the iOS From 21f42c8f2b4cfc67acbc70fb40ce5701d5b1073c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sone=C3=A9=20John?= Date: Sun, 7 Feb 2016 13:14:44 -0400 Subject: [PATCH 26/26] Update YTVimeoExtractor.podspec --- YTVimeoExtractor.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YTVimeoExtractor.podspec b/YTVimeoExtractor.podspec index 59fe30f..c11d122 100644 --- a/YTVimeoExtractor.podspec +++ b/YTVimeoExtractor.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.homepage = "https://github.com/lilfaf/YTVimeoExtractor" s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { "Louis Larpin" => "louis.larpin@gmail.com" } - s.source = { :git => "https://github.com/lilfaf/YTVimeoExtractor.git", :tag => "1.0.0" } + s.source = { :git => "https://github.com/lilfaf/YTVimeoExtractor.git", :tag => "1.1.0" } s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9'