objective c - Unable to set different video duration for capture and edit video in ios -
i working on project in need set 1 minute video recording user should , edit , select video of 30 second duration.
below code used enable 30 second maximum editing time.
-(bool)startcameracontrollerfromviewcontroller: (uiviewcontroller*) controller usingdelegate: (id <uiimagepickercontrollerdelegate, uinavigationcontrollerdelegate>) delegate { if (([uiimagepickercontroller issourcetypeavailable:uiimagepickercontrollersourcetypecamera] == no) || (delegate == nil) || (controller == nil)) { return no; } uiimagepickercontroller *cameraui = [[uiimagepickercontroller alloc] init]; cameraui.sourcetype = uiimagepickercontrollersourcetypecamera; // displays control allows user choose movie capture cameraui.mediatypes = [[nsarray alloc] initwithobjects: (nsstring *) kuttypemovie, nil]; // hides controls moving & scaling pictures, or // trimming movies. instead show controls, use yes. cameraui.allowsediting = yes; cameraui.videomaximumduration = 30; cameraui.delegate = delegate; [controller presentmodalviewcontroller: cameraui animated: yes]; return yes; }
any highly appreciated.
apple has provided sample video editing. can refer aveditdemo sample in wwdc 2010 sample code pack think so....
Comments
Post a Comment