Small instance for IOS development-create a simple app for video recording and playback, ios instance
I still read the entry-level IOS article "Create a Simple App for Video Recording and Playback", which mainly involves the basic implementation of the Video Recording and Playback functions.
The iOS API is used to record and play videos. It is a bit confusing for new IOS beginners because there are several available options. If you just want to play a video, you can use the MediaPlayer framework, which allows us to play the video stored locally on our device, or from a remote location. However, if you need advanced features such as Media Asset Management, media editing, tracking management, and others, you must use the AVFoundation framework. We will continue to make things simple by overwriting the MediaPlayer framework.
Most importantly, the MediaPlayer framework brings us two categories to show videos or movies. If you want to instantly display the video and inline (for example, the sub-view is smaller than the full screen), you should use MPMoviePlayerController. The MPMoviePlayerController is used to play a video in a view owned by the movie player. You can view the idea of playing a movie to the view owned by your application. Conversely, if you want to play a full-screen video by displaying the video mode, for example, you should use the MPMoviePlayerViewController class. This MPMoviePlayerViewController course is designed to introduce the simple view Control Strategy for full screen movies.
In this tutorial, we will focus on the MPMoviePlayerController. If you have basic knowledge, but yes, you should use the MPMoviePlayerViewController class.
First, we will give an overview of the application demonstration:
In any other tutorial, we will build a simple demo application to guide you through this concept. The demo application is very simple without a fancy user interface. Once opened, the application displays a screen with a single "capture" button. When you click the button, the video recording camera will pop up. Once the recording is completed, the video is automatically displayed on the home screen. Allows users to play embedded videos. It's easy, isn't it?