Skip to content

Commit

Permalink
add playerOrientChanged delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
BrikerMan committed Nov 7, 2017
1 parent 1555a1b commit 57aeb30
Show file tree
Hide file tree
Showing 13 changed files with 338 additions and 330 deletions.
2 changes: 1 addition & 1 deletion BMPlayer.podspec
Original file line number Diff line number Diff line change
@@ -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
Expand Down
40 changes: 22 additions & 18 deletions BMPlayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,30 @@
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 */; };
/* End PBXBuildFile section */

/* 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 = "<group>"; };
6A5B61C41EADB5DA00158FF9 /* BMPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BMPlayer.h; sourceTree = "<group>"; };
6A5B61C51EADB5DA00158FF9 /* BMPlayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayer.swift; sourceTree = "<group>"; };
6A5B61C61EADB5DA00158FF9 /* BMPlayerClearityChooseButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerClearityChooseButton.swift; sourceTree = "<group>"; };
6A5B61C71EADB5DA00158FF9 /* BMPlayerControlView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerControlView.swift; sourceTree = "<group>"; };
6A5B61C81EADB5DA00158FF9 /* BMPlayerItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerItem.swift; sourceTree = "<group>"; };
6A5B61C91EADB5DA00158FF9 /* BMPlayerLayerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerLayerView.swift; sourceTree = "<group>"; };
6A5B61CA1EADB5DA00158FF9 /* BMPlayerManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerManager.swift; sourceTree = "<group>"; };
6A5B61CB1EADB5DA00158FF9 /* BMPlayerProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMPlayerProtocols.swift; sourceTree = "<group>"; };
6A5B61CC1EADB5DA00158FF9 /* BMSubtitles.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMSubtitles.swift; sourceTree = "<group>"; };
6A5B61CD1EADB5DA00158FF9 /* BMTimeSlider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BMTimeSlider.swift; sourceTree = "<group>"; };
Expand All @@ -57,7 +56,7 @@
6A302EDE1DF199F700AD54B6 = {
isa = PBXGroup;
children = (
6A302EEA1DF199F700AD54B6 /* BMPlayer */,
6A5B61C31EADB5DA00158FF9 /* Source */,
6A302EE91DF199F700AD54B6 /* Products */,
6A6FDBA11DF19A39003727BC /* Frameworks */,
);
Expand All @@ -71,14 +70,6 @@
name = Products;
sourceTree = "<group>";
};
6A302EEA1DF199F700AD54B6 /* BMPlayer */ = {
isa = PBXGroup;
children = (
6A5B61C31EADB5DA00158FF9 /* Source */,
);
path = BMPlayer;
sourceTree = "<group>";
};
6A5B61C31EADB5DA00158FF9 /* Source */ = {
isa = PBXGroup;
children = (
Expand All @@ -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 */,
Expand Down Expand Up @@ -145,7 +136,7 @@
6A302EDF1DF199F700AD54B6 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0810;
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = BrikerMan;
TargetAttributes = {
6A302EE71DF199F700AD54B6 = {
Expand Down Expand Up @@ -178,7 +169,6 @@
buildActionMask = 2147483647;
files = (
6A5B61DB1EADB5DA00158FF9 /* Pod_Asset_BMPlayer.xcassets in Resources */,
6A5B61DA1EADB5DA00158FF9 /* Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -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 */,
Expand All @@ -213,15 +203,22 @@
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;
CLANG_WARN_EMPTY_BODY = YES;
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;
Expand Down Expand Up @@ -266,15 +263,22 @@
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;
CLANG_WARN_EMPTY_BODY = YES;
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;
Expand Down Expand Up @@ -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;
};
Expand All @@ -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;
};
Expand Down
4 changes: 3 additions & 1 deletion BMPlayer.xcodeproj/xcshareddata/xcschemes/BMPlayer.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -36,6 +37,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "SnapKit/SnapKit" ~> 3.2.0
github "SnapKit/SnapKit" ~> 4.0.0
github "ninjaprox/NVActivityIndicatorView"
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -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"
13 changes: 4 additions & 9 deletions Example/BMPlayer/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="udg-xo-r4F">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="udg-xo-r4F">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -129,10 +129,10 @@
<!--Navigation Controller-->
<scene sceneID="Gn9-0c-Swe">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" navigationBarHidden="YES" id="udg-xo-r4F" sceneMemberID="viewController">
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="udg-xo-r4F" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="fcC-LP-J1u">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
Expand All @@ -145,9 +145,4 @@
<point key="canvasLocation" x="654" y="305"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4_7.fullscreen"/>
</simulatedMetricsContainer>
</document>
Loading

0 comments on commit 57aeb30

Please sign in to comment.