Swiftpack.co - nashysolutions/Playback as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by nashysolutions.
nashysolutions/Playback 1.0.1
A simple wrapper around AVFoundation to play a movie file.
⭐️ 0
🕓 2 weeks ago
.package(url: "https://github.com/nashysolutions/Playback.git", from: "1.0.1")

Playback

A simple wrapper around AVFoundation to play a movie file.

Usage

import Foundation
import AVFoundation
import Playback

final class HomeViewController: VideoPlayerViewController {
    
    override func shouldReplay() -> Bool {
        return true
    }
    
    override func playerItem() -> AVPlayerItem? {
        guard let url = Bundle.main.url(forResource: "Welcome", withExtension: "mov") else {
            return nil
        }
        return AVPlayerItem(url: url)
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        // optional
        sendPlayerViewToBack()
    }
}

GitHub

link
Stars: 0
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Release 1.0.1
2 weeks ago

See Changelog.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics