Skip to content

Commit

Permalink
Merge branch 'release/1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kofktu committed Jan 13, 2022
2 parents 3e943db + 95b7de3 commit ab94171
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PIPKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'PIPKit'
s.version = '1.0.1'
s.version = '1.0.2'
s.summary = 'PIP(Picture in Picture) for iOS'

# This description is used to generate tags and improve search results.
Expand Down
14 changes: 13 additions & 1 deletion PIPKit/Classes/AVPIPKit/AVPIPKitUsable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ import Foundation
import UIKit
import AVKit

public extension PIPKit {

static var isAVPIPKitSupported: Bool {
guard #available(iOS 15.0, *) else {
return false
}

return AVPictureInPictureController.isPictureInPictureSupported()
}

}

@available(iOS 15.0, *)
public enum AVPIPKitRenderPolicy {

Expand Down Expand Up @@ -45,7 +57,7 @@ public protocol AVPIPKitUsable {
public extension AVPIPKitUsable {

var isAVKitPIPSupported: Bool {
AVPictureInPictureController.isPictureInPictureSupported()
PIPKit.isAVPIPKitSupported
}

}
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Once you have your Swift package set up, adding `PIPKit` as a dependency is as e

```swift
dependencies: [
.package(url: "https://github.com/Kofktu/PIPKit.git", .upToNextMajor(from: "1.0.1"))
.package(url: "https://github.com/Kofktu/PIPKit.git", .upToNextMajor(from: "1.0.2"))
]
```

Expand Down Expand Up @@ -134,6 +134,10 @@ UIView that is capable of Picture-in-Picture in iOS (AVKit.framework)

### At a Glance

```swift
var PIPKit.isAVPIPKitSupported: Bool
```

#### AVPIPKitRenderer

```swift
Expand Down

0 comments on commit ab94171

Please sign in to comment.