Skip to content

Commit 921be46

Browse files
committed
Merge branch 'release/2.14.1'
2 parents 2ee18c1 + a83753f commit 921be46

File tree

8 files changed

+18
-13
lines changed

8 files changed

+18
-13
lines changed

.jazzy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ source_directory: XCDYouTubeKit
44
framework_root: .
55
umbrella_header: XCDYouTubeKit/XCDYouTubeKit.h
66
module: XCDYouTubeKit
7-
module_version: 2.14.0
7+
module_version: 2.14.1
88

99
author: Cédric Luthi
1010
author_url: https://twitter.com/0xced
1111

1212
readme: README.md
1313
github_url: https://github.com/0xced/XCDYouTubeKit
14-
github_file_prefix: https://github.com/0xced/XCDYouTubeKit/tree/2.14.0/XCDYouTubeKit
14+
github_file_prefix: https://github.com/0xced/XCDYouTubeKit/tree/2.14.1/XCDYouTubeKit

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#### Version 2.14.1
2+
3+
* Adaptation to YouTube API change. (#487)
4+
15
#### Version 2.14.0
26

37
* Add new `XCDYouTubeErrorEmptyResponse` error (#479)

XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@
760760
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
761761
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
762762
COPY_PHASE_STRIP = NO;
763-
CURRENT_PROJECT_VERSION = 2.14.0;
763+
CURRENT_PROJECT_VERSION = 2.14.1;
764764
ENABLE_STRICT_OBJC_MSGSEND = YES;
765765
ENABLE_TESTABILITY = YES;
766766
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -804,7 +804,7 @@
804804
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
805805
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
806806
COPY_PHASE_STRIP = YES;
807-
CURRENT_PROJECT_VERSION = 2.14.0;
807+
CURRENT_PROJECT_VERSION = 2.14.1;
808808
ENABLE_STRICT_OBJC_MSGSEND = YES;
809809
GCC_C_LANGUAGE_STANDARD = gnu99;
810810
GCC_NO_COMMON_BLOCKS = YES;

XCDYouTubeKit Demo/iOS Demo/AVPlayerViewControllerManager.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ extension UIView {
5757
self.controller.player = self.player
5858
return
5959
}
60-
self.player = AVPlayer(url: video.streamURL)
60+
guard let streamURL = video.streamURL else { fatalError("No stream URL")}
61+
self.player = AVPlayer(url: streamURL)
6162
self.controller.player = self.player
6263
}
6364
}

XCDYouTubeKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "XCDYouTubeKit"
3-
s.version = "2.14.0"
3+
s.version = "2.14.1"
44
s.summary = "YouTube video player for iOS and OS X."
55
s.homepage = "https://github.com/0xced/XCDYouTubeKit"
66
s.screenshot = "https://raw.github.com/0xced/XCDYouTubeKit/#{s.version}/Screenshots/XCDYouTubeVideoPlayerViewController.png"

XCDYouTubeKit.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -663,10 +663,10 @@
663663
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
664664
COMBINE_HIDPI_IMAGES = YES;
665665
COPY_PHASE_STRIP = NO;
666-
CURRENT_PROJECT_VERSION = 48;
666+
CURRENT_PROJECT_VERSION = 49;
667667
DEFINES_MODULE = YES;
668668
DYLIB_COMPATIBILITY_VERSION = 2.0.0;
669-
DYLIB_CURRENT_VERSION = 2.14.0;
669+
DYLIB_CURRENT_VERSION = 2.14.1;
670670
DYLIB_INSTALL_NAME_BASE = "@rpath";
671671
ENABLE_STRICT_OBJC_MSGSEND = YES;
672672
ENABLE_TESTABILITY = YES;
@@ -741,10 +741,10 @@
741741
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
742742
COMBINE_HIDPI_IMAGES = YES;
743743
COPY_PHASE_STRIP = YES;
744-
CURRENT_PROJECT_VERSION = 48;
744+
CURRENT_PROJECT_VERSION = 49;
745745
DEFINES_MODULE = YES;
746746
DYLIB_COMPATIBILITY_VERSION = 2.0.0;
747-
DYLIB_CURRENT_VERSION = 2.14.0;
747+
DYLIB_CURRENT_VERSION = 2.14.1;
748748
DYLIB_INSTALL_NAME_BASE = "@rpath";
749749
ENABLE_NS_ASSERTIONS = NO;
750750
ENABLE_STRICT_OBJC_MSGSEND = YES;

XCDYouTubeKit/XCDYouTubePlayerScript.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ - (instancetype) initWithString:(NSString *)string customPatterns:(NSArray<NSStr
7777
NSArray<NSString *>*hardCodedPatterns = @[
7878
@"\\b[cs]\\s*&&\\s*[adf]\\.set\\([^,]+\\s*,\\s*encodeURIComponent\\s*\\(\\s*([a-zA-Z0-9$]+)\\(",
7979
@"\\b[a-zA-Z0-9]+\\s*&&\\s*[a-zA-Z0-9]+\\.set\\([^,]+\\s*,\\s*encodeURIComponent\\s*\\(\\s*([a-zA-Z0-9$]+)\\(",
80-
@"\\b([a-zA-Z0-9$]{2})\\s*=\\s*function\\(\\s*a\\s*\\)\\s*\\{\\s*a\\s*=\\s*a\\.split\\(\\s*\"\"\\s*\\)",
80+
@"(?:\\b|[^a-zA-Z0-9$])([a-zA-Z0-9$]{2})\\s*=\\s*function\\(\\s*a\\s*\\)\\s*\\{\\s*a\\s*=\\s*a\\.split\\(\\s*\"\"\\s*\\)",
8181
@"([a-zA-Z0-9$]+)\\s*=\\s*function\\(\\s*a\\s*\\)\\s*\\{\\s*a\\s*=\\s*a\\.split\\(\\s*\"\"\\s*\\)",
8282
/*The rest patterns are supposed to be obsolete but I am keep them here in case some older pattern matches the YouTube API in the future
8383
*IMPORTANT: Please note that the patterns above should be placed in the same order as seen in youtube-dl here: https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L1344

XCDYouTubeKit/XCDYouTubeVideo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ extern NSString *const XCDYouTubeVideoQualityHTTPLiveStreaming;
129129

130130
/**
131131
132-
* A streamURL that is compatible on Apple devices.
132+
* A streamURL that is compatible on Apple devices (can be `nil`)
133133
* The `streamURLs` may contain both video and audio streams, some video streams do not contain any audio. This property will return a video stream that contains both audio and video with a maximum video quality of 720p in the case of videos that aren't live. Also, this properly will return the URL to a live stream in the case of live videos.
134134
*/
135-
@property (nonatomic, readonly) NSURL *streamURL;
135+
@property (nonatomic, readonly, nullable) NSURL *streamURL;
136136

137137
/**
138138

0 commit comments

Comments
 (0)