Posts

Showing posts with the label iOS – Audio and Video

iOS – Audio and Video

Image
In this article we are reading about  “ iOS – Audio and Video ” . Audio and video is quite common in the latest devices. It is supported in iOS with the help of  AVFoundation.framework  and  MediaPlayer.framework respectively. Steps Involved Step 1  − Create a simple  View based application . Step 2  − Select your project file, select targets, and then we should add  AVFoundation.framework  and  MediaPlayer.framework . Step 3  − Add two buttons in ViewController.xib and create an action for playing audio and video respectively. Step 4  − Update  ViewController.h  as follows − 1 2 3 4 5 6 7 8 9 10 11 #import  & lt ; UIKit / UIKit. h & gt ; #import  & lt ; AVFoundation / AVFoundation. h & gt ; #import  & lt ; MediaPlayer / MediaPlayer. h & gt ; @interface ViewController  :   UIViewController   { AVAudioPlayer  * audioPlayer ; MPMoviePlayerVie...