![]() ![]() Let videoPlayerViewController = self.storyboard!.instantiateViewControllerWithIdentifier("VideoPlayerViewController") as! VideoPlayerViewController Self.dismissViewControllerAnimated(true, completion: nil) Self.presentViewController(imagePickerController, animated: true, completion: nil)įollowing delegate method of UIImagePickerController is called once I pick video from image picker: func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: ) Let imagePickerController = UIImagePickerController() Now I have to add current class to the subclass of UIImagePickerControllerDelegate and UINavigationControllerDelegate. If you don't have any idea about UIImagePickerController and how to pick video from picker then please refer following link: Step 2 Select Video Using UIImagePickerControllerįirst of all, I would be fetching all the videos from the device using UIImagePickerConroller. Now I will move towards Part - 1: Play audio. If you don't have any idea about how to create project please refer following link: If you don’t have any idea about AVFoundation, then please refer following link: This blog post is divided into two parts: My focus for this blog post would be on playing audio & video using AVFoundation Framework. The primary class that is used by AVFoundation Framework is AVAsset.Īn AVAsset instance is an aggregated representation of a collection of one or more media which includes audio, video, photos, etc.ĪVAsset is used to get information about media such as: So let's dive deeper into AVFoundation Framework.ĪVFoundation Framework is gives easy access to following operations in your iOS app. I will use AVFoundation Framework throughout this tutorial to play audios and videos. You can get more idea of AVFoundation Framework by this link: ![]() If you would like to interact with audio or video in your iOS application without using any third party libraries, the easiest way to would be through AVFoundation Framework. There are number of ways to play audio and video in your ios devices. In this tutorial, I will teach how you can play audio and video in your iOS application in simple steps. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |