13 Commits

Author SHA1 Message Date
Gavin King d9fd6ec9e0 Merge pull request #24 from vimeo/develop
Merging master into develop
2017-12-07 16:27:04 -05:00
Gavin King 1d5a54e427 Merge pull request #23 from vimeo/VIM-XXX-swift-version
Update .swift-version
2017-12-07 16:24:31 -05:00
Gavin King 9e72e81f44 Update .swift-version 2017-12-07 16:19:10 -05:00
Gavin King bd27ed90de Merge pull request #22 from vimeo/develop
Merging develop into master
2017-12-07 16:02:01 -05:00
Gavin King 0be337a29f Merge pull request #21 from vimeo/AF-210-swift-4
AF-210: Swift 4
2017-12-07 16:00:55 -05:00
Gavin King 15933a66a3 fastlane 2017-11-29 17:12:08 -05:00
Gavin King 57533faa36 example version increment 2017-11-29 17:09:41 -05:00
Gavin King 5067393d78 inference 2017-11-29 17:08:35 -05:00
Gavin King 0245cf6f8b version increment 2017-11-29 16:55:38 -05:00
Gavin King c0e553dcbf @objc 2017-11-29 16:54:40 -05:00
Gavin King c15d31d6af migration and FillModeCapable changes 2017-11-29 16:18:45 -05:00
Gavin King 3981702cfe minimum requirements 2017-10-09 11:14:18 -04:00
Gavin King c057324b82 Update README.md 2017-10-06 17:04:18 -04:00
9 changed files with 51 additions and 24 deletions
+1 -1
View File
@@ -1 +1 @@
3.2
4.0
+10 -6
View File
@@ -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"
+2 -2
View File
@@ -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
View File
@@ -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
+10 -4
View File
@@ -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)
+20 -5
View File
@@ -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
}
}
}
+3 -3
View File
@@ -1,6 +1,6 @@
# PlayerKit
[![CI Status](http://img.shields.io/travis/ghking/PlayerKit.svg?style=flat)](https://travis-ci.org/ghking/PlayerKit)
[![CI Status](http://img.shields.io/travis/ghking/PlayerKit.svg?style=flat)](https://travis-ci.org/vimeo/PlayerKit)
[![Version](https://img.shields.io/cocoapods/v/PlayerKit.svg?style=flat)](http://cocoapods.org/pods/PlayerKit)
[![License](https://img.shields.io/cocoapods/l/PlayerKit.svg?style=flat)](http://cocoapods.org/pods/PlayerKit)
[![Platform](https://img.shields.io/cocoapods/p/PlayerKit.svg?style=flat)](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
View File
@@ -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"