koustMoviePlayer 1.0.1

koustMoviePlayer 1.0.1

koust 维护。




  • 作者:
  • koust

iOS 10.0+ Swift 4.0+ CocoaPods

KoustMoviePlayer

KoustMoviePlayer是一个定制的iOS播放器。它与Netflix的Player类似,几乎所有功能都可以使用。

预览[电影]

KoustMoviePlayer

要求

  • iOS 10.0+
  • Xcode 10.0
  • Swift 4+

特点

  • 跳过按钮(用于跳转到想跳转的任何特定时间)
  • 倒退按钮(用于倒退。如果您想,也可以设置时间。)
  • 字幕
  • 缩略图动画

CocoaPods

您可以使用CocoaPods通过将其添加到您的Podfile来安装koustMoviePlayer

 platform :ios, '10.0'
 use_frameworks!
 pod 'koustMoviePlayer'

手动

  1. 下载并将路径 class 放入你的项目中。
  2. 恭喜!

使用方法

基本使用

    var koustMPC:KoustPlayerView!
    
    override func viewWillAppear(_ animated: Bool) {
        
       koustMPC = KoustPlayerView(videoURL:URL(string:"https://samplevideos.com/video123/mp4/720/big_buck_bunny_720p_10mb.mp4")!)
        
    }


    @IBAction func playAction(_ sender: Any) {
        
        koustMPC.subtitleResourceName = "sample"
        koustMPC.skipButtonDuration = 5
        koustMPC.skipButtonActive   = true
        koustMPC.backButtonTitle    = "Cartoon Movie | For Kids +4"
        koustMPC.autoPlay           = .play
        koustMPC.presentAVPlayer()
    }
    

副标题(您可以单独使用副标题功能。)

  1. 下载并将 SubtitleModel.swiftKoustSubtitleController.swiftKoustPlayerProtocol.swift 放入你的项目中。
  2.    let subTitle        = KoustSubTitleController(delegate: self)
       subTitle.setSubtitle(forResource: "exampleSrtFile")```
       
  3. 你需要添加 KoustSubtitleDelegate 类。
  4. 恭喜!