Swift Tutorials: Play video using AVPlayer in swift

Опубликовано: 21 Май 2020
на канале: Swift Tutorials
13,539
51

In this tutorial, we will learn how to play video from local files(video files inside the app) using #AVPlayer provided in AVKit framework of iOS SDK in #swift language. AVPlayer allows developer to create a custom player of their own requirements and provide methods to play video, pause video, and play video from a particular timing. Also AVPlayer lets developer knows when video ends playing through notifications.

If you want to play video from remote URL, replace #AVPlayerItem url with remote url.