VideoPlayer

master

A SwiftUI based video player, that provides access to the underlying AVPlayerViewController object.
Raees678/VideoPlayer

VideoPlayer

SwiftPM compatible

A video player written in SwiftUI that provides access to the underlying AVPlayerViewController. It allows you to pass a custom closure to the AVPlayerViewController, and to obtain access to its delegate. Accepts an additional argument that allows the player to automatically rotate to landscape when going into fullscreen (this works on iPhones only).

By default this SwiftUI view will try to fit the the all the available space provided to it with a given aspect ratio when the underlying AVPlayer is not fullscreen. It is centered in the provided container.

How to install

To add as a dependency in a Swift package:

dependencies: [
    .package(url: "https://github.com/Raees678/VideoPlayer.git", from: "1.0.0"),
],

To add as a dependency an Xcode project:

In Xcode, select FileSwift PackagesAdd Package Dependency and paste into the combined search/input box: https://github.com/Raees678/VideoPlayer.git and click Next. Select the rules for the version you would like to install.

Description

  • Swift Tools 5.2.0
View More Packages from this Author

Dependencies

  • None
Last updated: Thu Nov 10 2022 10:12:27 GMT-1000 (Hawaii-Aleutian Standard Time)