Small instances of iOS development-creating a simple application for video recording and playback

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.