VLC is a repository that provides VLC binaries for use in iOS, tvOS, and macOS projects. This repository allows you to easily include VLC's powerful media playback capabilities in your projects via Swift Package Manager.
To add VLC to your project using Swift Package Manager, follow these steps:
- In Xcode, select
File > Swift Packages > Add Package Dependency...
. - Enter the repository URL:
https://github.com/omaralbeik/VLC
. - Choose the version or branch you want to use.
To manually add VLC as a dependency in your Package.swift
file, include the following:
import PackageDescription
let package = Package(
name: "YourProjectName",
platforms: [/* */],
dependencies: [
.package(url: "https://github.com/omaralbeik/VLC")
],
targets: [
.target(
name: "YourTargetName",
dependencies: [
"VLC"
]
),
]
)
Once you’ve added the VLC package to your project, you can import and use it in your code:
import VLC
class MediaPlayer {
func playMedia(from url: URL) {
let player = VLCMediaPlayer()
player.media = VLCMedia(url: url)
player.play()
}
}
This repository is licensed under the MIT license. See the LICENSE file for more information.
This repository provides binaries and headers for VLC, a free and open-source media player and streaming media server developed by the VideoLAN project.