Articles and sample code for video playback on Apple Developer Documentation

AVFoundation is a framework used to handle audio and video

AVFoundation | Apple Developer Documentation

Video and Audio Playback

In the AVFoundation documentation, there is a section called Playback>Media Playback

Media Playback

This section describes video playback.
In the left pane, there is a table of contents.

indicates an article.

curly bracket indicate sample code.

This sample code creates a basic movie player, so you can run it and explore it to learn what it takes to play a video.

Creating a Movie Player App with Basic Playback Controls

After downloading and trying to run it,
“AVFoundationSimplePlayer-iOS” is a project downloaded from the internet.
You will be alerted that “Are you sure you want to open it?
You will be alerted to the fact that “AVFoundationSimplePlayer-iOS” is a project downloaded from the internet.
Press “Trust and Open” to open it.

Open Signing & Capabilities > Signing > Team and do the appropriate signing.

As of May 2023, the project is using Storyboard.

It has the ability to play the video, play it backwards, update the time display and slider position accordingly, and move the slider knob to seek the video.

The Creating a Movie Player App with Basic Playback Controls article includes a few explanations of the sample code and a See also section at the bottom that lists related topics

Playback Control

Seeking Through Media

Observing Playback State

Follow these links to see related topics.

Documentation Archive

Apple Developer Documentation Archive contains articles that are no longer updated.
Since they are no longer updated, the code writing style is old and the information is outdated. However, for frameworks that have not changed in general structure, there are figures and other information that are omitted from the current documentation, which may be useful for getting a general idea of the framework. In addition, the document titled “framework name programming guide” is in a format that allows you to scroll down to read about a set of functions.

Archived documents on video and audio playback

Media Playback Programming Guide

Figures are inserted like this.
These figures will help you understand the framework.

Leave a Comment