Latest 0.5.0
Homepage https://github.com/toddkramer/HLSThumbnailGenerator
License MIT
Platforms ios 9.0, osx 10.11, tvos 9.0

CocoaPods Version Swift Platform Swift Package Manager compatible Carthage compatible

Overview

HLSThumbnailGenerator is a substitute for AVAssetImageGenerator when generating thumbnails from streaming video.

Features

  • iOS 9.0+, macOS 10.10+, tvOS 9.0+
  • Can pass in an array of times (in seconds) to request thumbnails

Usage

let urlString = "<hls-url>"
guard let url = URL(string: urlString) else { return }
let asset = AVAsset(url: url)
generator = ThumbnailGenerator(asset: asset)
generator.delegate = self
generator.generateThumbnails(atTimesInSeconds: [16.1, 33.2, 55.2])

Installation

CocoaPods

CocoaPods is a centralized dependency manager for Cocoa projects. To install
HLSThumbnailGenerator with CocoaPods:

  1. Make sure the latest version of CocoaPods is installed.

  2. Add HLSThumbnailGenerator to your Podfile:
use_frameworks!

pod 'HLSThumbnailGenerator', '~> 0.5.0'
  1. Run pod install.

Swift Package Manager

Swift Package Manager is Apple’s
official package manager for Swift frameworks. To install with Swift Package
Manager:

  1. Add HLSThumbnailGenerator to your Package.swift file:
import PackageDescription

let package = Package(
    name: "MyAppTarget",
    dependencies: [
        .Package(url: "https://github.com/toddkramer/HLSThumbnailGenerator", majorVersion: 0, minor: 5)
    ]
)
  1. Run swift build.

  2. Generate Xcode project:
swift package generate-xcodeproj

Carthage

Carthage is a decentralized dependency manager for Cocoa projects. To
install HLSThumbnailGenerator with Carthage:

  1. Make sure Carthage is installed.

  2. Add HLSThumbnailGenerator to your Cartfile:
github "toddkramer/HLSThumbnailGenerator" ~> 0.5.0
  1. Run carthage update and add the appropriate framework.

Latest podspec

{
    "name": "HLSThumbnailGenerator",
    "version": "0.5.0",
    "license": "MIT",
    "summary": "Substitute for AVAssetImageGenerator when generating thumbnails from streaming video.",
    "homepage": "https://github.com/toddkramer/HLSThumbnailGenerator",
    "authors": "Todd Kramer",
    "source": {
        "git": "https://github.com/toddkramer/HLSThumbnailGenerator.git",
        "tag": "0.5.0"
    },
    "module_name": "HLSThumbnailGenerator",
    "platforms": {
        "ios": "9.0",
        "osx": "10.11",
        "tvos": "9.0"
    },
    "source_files": "Sources/**/*.swift"
}

Pin It on Pinterest

Share This