Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d9fd6ec9e0 | |||
| 1d5a54e427 | |||
| 9e72e81f44 | |||
| bd27ed90de | |||
| 0be337a29f | |||
| 15933a66a3 | |||
| 57533faa36 | |||
| 5067393d78 | |||
| 0245cf6f8b | |||
| c0e553dcbf | |||
| c15d31d6af | |||
| 3981702cfe | |||
| c057324b82 |
+1
-1
@@ -1 +1 @@
|
||||
3.2
|
||||
4.0
|
||||
|
||||
@@ -219,12 +219,12 @@
|
||||
607FACCF1AFB9204008FA782 = {
|
||||
CreatedOnToolsVersion = 6.3.1;
|
||||
DevelopmentTeam = 35R365FS4Q;
|
||||
LastSwiftMigration = 0820;
|
||||
LastSwiftMigration = 0900;
|
||||
};
|
||||
607FACE41AFB9204008FA782 = {
|
||||
CreatedOnToolsVersion = 6.3.1;
|
||||
DevelopmentTeam = 35R365FS4Q;
|
||||
LastSwiftMigration = 0820;
|
||||
LastSwiftMigration = 0900;
|
||||
TestTargetID = 607FACCF1AFB9204008FA782;
|
||||
};
|
||||
};
|
||||
@@ -503,7 +503,8 @@
|
||||
MODULE_NAME = ExampleApp;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -520,7 +521,8 @@
|
||||
MODULE_NAME = ExampleApp;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
@@ -539,7 +541,8 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -553,7 +556,8 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0820"
|
||||
LastUpgradeVersion = "0900"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -40,6 +40,7 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
@@ -69,6 +70,7 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- PlayerKit (1.1.0)
|
||||
- PlayerKit (1.2.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- PlayerKit (from `../`)
|
||||
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
|
||||
:path: ../
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
PlayerKit: 3f06187a533ce4e2a8aa29583e561b465d0d085e
|
||||
PlayerKit: cdc22d328ca9cbba2b602e8f5156c98f0cde5540
|
||||
|
||||
PODFILE CHECKSUM: 071d8819500a822237123321021901352f4d91a4
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'PlayerKit'
|
||||
s.version = '1.1.0'
|
||||
s.version = '1.2.0'
|
||||
s.summary = 'A modular video player system.'
|
||||
|
||||
s.description = <<-DESC
|
||||
|
||||
@@ -37,9 +37,9 @@ public enum PlayerError: Int
|
||||
|
||||
/// Represents the current state of the player
|
||||
///
|
||||
/// - Loading: The player is loading or buffering
|
||||
/// - Ready: The player is ready for playback
|
||||
/// - Failed: The player has failed
|
||||
/// - loading: The player is loading or buffering
|
||||
/// - ready: The player is ready for playback
|
||||
/// - failed: The player has failed
|
||||
@objc public enum PlayerState: Int
|
||||
{
|
||||
case loading
|
||||
@@ -110,7 +110,13 @@ public enum PlayerError: Int
|
||||
/// A player that adopts the ProvidesView protocol is capable of setting the video fill mode.
|
||||
@objc public protocol FillModeCapable
|
||||
{
|
||||
var fillMode: String { get set }
|
||||
var fillMode: FillMode { get set }
|
||||
}
|
||||
|
||||
@objc public enum FillMode: Int
|
||||
{
|
||||
case fit
|
||||
case fill
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
|
||||
@@ -12,7 +12,7 @@ import AVFoundation
|
||||
import AVKit
|
||||
|
||||
/// A RegularPlayer is used to play regular videos.
|
||||
open class RegularPlayer: NSObject, Player, ProvidesView
|
||||
@objc open class RegularPlayer: NSObject, Player, ProvidesView
|
||||
{
|
||||
public struct Constants
|
||||
{
|
||||
@@ -28,7 +28,7 @@ open class RegularPlayer: NSObject, Player, ProvidesView
|
||||
/// Sets an AVAsset on the player.
|
||||
///
|
||||
/// - Parameter asset: The AVAsset
|
||||
open func set(_ asset: AVAsset)
|
||||
@objc open func set(_ asset: AVAsset)
|
||||
{
|
||||
// Prepare the old item for removal
|
||||
|
||||
@@ -373,15 +373,30 @@ extension RegularPlayer: VolumeCapable
|
||||
|
||||
extension RegularPlayer: FillModeCapable
|
||||
{
|
||||
public var fillMode: String
|
||||
public var fillMode: FillMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return (self.view.layer as! AVPlayerLayer).videoGravity
|
||||
let gravity = (self.view.layer as! AVPlayerLayer).videoGravity
|
||||
|
||||
return gravity == .resizeAspect ? .fit : .fill
|
||||
}
|
||||
set
|
||||
{
|
||||
(self.view.layer as! AVPlayerLayer).videoGravity = newValue
|
||||
let gravity: AVLayerVideoGravity
|
||||
|
||||
switch newValue
|
||||
{
|
||||
case .fit:
|
||||
|
||||
gravity = .resizeAspect
|
||||
|
||||
case .fill:
|
||||
|
||||
gravity = .resizeAspectFill
|
||||
}
|
||||
|
||||
(self.view.layer as! AVPlayerLayer).videoGravity = gravity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# PlayerKit
|
||||
|
||||
[](https://travis-ci.org/ghking/PlayerKit)
|
||||
[](https://travis-ci.org/vimeo/PlayerKit)
|
||||
[](http://cocoapods.org/pods/PlayerKit)
|
||||
[](http://cocoapods.org/pods/PlayerKit)
|
||||
[](http://cocoapods.org/pods/PlayerKit)
|
||||
@@ -20,9 +20,9 @@ Vimeo supports various types of video and playback (360 video, Chromecast, etc.)
|
||||
|
||||
To run the example project, clone the repo, and run `pod install` from the Example directory.
|
||||
|
||||
## Requirements
|
||||
## Minimum Requirements
|
||||
|
||||
- iOS 8.0+ / tvOS 9.0+
|
||||
- iOS 8.0 / tvOS 9.0
|
||||
- Swift 3.2
|
||||
|
||||
## Installation
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ default_platform :ios
|
||||
|
||||
platform :ios do
|
||||
before_all do
|
||||
ensure_xcode_version(version: "9.0")
|
||||
ensure_xcode_version(version: "9.0.1")
|
||||
end
|
||||
|
||||
desc "run tests"
|
||||
|
||||
Reference in New Issue
Block a user