Skip to content

Commit

Permalink
修复没有资源文件
Browse files Browse the repository at this point in the history
  • Loading branch information
JmoVxia committed Dec 15, 2021
1 parent 70fbdf6 commit 7dbc11c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CLPlayer.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'CLPlayer'
s.version = '2.0.0'
s.version = '2.0.1'
s.summary = 'Swift版自定义AVPlayer'
s.description = <<-DESC
CLPlayer是基于系统AVPlayer封装的视频播放器.
Expand All @@ -19,6 +19,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '10.0'
s.source = {:git => 'https://github.com/JmoVxia/CLPlayer.git', :tag => s.version}
s.source_files = ['CLPlayer/**/*.swift']
s.resource = 'CLPlayer/CLPlayer.bundle'
s.requires_arc = true
s.frameworks = 'UIKit','MediaPlayer'
s.dependency 'SnapKit'
Expand Down
14 changes: 7 additions & 7 deletions CLPlayer/CLPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import AVFoundation
import SnapKit
import UIKit

class CLPlayer: UIView {
override init(frame: CGRect) {
public class CLPlayer: UIView {
public override init(frame: CGRect) {
super.init(frame: frame)
initUI()
makeConstraints()
Expand Down Expand Up @@ -114,7 +114,7 @@ class CLPlayer: UIView {
}
}

var url: URL? {
public var url: URL? {
didSet {
guard let url = url else { return }
resetPlayer()
Expand All @@ -138,7 +138,7 @@ class CLPlayer: UIView {

// MARK: - JmoVxia---override

extension CLPlayer {
public extension CLPlayer {
override class var layerClass: AnyClass {
return AVPlayerLayer.classForCoder()
}
Expand Down Expand Up @@ -297,7 +297,7 @@ private extension CLPlayer {

// MARK: - JmoVxia---公共方法

extension CLPlayer {
public extension CLPlayer {
func pause() {
contentView.playState = .pause
player?.pause()
Expand All @@ -324,13 +324,13 @@ extension CLPlayer {
// MARK: - JmoVxia---UIViewControllerTransitioningDelegate

extension CLPlayer: UIViewControllerTransitioningDelegate {
func animationController(forPresented _: UIViewController, presenting _: UIViewController, source _: UIViewController) -> UIViewControllerAnimatedTransitioning? {
public func animationController(forPresented _: UIViewController, presenting _: UIViewController, source _: UIViewController) -> UIViewControllerAnimatedTransitioning? {
animationTransitioning = CLAnimationTransitioning(playView: self)
animationTransitioning?.animationType = .present
return animationTransitioning
}

func animationController(forDismissed _: UIViewController) -> UIViewControllerAnimatedTransitioning? {
public func animationController(forDismissed _: UIViewController) -> UIViewControllerAnimatedTransitioning? {
animationTransitioning?.animationType = .dismiss
return animationTransitioning
}
Expand Down

0 comments on commit 7dbc11c

Please sign in to comment.