VideoTimelineView
1.0.0
UI de línea de tiempo de video para aplicaciones iOS
Copie la carpeta VideOtImelineView en este proyecto a la suya
Para configurar
let videoTimelineView = VideoTimelineView()
videoTimelineView.frame = timelineRect
videoTimelineView.new(asset:AVAsset(url:videoURL))
view.addSubview(videoTimelineView)
Para obtener acciones de VideOtImelineView Agregar TimelinePlayStatusReceiver Protocol en su ViewController
class ViewController: UIViewController, TimelinePlayStatusReceiver {
Y establecer ViewController como receptor
videoTimelineView.playStatusReceiver = self
Obtenga acciones Implemente estas funciones en su ViewController
func videoTimelineStopped()
func videoTimelineMoved()
func videoTimelineTrimChanged()
Para obtener valores del recortador
let trim = videoTimelineView.currentTrim()
print("start time: (trim.start)")
print("end time: (trim.end)")
Para controlar
//Repeat in the trimmer
videoTimelineView.repeatOn = true
//If set in false, the trimmer will be ignored
videoTimelineView.setTrimIsEnabled(true)
//Hide trimmer
videoTimelineView.setTrimmerIsHidden(true)
//Go to 0s with animation
videoTimelineView.moveTo(0, animate:true)
//Set trimmer from 5 to 10 with animation and move to 3
videoTimelineView.setTrim(start:5, end:10, seek:3, animate:true)
La aplicación con VideOtImellineView en AppStore (gratis).
MIT
Correo electrónico, Twitter, Facebook