Preface: Or Look at a foreign entry iOS article: "Create a simple App for video recording and Playback", mainly related to video recording and playback of the basic implementation of the function.
iOS's API for recording and playing video is a bit confusing for newcomers to new iOS because there are several options available. If you just want to play a video, you can use the MediaPlayer frame, which allows us to play the video locally stored 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'll keep things simple, by covering the MediaPlayer framework to start.
Most importantly, in the MediaPlayer framework, we have brought two major classes to show video or movies. If you want to immediately display video and inline (such as a sub-view smaller than the full screen), you should use the MPMoviePlayerController. By using the MPMoviePlayerController, the playback occurs in the view that is played by the movie. You can put a movie on the view that your application owns. Conversely, if you want to play full-screen video by showing video mode, for example, you should use the Mpmovieplayerviewcontroller class. The Mpmovieplayerviewcontroller course aims to introduce a simple view control for displaying full-screen movies.
In this tutorial, we will focus on the MPMoviePlayerController. If you master the basics, however, you should take advantage of the Mpmovieplayerviewcontroller class without problems.
Let's summarize the demo of the app:
Like 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 single "capture" button with a screen. When you tap the button, the video recording camera pops up. Once the recording is complete, the video is automatically displayed on the home screen. Allows the user to play video inline. It's simple, isn't it?
Small instances of iOS development-creating a simple application for video recording and playback