How Can i Get the List of all Video files from Library in ios sdk

前端 未结 7 2433
[愿得一人]
[愿得一人] 2020-12-09 06:13

Hi I\'m working On videos , i would like get the list of video files from library to Display and playing the Videos in my app. can any one help me.

相关标签:
7条回答
  • 2020-12-09 07:04

    use this method To pick videos From Library.

          //Call this method.
         [self startMediaBrowserFromViewController: self usingDelegate: self];
    
    
       - (BOOL) startMediaBrowserFromViewController: (UIViewController*) controller usingDelegate: (id <UIImagePickerControllerDelegate, UINavigationControllerDelegate>) delegate{
    
           if (([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeSavedPhotosAlbum] == NO) || (delegate == nil) || (controller == nil))
               return NO;
    
           UIImagePickerController *mediaUI = [[UIImagePickerController alloc] init];
           mediaUI.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    
           mediaUI.mediaTypes = [[[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil] autorelease];
           mediaUI.allowsEditing = YES;
           mediaUI.delegate = self;
           mediaUI.videoMaximumDuration = 60.0;
           //mediaUI.videoQuality = UIImagePickerControllerQualityTypeLow;
    
           [controller presentModalViewController: mediaUI animated: YES];
           return YES;
       }
    
    0 讨论(0)
提交回复
热议问题