It will be used to display a video file in your application. You will need another component named AVPlayerViewController as well. It will provide you with the playback controls of video players, such as play, pause, backward, and forward to control the video player. With the combination of AVPlayer and AVPlayerViewController plus, you will be able to create your video player. Now let's move on to what you need to do to actually create your player. Previously, I created a project called video_player in X-code. I also added a resource called test to this project. This is a test video. Let's continue this project creation process by creating a simple video player that can play and pause the test video. Before jumping into coding, take note of main in the project navigator on the left-hand side, which is the main storyboard for your app's user interface or UI. This is where the video player for your app will display. Now to add functions to the video player, you can go to ViewController in the project navigator. As you've learned earlier, the ViewController contains three major imports. UIKit, AVKit, and AVFoundation. The ViewController class is where you write the swift code that will help you play the video. The first function you need is an override function. The purpose of this function is to initiate the player once as launched. To create the override function, you can write override func and then viewDid, selecting viewDidAppear from the options provided. On the next line, super.viewDid, again selecting viewDidAppear from the options. Enter twice and then give the function a name by typing playVideo, followed by an open and a closed brace and a semicolon. An error message stating cannot find playVideo in scope displays, as you still need to write the playVideo function. To do this on a new line, write private func playVideo, followed by two sets of braces. Within the second pair, you can press ''Enter'' to move to a new line, then specify the location of the video. To do this type, the keywords guard, let, and path, directly followed by an equal sign and bundle. When you press ''Enter'' the code that traces the file displays. The main path is indicated as test and the file type as MP4. The keyword guard is used to check if the video file exists. If it does, the value will be passed to path and the video located. If the file does not exist, the error message after test.mp4 not found will be displayed. Now that you have specified the path, you have to add code to initialize the AVPlayer. The AVPlayer is fundamental to creating the video player. To initialize the AVPlayer, you use a variable. On a new line, write let player equals AVPlayer and press ''Enter''. Notice that you are using the class from the AVKit that was imported by default as part of the package. If you remove the AVKit import, the AVPlayer will no longer exist. Next, you have to add a playerController. The purpose of this controller is to help you create a user interface where a user can play, pause, fast forward and rewind. There is a controller called AVPlayerViewController that comes with the AVKit. To add this controller on a new line, enter, let playerController equals AVPlayerViewController, and press ''Enter''. Now you have access to all the properties and functions that come with an instance of the AVPlayerViewController class. You then need to link your player to the player controller. On a new line, write the following; playerController.player equals player and press ''Enter''. This line sets the display to the specified controller. Lastly, you must ensure that the player itself displays. You can use the present function to display the player. On a new line, select the present function, then define the controller by entering playerController directly after the open brace. If you want it to be animated and seamless, set the animated option to true. The last line of code in the present function, player.play, calls the play function, which ensures your video plays. If this line of code is absent, your video will not play. That's in essence what you need to run a video. To view the output of your code, click on the Run button. A message Build Succeeded displays, followed by your simulator, playing the test video. On the simulator, you can pause or play the video. You can also scroll through the video or mute and unmute it, as a user would when using your video player. You should now be able to create your own video player app in X-code. Well done. I hope you enjoyed this walkthrough of the process of creating the video player. Now it's time for you to give it a try.