Skip to content

svhawks/VideoThumbnailViewKit

Repository files navigation

VideoThumbnailViewKit - Video Thumbnail View

Build Status License Dependencies Ready StackOverflow Join the chat at https://gitter.im/mobileplayer/mobileplayer-ios CocoaPods

alt tag

##Introduction

Requires iOS 8 or later and Xcode 6.1+
Swift support uses dynamic frameworks and is therefore only supported on iOS > 8.

##Installation

To install via CocoaPods add this line to your Podfile.

use_frameworks!

and

pod "VideoThumbViewKit"

Then, run the following command:

$ pod install

##Usage

let videoURL = NSURL.fileURLWithPath(NSBundle.mainBundle().pathForResource("Video", ofType: "mp4")!)!
let rect = CGRect(x: 0.0, y: 70.0, width: self.view.frame.size.width, height: 100.0)
var trimView = VideoThumbView(frame: rect, videoURL: videoURL, thumbImageWidth: 100)
trimView.backgroundColor = UIColor.blackColor()
view.addSubview(trimView)