From 57aeb307ce02857e897d8cab7802e67696d94d29 Mon Sep 17 00:00:00 2001 From: BrikerMan Date: Tue, 7 Nov 2017 16:47:31 +0800 Subject: [PATCH] add playerOrientChanged delegate --- BMPlayer.podspec | 2 +- BMPlayer.xcodeproj/project.pbxproj | 40 +- .../xcshareddata/xcschemes/BMPlayer.xcscheme | 4 +- Cartfile | 2 +- Cartfile.resolved | 4 +- Example/BMPlayer/Base.lproj/Main.storyboard | 13 +- .../BMPlayer/VideoPlayViewController.swift | 525 +++++++++--------- Example/Podfile.lock | 8 +- .../Pods/Local Podspecs/BMPlayer.podspec.json | 8 +- Example/Pods/Manifest.lock | 8 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 50 +- .../Target Support Files/BMPlayer/Info.plist | 2 +- Source/BMPlayer.swift | 2 + 13 files changed, 338 insertions(+), 330 deletions(-) diff --git a/BMPlayer.podspec b/BMPlayer.podspec index b57fe14..19d5741 100644 --- a/BMPlayer.podspec +++ b/BMPlayer.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "BMPlayer" -s.version = "1.0.0" +s.version = "1.0.1" s.summary = "Video Player Using Swift, based on AVPlayer" s.description = <<-DESC diff --git a/BMPlayer.xcodeproj/project.pbxproj b/BMPlayer.xcodeproj/project.pbxproj index 4761a9a..cf36970 100644 --- a/BMPlayer.xcodeproj/project.pbxproj +++ b/BMPlayer.xcodeproj/project.pbxproj @@ -7,17 +7,16 @@ objects = { /* Begin PBXBuildFile section */ + 6A53E1971FB1A54300928FA3 /* BMPlayerManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A53E1961FB1A54200928FA3 /* BMPlayerManager.swift */; }; 6A5B61D01EADB5DA00158FF9 /* BMPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A5B61C41EADB5DA00158FF9 /* BMPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6A5B61D11EADB5DA00158FF9 /* BMPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5B61C51EADB5DA00158FF9 /* BMPlayer.swift */; }; 6A5B61D21EADB5DA00158FF9 /* BMPlayerClearityChooseButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5B61C61EADB5DA00158FF9 /* BMPlayerClearityChooseButton.swift */; }; 6A5B61D31EADB5DA00158FF9 /* BMPlayerControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5B61C71EADB5DA00158FF9 /* BMPlayerControlView.swift */; }; 6A5B61D41EADB5DA00158FF9 /* BMPlayerItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5B61C81EADB5DA00158FF9 /* BMPlayerItem.swift */; }; 6A5B61D51EADB5DA00158FF9 /* BMPlayerLayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5B61C91EADB5DA00158FF9 /* BMPlayerLayerView.swift */; }; - 6A5B61D61EADB5DA00158FF9 /* BMPlayerManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5B61CA1EADB5DA00158FF9 /* BMPlayerManager.swift */; }; 6A5B61D71EADB5DA00158FF9 /* BMPlayerProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5B61CB1EADB5DA00158FF9 /* BMPlayerProtocols.swift */; }; 6A5B61D81EADB5DA00158FF9 /* BMSubtitles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5B61CC1EADB5DA00158FF9 /* BMSubtitles.swift */; }; 6A5B61D91EADB5DA00158FF9 /* BMTimeSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5B61CD1EADB5DA00158FF9 /* BMTimeSlider.swift */; }; - 6A5B61DA1EADB5DA00158FF9 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6A5B61CE1EADB5DA00158FF9 /* Info.plist */; }; 6A5B61DB1EADB5DA00158FF9 /* Pod_Asset_BMPlayer.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6A5B61CF1EADB5DA00158FF9 /* Pod_Asset_BMPlayer.xcassets */; }; 6A6FDBA61DF19AB3003727BC /* NVActivityIndicatorView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A6FDBA21DF19A39003727BC /* NVActivityIndicatorView.framework */; }; 6A6FDBA71DF19AB3003727BC /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A6FDBA31DF19A39003727BC /* SnapKit.framework */; }; @@ -25,13 +24,13 @@ /* Begin PBXFileReference section */ 6A302EE81DF199F700AD54B6 /* BMPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BMPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6A53E1961FB1A54200928FA3 /* BMPlayerManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BMPlayerManager.swift; path = Default/BMPlayerManager.swift; sourceTree = ""; }; 6A5B61C41EADB5DA00158FF9 /* BMPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BMPlayer.h; sourceTree = ""; }; 6A5B61C51EADB5DA00158FF9 /* BMPlayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayer.swift; sourceTree = ""; }; 6A5B61C61EADB5DA00158FF9 /* BMPlayerClearityChooseButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerClearityChooseButton.swift; sourceTree = ""; }; 6A5B61C71EADB5DA00158FF9 /* BMPlayerControlView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerControlView.swift; sourceTree = ""; }; 6A5B61C81EADB5DA00158FF9 /* BMPlayerItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerItem.swift; sourceTree = ""; }; 6A5B61C91EADB5DA00158FF9 /* BMPlayerLayerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerLayerView.swift; sourceTree = ""; }; - 6A5B61CA1EADB5DA00158FF9 /* BMPlayerManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerManager.swift; sourceTree = ""; }; 6A5B61CB1EADB5DA00158FF9 /* BMPlayerProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerProtocols.swift; sourceTree = ""; }; 6A5B61CC1EADB5DA00158FF9 /* BMSubtitles.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMSubtitles.swift; sourceTree = ""; }; 6A5B61CD1EADB5DA00158FF9 /* BMTimeSlider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMTimeSlider.swift; sourceTree = ""; }; @@ -57,7 +56,7 @@ 6A302EDE1DF199F700AD54B6 = { isa = PBXGroup; children = ( - 6A302EEA1DF199F700AD54B6 /* BMPlayer */, + 6A5B61C31EADB5DA00158FF9 /* Source */, 6A302EE91DF199F700AD54B6 /* Products */, 6A6FDBA11DF19A39003727BC /* Frameworks */, ); @@ -71,14 +70,6 @@ name = Products; sourceTree = ""; }; - 6A302EEA1DF199F700AD54B6 /* BMPlayer */ = { - isa = PBXGroup; - children = ( - 6A5B61C31EADB5DA00158FF9 /* Source */, - ); - path = BMPlayer; - sourceTree = ""; - }; 6A5B61C31EADB5DA00158FF9 /* Source */ = { isa = PBXGroup; children = ( @@ -88,7 +79,7 @@ 6A5B61C71EADB5DA00158FF9 /* BMPlayerControlView.swift */, 6A5B61C81EADB5DA00158FF9 /* BMPlayerItem.swift */, 6A5B61C91EADB5DA00158FF9 /* BMPlayerLayerView.swift */, - 6A5B61CA1EADB5DA00158FF9 /* BMPlayerManager.swift */, + 6A53E1961FB1A54200928FA3 /* BMPlayerManager.swift */, 6A5B61CB1EADB5DA00158FF9 /* BMPlayerProtocols.swift */, 6A5B61CC1EADB5DA00158FF9 /* BMSubtitles.swift */, 6A5B61CD1EADB5DA00158FF9 /* BMTimeSlider.swift */, @@ -145,7 +136,7 @@ 6A302EDF1DF199F700AD54B6 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0910; ORGANIZATIONNAME = BrikerMan; TargetAttributes = { 6A302EE71DF199F700AD54B6 = { @@ -178,7 +169,6 @@ buildActionMask = 2147483647; files = ( 6A5B61DB1EADB5DA00158FF9 /* Pod_Asset_BMPlayer.xcassets in Resources */, - 6A5B61DA1EADB5DA00158FF9 /* Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -190,8 +180,8 @@ buildActionMask = 2147483647; files = ( 6A5B61D41EADB5DA00158FF9 /* BMPlayerItem.swift in Sources */, - 6A5B61D61EADB5DA00158FF9 /* BMPlayerManager.swift in Sources */, 6A5B61D81EADB5DA00158FF9 /* BMSubtitles.swift in Sources */, + 6A53E1971FB1A54300928FA3 /* BMPlayerManager.swift in Sources */, 6A5B61D71EADB5DA00158FF9 /* BMPlayerProtocols.swift in Sources */, 6A5B61D51EADB5DA00158FF9 /* BMPlayerLayerView.swift in Sources */, 6A5B61D31EADB5DA00158FF9 /* BMPlayerControlView.swift in Sources */, @@ -213,7 +203,9 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; @@ -221,7 +213,12 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -266,7 +263,9 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; @@ -274,7 +273,12 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -323,7 +327,7 @@ PRODUCT_BUNDLE_IDENTIFIER = con.eliyar.BMPlayer; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -347,7 +351,7 @@ PRODUCT_BUNDLE_IDENTIFIER = con.eliyar.BMPlayer; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/BMPlayer.xcodeproj/xcshareddata/xcschemes/BMPlayer.xcscheme b/BMPlayer.xcodeproj/xcshareddata/xcschemes/BMPlayer.xcscheme index b14b7a1..00ff555 100644 --- a/BMPlayer.xcodeproj/xcshareddata/xcschemes/BMPlayer.xcscheme +++ b/BMPlayer.xcodeproj/xcshareddata/xcschemes/BMPlayer.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Cartfile b/Cartfile index 89ce1dd..b27a7af 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ -github "SnapKit/SnapKit" ~> 3.2.0 +github "SnapKit/SnapKit" ~> 4.0.0 github "ninjaprox/NVActivityIndicatorView" diff --git a/Cartfile.resolved b/Cartfile.resolved index 1f50309..21373a7 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ -github "ninjaprox/NVActivityIndicatorView" "3.6.0" -github "SnapKit/SnapKit" "3.2.0" +github "SnapKit/SnapKit" "4.0.0" +github "ninjaprox/NVActivityIndicatorView" "4.0.0" diff --git a/Example/BMPlayer/Base.lproj/Main.storyboard b/Example/BMPlayer/Base.lproj/Main.storyboard index ba286df..d9df7b2 100644 --- a/Example/BMPlayer/Base.lproj/Main.storyboard +++ b/Example/BMPlayer/Base.lproj/Main.storyboard @@ -1,11 +1,11 @@ - + - + @@ -129,10 +129,10 @@ - + - + @@ -145,9 +145,4 @@ - - - - - diff --git a/Example/BMPlayer/VideoPlayViewController.swift b/Example/BMPlayer/VideoPlayViewController.swift index c3693e0..e32be31 100644 --- a/Example/BMPlayer/VideoPlayViewController.swift +++ b/Example/BMPlayer/VideoPlayViewController.swift @@ -12,284 +12,301 @@ import AVFoundation import NVActivityIndicatorView func delay(_ seconds: Double, completion:@escaping ()->()) { - let popTime = DispatchTime.now() + Double(Int64( Double(NSEC_PER_SEC) * seconds )) / Double(NSEC_PER_SEC) - - DispatchQueue.main.asyncAfter(deadline: popTime) { - completion() - } + let popTime = DispatchTime.now() + Double(Int64( Double(NSEC_PER_SEC) * seconds )) / Double(NSEC_PER_SEC) + + DispatchQueue.main.asyncAfter(deadline: popTime) { + completion() + } } class VideoPlayViewController: UIViewController { + + // @IBOutlet weak var player: BMPlayer! + + var player: BMPlayer! + + var index: IndexPath! + + var changeButton = UIButton() + + override func viewDidLoad() { + super.viewDidLoad() + setupPlayerManager() + preparePlayer() + setupPlayerResource() - // @IBOutlet weak var player: BMPlayer! + NotificationCenter.default.addObserver(self, + selector: #selector(applicationDidEnterBackground), + name: NSNotification.Name.UIApplicationDidEnterBackground, + object: nil) - var player: BMPlayer! + NotificationCenter.default.addObserver(self, + selector: #selector(applicationWillEnterForeground), + name: NSNotification.Name.UIApplicationWillEnterForeground, + object: nil) + } + + @objc func applicationWillEnterForeground() { - var index: IndexPath! + } + + @objc func applicationDidEnterBackground() { + player.pause(allowAutoPlay: false) + } + + /** + prepare playerView + */ + func preparePlayer() { + var controller: BMPlayerControlView? = nil - var changeButton = UIButton() - - override func viewDidLoad() { - super.viewDidLoad() - setupPlayerManager() - preparePlayer() - setupPlayerResource() - - NotificationCenter.default.addObserver(self, - selector: #selector(applicationDidEnterBackground), - name: NSNotification.Name.UIApplicationDidEnterBackground, - object: nil) - - NotificationCenter.default.addObserver(self, - selector: #selector(applicationWillEnterForeground), - name: NSNotification.Name.UIApplicationWillEnterForeground, - object: nil) + if index.row == 0 && index.section == 2 { + controller = BMPlayerCustomControlView() } - @objc func applicationWillEnterForeground() { - + if index.row == 1 && index.section == 2 { + controller = BMPlayerCustomControlView2() } - @objc func applicationDidEnterBackground() { - player.pause(allowAutoPlay: false) - } + player = BMPlayer(customControlView: controller) + view.addSubview(player) - /** - prepare playerView - */ - func preparePlayer() { - var controller: BMPlayerControlView? = nil - - if index.row == 0 && index.section == 2 { - controller = BMPlayerCustomControlView() - } - - if index.row == 1 && index.section == 2 { - controller = BMPlayerCustomControlView2() - } - - player = BMPlayer(customControlView: controller) - view.addSubview(player) - player.snp.makeConstraints { (make) in - make.top.equalTo(view.snp.top) - make.left.equalTo(view.snp.left) - make.right.equalTo(view.snp.right) - make.height.equalTo(view.snp.width).multipliedBy(9.0/16.0) - } - player.delegate = self - player.backBlock = { [unowned self] (isFullScreen) in - if isFullScreen == true { - return - } - let _ = self.navigationController?.popViewController(animated: true) - } - - changeButton.setTitle("Change Video", for: .normal) - changeButton.addTarget(self, action: #selector(onChangeVideoButtonPressed), for: .touchUpInside) - changeButton.backgroundColor = UIColor.red.withAlphaComponent(0.7) - view.addSubview(changeButton) - - changeButton.snp.makeConstraints { (make) in - make.top.equalTo(player.snp.bottom).offset(30) - make.left.equalTo(view.snp.left).offset(10) - } - changeButton.isHidden = true - self.view.layoutIfNeeded() + player.snp.makeConstraints { (make) in + make.top.equalTo(view.snp.top) + make.left.equalTo(view.snp.left) + make.right.equalTo(view.snp.right) + make.height.equalTo(view.snp.width).multipliedBy(9.0/16.0).priority(500) } - - @objc fileprivate func onChangeVideoButtonPressed() { - let urls = ["http://wvideo.spriteapp.cn/video/2016/0328/56f8ec01d9bfe_wpd.mp4", - "http://baobab.wdjcdn.com/1456117847747a_x264.mp4", - "http://baobab.wdjcdn.com/14525705791193.mp4", - "http://baobab.wdjcdn.com/1456459181808howtoloseweight_x264.mp4", - "http://baobab.wdjcdn.com/1455968234865481297704.mp4", - "http://baobab.wdjcdn.com/1455782903700jy.mp4", - "http://baobab.wdjcdn.com/14564977406580.mp4", - "http://baobab.wdjcdn.com/1456316686552The.mp4", - "http://baobab.wdjcdn.com/1456480115661mtl.mp4", - "http://baobab.wdjcdn.com/1456665467509qingshu.mp4", - "http://baobab.wdjcdn.com/1455614108256t(2).mp4", - "http://baobab.wdjcdn.com/1456317490140jiyiyuetai_x264.mp4", - "http://baobab.wdjcdn.com/1455888619273255747085_x264.mp4", - "http://baobab.wdjcdn.com/1456734464766B(13).mp4", - "http://baobab.wdjcdn.com/1456653443902B.mp4", - "http://baobab.wdjcdn.com/1456231710844S(24).mp4"] - let random = Int(arc4random_uniform(UInt32(urls.count))) - let asset = BMPlayerResource(url: URL(string: urls[random])!, name: "Video @\(random)") - player.setVideo(resource: asset) + player.delegate = self + player.backBlock = { [unowned self] (isFullScreen) in + if isFullScreen { + return + } else { + let _ = self.navigationController?.popViewController(animated: true) + } } + changeButton.setTitle("Change Video", for: .normal) + changeButton.addTarget(self, action: #selector(onChangeVideoButtonPressed), for: .touchUpInside) + changeButton.backgroundColor = UIColor.red.withAlphaComponent(0.7) + view.addSubview(changeButton) - func setupPlayerResource() { - switch (index.section,index.row) { - - case (0,0): - let str = Bundle.main.url(forResource: "SubtitleDemo", withExtension: "srt")! - let url = URL(string: "http://baobab.wdjcdn.com/1456117847747a_x264.mp4")! - - let subtitle = BMSubtitles(url: str) - - let asset = BMPlayerResource(name: "Video Name Here", - definitions: [BMPlayerResourceDefinition(url: url, definition: "480p")], - cover: nil, - subtitles: subtitle) - - // How to change subtiles -// delay(5, completion: { -// if let resource = self.player.currentResource { -// resource.subtitle = nil -// self.player.forceReloadSubtile() -// } -// }) -// -// delay(10, completion: { -// if let resource = self.player.currentResource { -// resource.subtitle = BMSubtitles(url: Bundle.main.url(forResource: "SubtitleDemo2", withExtension: "srt")!) -// } -// }) -// -// -// // How to change get current uel -// delay(5, completion: { -// if let resource = self.player.currentResource { -// for i in resource.definitions { -// print("video \(i.definition) url is \(i.url)") -// } -// } -// }) -// - player.seek(30) - player.setVideo(resource: asset) - changeButton.isHidden = false - - case (0,1): - let asset = self.preparePlayerItem() - player.setVideo(resource: asset) - - case (0,2): - let asset = self.preparePlayerItem() - player.setVideo(resource: asset) - - case (2,0): - player.panGesture.isEnabled = false - let asset = self.preparePlayerItem() - player.setVideo(resource: asset) - - case (2,1): - player.videoGravity = AVLayerVideoGravity.resizeAspect - let asset = BMPlayerResource(url: URL(string: "http://baobab.wdjcdn.com/14525705791193.mp4")!, name: "风格互换:原来你我相爱") - player.setVideo(resource: asset) - - default: - let asset = self.preparePlayerItem() - player.setVideo(resource: asset) - } + changeButton.snp.makeConstraints { (make) in + make.top.equalTo(player.snp.bottom).offset(30) + make.left.equalTo(view.snp.left).offset(10) } - - // 设置播放器单例,修改属性 - func setupPlayerManager() { - resetPlayerManager() - switch (index.section,index.row) { - // 普通播放器 - case (0,0): - break - case (0,1): - break - case (0,2): - // 设置播放器属性,此情况下若提供了cover则先展示封面图,否则黑屏。点击播放后开始loading - BMPlayerConf.shouldAutoPlay = false - - case (1,0): - // 设置播放器属性,此情况下若提供了cover则先展示封面图,否则黑屏。点击播放后开始loading - BMPlayerConf.topBarShowInCase = .always - - - case (1,1): - BMPlayerConf.topBarShowInCase = .horizantalOnly - - - case (1,2): - BMPlayerConf.topBarShowInCase = .none - - case (1,3): - BMPlayerConf.tintColor = UIColor.red - - default: - break - } + changeButton.isHidden = true + self.view.layoutIfNeeded() + } + + + @objc fileprivate func onChangeVideoButtonPressed() { + let urls = ["http://wvideo.spriteapp.cn/video/2016/0328/56f8ec01d9bfe_wpd.mp4", + "http://baobab.wdjcdn.com/1456117847747a_x264.mp4", + "http://baobab.wdjcdn.com/14525705791193.mp4", + "http://baobab.wdjcdn.com/1456459181808howtoloseweight_x264.mp4", + "http://baobab.wdjcdn.com/1455968234865481297704.mp4", + "http://baobab.wdjcdn.com/1455782903700jy.mp4", + "http://baobab.wdjcdn.com/14564977406580.mp4", + "http://baobab.wdjcdn.com/1456316686552The.mp4", + "http://baobab.wdjcdn.com/1456480115661mtl.mp4", + "http://baobab.wdjcdn.com/1456665467509qingshu.mp4", + "http://baobab.wdjcdn.com/1455614108256t(2).mp4", + "http://baobab.wdjcdn.com/1456317490140jiyiyuetai_x264.mp4", + "http://baobab.wdjcdn.com/1455888619273255747085_x264.mp4", + "http://baobab.wdjcdn.com/1456734464766B(13).mp4", + "http://baobab.wdjcdn.com/1456653443902B.mp4", + "http://baobab.wdjcdn.com/1456231710844S(24).mp4"] + let random = Int(arc4random_uniform(UInt32(urls.count))) + let asset = BMPlayerResource(url: URL(string: urls[random])!, name: "Video @\(random)") + player.setVideo(resource: asset) + } + + + func setupPlayerResource() { + switch (index.section,index.row) { + + case (0,0): + let str = Bundle.main.url(forResource: "SubtitleDemo", withExtension: "srt")! + let url = URL(string: "http://baobab.wdjcdn.com/1456117847747a_x264.mp4")! + + let subtitle = BMSubtitles(url: str) + + let asset = BMPlayerResource(name: "Video Name Here", + definitions: [BMPlayerResourceDefinition(url: url, definition: "480p")], + cover: nil, + subtitles: subtitle) + + // How to change subtiles + // delay(5, completion: { + // if let resource = self.player.currentResource { + // resource.subtitle = nil + // self.player.forceReloadSubtile() + // } + // }) + // + // delay(10, completion: { + // if let resource = self.player.currentResource { + // resource.subtitle = BMSubtitles(url: Bundle.main.url(forResource: "SubtitleDemo2", withExtension: "srt")!) + // } + // }) + // + // + // // How to change get current uel + // delay(5, completion: { + // if let resource = self.player.currentResource { + // for i in resource.definitions { + // print("video \(i.definition) url is \(i.url)") + // } + // } + // }) + // + player.seek(30) + player.setVideo(resource: asset) + changeButton.isHidden = false + + case (0,1): + let asset = self.preparePlayerItem() + player.setVideo(resource: asset) + + case (0,2): + let asset = self.preparePlayerItem() + player.setVideo(resource: asset) + + case (2,0): + player.panGesture.isEnabled = false + let asset = self.preparePlayerItem() + player.setVideo(resource: asset) + + case (2,1): + player.videoGravity = AVLayerVideoGravity.resizeAspect + let asset = BMPlayerResource(url: URL(string: "http://baobab.wdjcdn.com/14525705791193.mp4")!, name: "风格互换:原来你我相爱") + player.setVideo(resource: asset) + + default: + let asset = self.preparePlayerItem() + player.setVideo(resource: asset) } - - - /** - 准备播放器资源model - */ - func preparePlayerItem() -> BMPlayerResource { - let res0 = BMPlayerResourceDefinition(url: URL(string: "http://baobab.wdjcdn.com/1457162012752491010143.mp4")!, - definition: "高清") - let res1 = BMPlayerResourceDefinition(url: URL(string: "http://baobab.wdjcdn.com/1457162012752491010143.mp4")!, - definition: "标清") - - let asset = BMPlayerResource(name: "周末号外丨中国第一高楼", - definitions: [res0, res1], - cover: URL(string: "http://img.wdjimg.com/image/video/447f973848167ee5e44b67c8d4df9839_0_0.jpeg")) - return asset - } - - - func resetPlayerManager() { - BMPlayerConf.allowLog = false - BMPlayerConf.shouldAutoPlay = true - BMPlayerConf.tintColor = UIColor.white - BMPlayerConf.topBarShowInCase = .always - BMPlayerConf.loaderType = NVActivityIndicatorType.ballRotateChase - } - - override func viewWillDisappear(_ animated: Bool) { - super.viewWillDisappear(animated) - UIApplication.shared.setStatusBarStyle(UIStatusBarStyle.default, animated: false) - // If use the slide to back, remember to call this method - // 使用手势返回的时候,调用下面方法 - player.pause(allowAutoPlay: true) - } - - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - UIApplication.shared.setStatusBarStyle(UIStatusBarStyle.lightContent, animated: false) - // If use the slide to back, remember to call this method - // 使用手势返回的时候,调用下面方法 - player.autoPlay() - } - - deinit { - // If use the slide to back, remember to call this method - // 使用手势返回的时候,调用下面方法手动销毁 - player.prepareToDealloc() - print("VideoPlayViewController Deinit") + } + + // 设置播放器单例,修改属性 + func setupPlayerManager() { + resetPlayerManager() + switch (index.section,index.row) { + // 普通播放器 + case (0,0): + break + case (0,1): + break + case (0,2): + // 设置播放器属性,此情况下若提供了cover则先展示封面图,否则黑屏。点击播放后开始loading + BMPlayerConf.shouldAutoPlay = false + + case (1,0): + // 设置播放器属性,此情况下若提供了cover则先展示封面图,否则黑屏。点击播放后开始loading + BMPlayerConf.topBarShowInCase = .always + + + case (1,1): + BMPlayerConf.topBarShowInCase = .horizantalOnly + + + case (1,2): + BMPlayerConf.topBarShowInCase = .none + + case (1,3): + BMPlayerConf.tintColor = UIColor.red + + default: + break } + } + + + /** + 准备播放器资源model + */ + func preparePlayerItem() -> BMPlayerResource { + let res0 = BMPlayerResourceDefinition(url: URL(string: "http://baobab.wdjcdn.com/1457162012752491010143.mp4")!, + definition: "高清") + let res1 = BMPlayerResourceDefinition(url: URL(string: "http://baobab.wdjcdn.com/1457162012752491010143.mp4")!, + definition: "标清") + let asset = BMPlayerResource(name: "周末号外丨中国第一高楼", + definitions: [res0, res1], + cover: URL(string: "http://img.wdjimg.com/image/video/447f973848167ee5e44b67c8d4df9839_0_0.jpeg")) + return asset + } + + + func resetPlayerManager() { + BMPlayerConf.allowLog = false + BMPlayerConf.shouldAutoPlay = true + BMPlayerConf.tintColor = UIColor.white + BMPlayerConf.topBarShowInCase = .always + BMPlayerConf.loaderType = NVActivityIndicatorType.ballRotateChase + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + UIApplication.shared.setStatusBarStyle(UIStatusBarStyle.default, animated: false) + // If use the slide to back, remember to call this method + // 使用手势返回的时候,调用下面方法 + player.pause(allowAutoPlay: true) + } + + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + UIApplication.shared.setStatusBarStyle(UIStatusBarStyle.lightContent, animated: false) + // If use the slide to back, remember to call this method + // 使用手势返回的时候,调用下面方法 + player.autoPlay() + } + + deinit { + // If use the slide to back, remember to call this method + // 使用手势返回的时候,调用下面方法手动销毁 + player.prepareToDealloc() + print("VideoPlayViewController Deinit") + } + } // MARK:- BMPlayerDelegate example extension VideoPlayViewController: BMPlayerDelegate { - // Call back when playing state changed, use to detect is playing or not - func bmPlayer(player: BMPlayer, playerIsPlaying playing: Bool) { - print("| BMPlayerDelegate | playerIsPlaying | playing - \(playing)") - } - - // Call back when playing state changed, use to detect specefic state like buffering, bufferfinished - func bmPlayer(player: BMPlayer, playerStateDidChange state: BMPlayerState) { - print("| BMPlayerDelegate | playerStateDidChange | state - \(state)") - } - - // Call back when play time change - func bmPlayer(player: BMPlayer, playTimeDidChange currentTime: TimeInterval, totalTime: TimeInterval) { - // print("| BMPlayerDelegate | playTimeDidChange | \(currentTime) of \(totalTime)") - } - - // Call back when the video loaded duration changed - func bmPlayer(player: BMPlayer, loadedTimeDidChange loadedDuration: TimeInterval, totalDuration: TimeInterval) { - // print("| BMPlayerDelegate | loadedTimeDidChange | \(loadedDuration) of \(totalDuration)") + // Call when player orinet changed + func bmPlayer(player: BMPlayer, playerOrientChanged isFullscreen: Bool) { + player.snp.remakeConstraints { (make) in + make.top.equalTo(view.snp.top) + make.left.equalTo(view.snp.left) + make.right.equalTo(view.snp.right) + if isFullscreen { + make.bottom.equalTo(view.snp.bottom) + } else { + make.height.equalTo(view.snp.width).multipliedBy(9.0/16.0).priority(500) + } } + } + + // Call back when playing state changed, use to detect is playing or not + func bmPlayer(player: BMPlayer, playerIsPlaying playing: Bool) { + print("| BMPlayerDelegate | playerIsPlaying | playing - \(playing)") + } + + // Call back when playing state changed, use to detect specefic state like buffering, bufferfinished + func bmPlayer(player: BMPlayer, playerStateDidChange state: BMPlayerState) { + print("| BMPlayerDelegate | playerStateDidChange | state - \(state)") + } + + // Call back when play time change + func bmPlayer(player: BMPlayer, playTimeDidChange currentTime: TimeInterval, totalTime: TimeInterval) { + // print("| BMPlayerDelegate | playTimeDidChange | \(currentTime) of \(totalTime)") + } + + // Call back when the video loaded duration changed + func bmPlayer(player: BMPlayer, loadedTimeDidChange loadedDuration: TimeInterval, totalDuration: TimeInterval) { + // print("| BMPlayerDelegate | loadedTimeDidChange | \(loadedDuration) of \(totalDuration)") + } } diff --git a/Example/Podfile.lock b/Example/Podfile.lock index bfbaa7c..35e0bcf 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,10 +1,10 @@ PODS: - - BMPlayer/CacheSupport (0.9.5): + - BMPlayer/CacheSupport (1.0.0): - BMPlayer/Core - - NVActivityIndicatorView (~> 4.0) + - NVActivityIndicatorView (~> 4.0.0) - SnapKit (~> 4.0.0) - VIMediaCache - - BMPlayer/Core (0.9.5) + - BMPlayer/Core (1.0.0) - NVActivityIndicatorView (4.0.0): - NVActivityIndicatorView/Presenter (= 4.0.0) - NVActivityIndicatorView/Presenter (4.0.0) @@ -23,7 +23,7 @@ EXTERNAL SOURCES: :path: ../ SPEC CHECKSUMS: - BMPlayer: c71e98188c8bdc9eb89adc113d5504948c2f524f + BMPlayer: d49b916bc794706e65adde2dcf9e5280a9e30991 NVActivityIndicatorView: 54c9b93b6f25a4f467512680c0c90c09a1095cf2 Reveal-SDK: 7fa13d04bb55db61ff2342a990cf731d5159361d SnapKit: a42d492c16e80209130a3379f73596c3454b7694 diff --git a/Example/Pods/Local Podspecs/BMPlayer.podspec.json b/Example/Pods/Local Podspecs/BMPlayer.podspec.json index 652ad9f..0fd66bf 100644 --- a/Example/Pods/Local Podspecs/BMPlayer.podspec.json +++ b/Example/Pods/Local Podspecs/BMPlayer.podspec.json @@ -1,6 +1,6 @@ { "name": "BMPlayer", - "version": "0.9.5", + "version": "1.0.0", "summary": "Video Player Using Swift, based on AVPlayer", "description": "Video Player Using Swift, based on AVPlayer, support for the horizontal screen, vertical screen, the upper and lower slide to adjust the volume, the screen brightness, or so slide to adjust the playback progress.", "homepage": "https://github.com/BrikerMan/BMPlayer", @@ -10,7 +10,7 @@ }, "source": { "git": "https://github.com/BrikerMan/BMPlayer.git", - "tag": "0.9.5" + "tag": "1.0.0" }, "social_media_url": "http://weibo.com/536445669", "platforms": { @@ -48,7 +48,7 @@ "~> 4.0.0" ], "NVActivityIndicatorView": [ - "~> 4.0" + "~> 4.0.0" ] } }, @@ -71,7 +71,7 @@ "~> 4.0.0" ], "NVActivityIndicatorView": [ - "~> 4.0" + "~> 4.0.0" ], "VIMediaCache": [ diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index bfbaa7c..35e0bcf 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,10 +1,10 @@ PODS: - - BMPlayer/CacheSupport (0.9.5): + - BMPlayer/CacheSupport (1.0.0): - BMPlayer/Core - - NVActivityIndicatorView (~> 4.0) + - NVActivityIndicatorView (~> 4.0.0) - SnapKit (~> 4.0.0) - VIMediaCache - - BMPlayer/Core (0.9.5) + - BMPlayer/Core (1.0.0) - NVActivityIndicatorView (4.0.0): - NVActivityIndicatorView/Presenter (= 4.0.0) - NVActivityIndicatorView/Presenter (4.0.0) @@ -23,7 +23,7 @@ EXTERNAL SOURCES: :path: ../ SPEC CHECKSUMS: - BMPlayer: c71e98188c8bdc9eb89adc113d5504948c2f524f + BMPlayer: d49b916bc794706e65adde2dcf9e5280a9e30991 NVActivityIndicatorView: 54c9b93b6f25a4f467512680c0c90c09a1095cf2 Reveal-SDK: 7fa13d04bb55db61ff2342a990cf731d5159361d SnapKit: a42d492c16e80209130a3379f73596c3454b7694 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 6932189..1076b8b 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -208,11 +208,11 @@ 00D1F9DFF39B7F710729F95DC6130A63 /* VICacheSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = VICacheSessionManager.h; path = VIMediaCache/Cache/VICacheSessionManager.h; sourceTree = ""; }; 03363B6FDCFD4214868A5D1FC4A390CA /* VIMediaCache-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "VIMediaCache-dummy.m"; sourceTree = ""; }; 0682BEECE81E3882AF3CB2BCBBC29F80 /* BMPlayerControlView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BMPlayerControlView.swift; path = Source/BMPlayerControlView.swift; sourceTree = ""; }; - 07E58095A8196AAC6782B7848A5C78A4 /* VIMediaCache.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = VIMediaCache.modulemap; sourceTree = ""; }; + 07E58095A8196AAC6782B7848A5C78A4 /* VIMediaCache.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = VIMediaCache.modulemap; sourceTree = ""; }; 0824361B921ECEBF8C54167DEDC61660 /* ConstraintMakerFinalizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerFinalizable.swift; path = Source/ConstraintMakerFinalizable.swift; sourceTree = ""; }; 08620D5D03A8F110592B3633EAA7EF9E /* VIMediaCache.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = VIMediaCache.xcconfig; sourceTree = ""; }; 0B1F00AE16DC2FA64CA820DBD69C373D /* NVActivityIndicatorAnimationLineScalePulseOutRapid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationLineScalePulseOutRapid.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScalePulseOutRapid.swift; sourceTree = ""; }; - 0B3510D7EED62FD9F36F83F4E7A2E88F /* BMPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BMPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0B3510D7EED62FD9F36F83F4E7A2E88F /* BMPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = BMPlayer.framework; path = BMPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 0B39076E7A24F0F601B676057D846F60 /* NVActivityIndicatorView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NVActivityIndicatorView-dummy.m"; sourceTree = ""; }; 0BE3CC03E06322FE6049EB34EE71932A /* NVActivityIndicatorAnimationBallZigZag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallZigZag.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallZigZag.swift; sourceTree = ""; }; 0C17B637E28276C0B6996C4550E72F10 /* LayoutConstraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraint.swift; path = Source/LayoutConstraint.swift; sourceTree = ""; }; @@ -223,19 +223,19 @@ 1590982EA8B02AA9BE70BF800E6E7FCA /* ConstraintMakerPriortizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerPriortizable.swift; path = Source/ConstraintMakerPriortizable.swift; sourceTree = ""; }; 16BA8E22F2B1F14E3A1062448E1E012E /* VIResourceLoaderManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = VIResourceLoaderManager.m; path = VIMediaCache/ResourceLoader/VIResourceLoaderManager.m; sourceTree = ""; }; 17716048F8A280FEFE9A6726964138E9 /* ConstraintRelatableTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelatableTarget.swift; path = Source/ConstraintRelatableTarget.swift; sourceTree = ""; }; - 1945D3C85874665943E8193615F97182 /* VIMediaCache.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = VIMediaCache.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1945D3C85874665943E8193615F97182 /* VIMediaCache.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = VIMediaCache.framework; path = VIMediaCache.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1BD40932369F0CE39BC2E0CF0DD98868 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1CB25A1F22A1604A652B0CFF0ADC23A2 /* BMSubtitles.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BMSubtitles.swift; path = Source/BMSubtitles.swift; sourceTree = ""; }; 1D4B696348AC5FE5EE5D36F7FE5DF584 /* NVActivityIndicatorAnimationBallRotate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallRotate.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallRotate.swift; sourceTree = ""; }; - 1DD68B9A7394F16E1FF6A9DE0356971A /* Pods_BMPlayer_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BMPlayer_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DD68B9A7394F16E1FF6A9DE0356971A /* Pods_BMPlayer_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_BMPlayer_Example.framework; path = "Pods-BMPlayer_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 251CCB4F4FD00AE4B09A6F555974F932 /* Pods-BMPlayer_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-BMPlayer_Example-umbrella.h"; sourceTree = ""; }; 2525FE3CCE4586806B20086FA68A4069 /* LayoutConstraintItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraintItem.swift; path = Source/LayoutConstraintItem.swift; sourceTree = ""; }; 279741231DFC3507029926EBB4FC768F /* NVActivityIndicatorAnimationBallBeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallBeat.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallBeat.swift; sourceTree = ""; }; - 2913E77B21693C7EB83355FBDBC26330 /* SwipeBack.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SwipeBack.modulemap; sourceTree = ""; }; + 2913E77B21693C7EB83355FBDBC26330 /* SwipeBack.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = SwipeBack.modulemap; sourceTree = ""; }; 2BEE8FFCEDD6FFBE723B7114C545ACB0 /* NVActivityIndicatorAnimationBallScaleRipple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallScaleRipple.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleRipple.swift; sourceTree = ""; }; 2F941A3EA5EB370F0DA3994DB2DD95C1 /* VIResourceLoadingRequestWorker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = VIResourceLoadingRequestWorker.h; path = VIMediaCache/ResourceLoader/VIResourceLoadingRequestWorker.h; sourceTree = ""; }; 31D87377FED2D4FA4CEF3062419F7CC9 /* VICacheManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = VICacheManager.h; path = VIMediaCache/Cache/VICacheManager.h; sourceTree = ""; }; - 329858A4956C565282F3F8918D6027EE /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 329858A4956C565282F3F8918D6027EE /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SnapKit.framework; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 338A0BA253CD6528BE77CB282B249524 /* ConstraintInsets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsets.swift; path = Source/ConstraintInsets.swift; sourceTree = ""; }; 3463ABD75DFB4EB77B5CFC76FE4BB0A5 /* NVActivityIndicatorAnimationBallGridPulse.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallGridPulse.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallGridPulse.swift; sourceTree = ""; }; 354F56186734BDE81A77D8D99CAAD50B /* NVActivityIndicatorAnimationBallSpinFadeLoader.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallSpinFadeLoader.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallSpinFadeLoader.swift; sourceTree = ""; }; @@ -248,13 +248,13 @@ 3FA147579C65E983F954394B3C423C54 /* UINavigationController+SwipeBack.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UINavigationController+SwipeBack.m"; path = "SwipeBack/UINavigationController+SwipeBack.m"; sourceTree = ""; }; 3FB8AEAFF9B1DBF071B3A33E183CC542 /* SnapKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SnapKit-dummy.m"; sourceTree = ""; }; 40CCB975D5E9E8843D31E43CACB199F3 /* NVActivityIndicatorAnimationBallScale.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallScale.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScale.swift; sourceTree = ""; }; - 47A0061BAAC43212319CD61E5E5B7F2D /* SnapKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SnapKit.modulemap; sourceTree = ""; }; + 47A0061BAAC43212319CD61E5E5B7F2D /* SnapKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = SnapKit.modulemap; sourceTree = ""; }; 48FA3A274519194A1A57F64C33240D67 /* VICacheAction.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = VICacheAction.h; path = VIMediaCache/Cache/VICacheAction.h; sourceTree = ""; }; 490A4D797EA7ABF5BB304C099F36E825 /* NVActivityIndicatorAnimationBallTrianglePath.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallTrianglePath.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallTrianglePath.swift; sourceTree = ""; }; 4A519C0B8DD1DD528BFB59F0F496152E /* SwipeBack-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwipeBack-prefix.pch"; sourceTree = ""; }; 4AA294A109A17405195DBBFAEEE0FDE1 /* NVActivityIndicatorAnimationBallZigZagDeflect.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallZigZagDeflect.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallZigZagDeflect.swift; sourceTree = ""; }; 4BB696EAA4F192F17506935BC732E094 /* NVActivityIndicatorViewable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorViewable.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Presenter/NVActivityIndicatorViewable.swift; sourceTree = ""; }; - 4E27723E7B6EB0291752282156C53E0D /* BMPlayer.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = BMPlayer.modulemap; sourceTree = ""; }; + 4E27723E7B6EB0291752282156C53E0D /* BMPlayer.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = BMPlayer.modulemap; sourceTree = ""; }; 4FBBB448715BD56EFDF11B9D69975CCD /* NVActivityIndicatorPresenter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorPresenter.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Presenter/NVActivityIndicatorPresenter.swift; sourceTree = ""; }; 5348FF656605F7D02FEE6EF7F10EE063 /* ConstraintInsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsetTarget.swift; path = Source/ConstraintInsetTarget.swift; sourceTree = ""; }; 538007643A79D730F84E0FB766F13A78 /* VIMediaCache-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "VIMediaCache-prefix.pch"; sourceTree = ""; }; @@ -270,14 +270,14 @@ 61B1FEB80828FED50E854081D8F4A42E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; 621DB56D01D5F869D9FDED4F164509FA /* NVActivityIndicatorAnimationSquareSpin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationSquareSpin.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationSquareSpin.swift; sourceTree = ""; }; 650FFFE7F4EA86EC5055B20888D313BC /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 654D92521DEE92E381AD5559FAFBD391 /* NVActivityIndicatorView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = NVActivityIndicatorView.modulemap; sourceTree = ""; }; + 654D92521DEE92E381AD5559FAFBD391 /* NVActivityIndicatorView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = NVActivityIndicatorView.modulemap; sourceTree = ""; }; 66486740FD27E84BA5119DED0CC82D42 /* SwipeBack.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwipeBack.h; path = SwipeBack/SwipeBack.h; sourceTree = ""; }; 6819B15C7C06D53348CFAC48DB4A423E /* UIViewController+SwipeBack.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+SwipeBack.m"; path = "SwipeBack/UIViewController+SwipeBack.m"; sourceTree = ""; }; 682513D3D963C5A006B97391A38468FE /* NVActivityIndicatorAnimationBallClipRotatePulse.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallClipRotatePulse.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallClipRotatePulse.swift; sourceTree = ""; }; 6A0E7EF30F7C081D6BEA92EE25B22F97 /* BMPlayerLayerView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BMPlayerLayerView.swift; path = Source/BMPlayerLayerView.swift; sourceTree = ""; }; 6EEBF8FCB2DE378E199D5140762FFA96 /* Constraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Constraint.swift; path = Source/Constraint.swift; sourceTree = ""; }; 70FBDFFC78EEE1EEF89D058FCF352BF4 /* ConstraintView+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ConstraintView+Extensions.swift"; path = "Source/ConstraintView+Extensions.swift"; sourceTree = ""; }; - 732412A17B81E4D9BB94C2E5759726C5 /* SwipeBack.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwipeBack.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 732412A17B81E4D9BB94C2E5759726C5 /* SwipeBack.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SwipeBack.framework; path = SwipeBack.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 74CBC89BFB92A2050ED5042D46074328 /* VIMediaCache.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = VIMediaCache.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7891AC4BB5C13114E3A7A7ACAFEF1758 /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 792C23DD55939E35B980E41BE55E4D02 /* VIMediaCacheWorker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = VIMediaCacheWorker.h; path = VIMediaCache/Cache/VIMediaCacheWorker.h; sourceTree = ""; }; @@ -295,7 +295,7 @@ 8DA3B09055A2D76E25C66FC6D39281D6 /* NVActivityIndicatorView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NVActivityIndicatorView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8EBA14458D77031ED9DD9DF89C2CA708 /* NVActivityIndicatorAnimationPacman.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationPacman.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationPacman.swift; sourceTree = ""; }; 8EFACF06F3BCEFFB08EC9E99A02B2303 /* BMPlayer.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = BMPlayer.xcconfig; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 978F0A86C2906419C2374A7FBA0E2BF0 /* NVActivityIndicatorAnimationBallPulse.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallPulse.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallPulse.swift; sourceTree = ""; }; 9814E36EDBB18F161B7662E67B9D25B8 /* VIMediaDownloader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = VIMediaDownloader.h; path = VIMediaCache/ResourceLoader/VIMediaDownloader.h; sourceTree = ""; }; 99232A303A892CB10EC6725CF42751B3 /* VIMediaDownloader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = VIMediaDownloader.m; path = VIMediaCache/ResourceLoader/VIMediaDownloader.m; sourceTree = ""; }; @@ -355,7 +355,7 @@ E9496677AC3F73BFE080120C84BE27A3 /* ConstraintConstantTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintConstantTarget.swift; path = Source/ConstraintConstantTarget.swift; sourceTree = ""; }; ECDB4C2E193F0A6AA6E8F578A40DCA82 /* ConstraintLayoutGuide+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ConstraintLayoutGuide+Extensions.swift"; path = "Source/ConstraintLayoutGuide+Extensions.swift"; sourceTree = ""; }; ED24264F3820DE09A88EBCDFDC0952AB /* VICacheManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = VICacheManager.m; path = VIMediaCache/Cache/VICacheManager.m; sourceTree = ""; }; - EDE1DEAF007E48C73BA470D8AFAE2446 /* Pods-BMPlayer_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-BMPlayer_Example.modulemap"; sourceTree = ""; }; + EDE1DEAF007E48C73BA470D8AFAE2446 /* Pods-BMPlayer_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-BMPlayer_Example.modulemap"; sourceTree = ""; }; EF99A1E66B9482B394C5ED43D423EF01 /* NVActivityIndicatorAnimationCubeTransition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationCubeTransition.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationCubeTransition.swift; sourceTree = ""; }; F1A34774A688579092F0D7B8AEE82A91 /* SwipeBack-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwipeBack-umbrella.h"; sourceTree = ""; }; F1FF129E806B9B104E3665DEC1A9F2DE /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -363,7 +363,7 @@ F53F2F9322CBA6B467D0FD454E915765 /* NVActivityIndicatorView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = NVActivityIndicatorView.xcconfig; sourceTree = ""; }; F6D49A2486A061622928187EAAFA1DFC /* VIMediaCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = VIMediaCache.h; path = VIMediaCache/VIMediaCache.h; sourceTree = ""; }; FCB9665A10EEBB40E498FDB05F99D5E4 /* SnapKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-prefix.pch"; sourceTree = ""; }; - FCE1BAEBCEE8C3079032FFF7FF0038A5 /* NVActivityIndicatorView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NVActivityIndicatorView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FCE1BAEBCEE8C3079032FFF7FF0038A5 /* NVActivityIndicatorView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = NVActivityIndicatorView.framework; path = NVActivityIndicatorView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FDED71A8A650FD70D9FAED6662A9496B /* NVActivityIndicatorAnimationBallScaleRippleMultiple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NVActivityIndicatorAnimationBallScaleRippleMultiple.swift; path = NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleRippleMultiple.swift; sourceTree = ""; }; FE4A9788BFEBF3A5FE65B46F74C0EE1D /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; }; FE98FDC76BCC3E5DF48BEF26DA5091BA /* ConstraintMultiplierTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMultiplierTarget.swift; path = Source/ConstraintMultiplierTarget.swift; sourceTree = ""; }; @@ -548,6 +548,7 @@ DD93AAB0AF31424EF14F6B8D4B85E2DD /* Presenter */, D9CC0FF0ADF1D1161F2F96A7B99D62C5 /* Support Files */, ); + name = NVActivityIndicatorView; path = NVActivityIndicatorView; sourceTree = ""; }; @@ -589,6 +590,7 @@ children = ( 7F7A0D660976D2927D89FB14524EDB3A /* Frameworks */, ); + name = "Reveal-SDK"; path = "Reveal-SDK"; sourceTree = ""; }; @@ -687,6 +689,7 @@ A991D35920AF57C04B0F12D84948BEE1 /* UILayoutSupport+Extensions.swift */, 9D9032709BD0023D81823E3F63984810 /* Support Files */, ); + name = SnapKit; path = SnapKit; sourceTree = ""; }; @@ -777,6 +780,7 @@ 0F279E4F7759EF4BD8311487D38A4445 /* VIResourceLoadingRequestWorker.m */, 730D8F36A2FE2847CB56E9324500BEAD /* Support Files */, ); + name = VIMediaCache; path = VIMediaCache; sourceTree = ""; }; @@ -797,6 +801,7 @@ 6819B15C7C06D53348CFAC48DB4A423E /* UIViewController+SwipeBack.m */, 1515E82C14A3067E760C806CA993057A /* Support Files */, ); + name = SwipeBack; path = SwipeBack; sourceTree = ""; }; @@ -986,7 +991,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0700; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -1335,9 +1340,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; @@ -1345,21 +1348,15 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_DEBUG=1", @@ -1392,9 +1389,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; @@ -1402,20 +1397,14 @@ CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", @@ -1429,7 +1418,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SYMROOT = "${SRCROOT}/../build"; VALIDATE_PRODUCT = YES; }; diff --git a/Example/Pods/Target Support Files/BMPlayer/Info.plist b/Example/Pods/Target Support Files/BMPlayer/Info.plist index 9e28493..2243fe6 100644 --- a/Example/Pods/Target Support Files/BMPlayer/Info.plist +++ b/Example/Pods/Target Support Files/BMPlayer/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.9.5 + 1.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/Source/BMPlayer.swift b/Source/BMPlayer.swift index ed2f3cb..3a21337 100644 --- a/Source/BMPlayer.swift +++ b/Source/BMPlayer.swift @@ -16,6 +16,7 @@ public protocol BMPlayerDelegate : class { func bmPlayer(player: BMPlayer ,loadedTimeDidChange loadedDuration: TimeInterval, totalDuration: TimeInterval) func bmPlayer(player: BMPlayer ,playTimeDidChange currentTime : TimeInterval, totalTime: TimeInterval) func bmPlayer(player: BMPlayer ,playerIsPlaying playing: Bool) + func bmPlayer(player: BMPlayer, playerOrientChanged isFullscreen: Bool) } /** @@ -316,6 +317,7 @@ open class BMPlayer: UIView { @objc open func onOrientationChanged() { self.updateUI(isFullScreen) + delegate?.bmPlayer(player: self, playerOrientChanged: isFullScreen) } @objc fileprivate func fullScreenButtonPressed() {