Storing Videos in the Photo Library(储存视频至手机)
来源:互联网 发布:sem优化是什么意思 编辑:程序博客网 时间:2024/05/17 22:22
1。导入:#import <AssetsLibrary/AssetsLibrary.h>
方法:writeVideoAtPathToSavedPhotosAlbum
e.g.
ALAssetsLibrary *assetsLibrary = [[ALAssetsLibrary alloc] init];
//将应用程序中可获取到的视频资源MyVideo.MOV存入手机
NSURL *videoURL = [[NSBundle mainBundle] URLForResource:@"MyVideo" withExtension:@"MOV"];
if (videoURL != nil){
[assetsLibrary writeVideoAtPathToSavedPhotosAlbum:videoURL
completionBlock:^(NSURL *assetURL, NSError *error) {
if (error == nil){
NSLog(@"succeed in saving videos,no errors happened");
} else {
NSLog(@"Error happened while saving the video.");
NSLog(@"The error is = %@", error);
}
}];
} else {
NSLog(@"Could not find the video in the app bundle.");
}
- Storing Videos in the Photo Library(储存视频至手机)
- Storing Photos in the Photo Library(储存相片至手机)
- Retrieving Photos and Videos from the Photo Library(从手机中检索相片,视频 )
- HTML 视频(Videos)
- Editing Videos on an ios Device(编辑手机上的视频)
- 从照片库中选择一个项目(Picking an Item from the Photo Library)
- CV | Semantic Co-segmentation in Videos 视频协同语义分割
- 视频中的运动特征--Learning Motion Patterns in Videos
- Storing data in browser
- Retrieving Assets from the Assets Library(不用内置GUI组件,检索手机中的相片/视频资源)
- Taking Videos with the Camera(摄像)
- Encoding videos in H264
- Storing nested objects in Redis
- web前端-HTML 视频(Videos) 024
- Storing the SecurityContext between requests
- 视频动作识别--Two-Stream Convolutional Networks for Action Recognition in Videos
- 视频分割--Learning to Segment Instances in Videos with Spatial Propagation Network
- photo in office
- iOS开发笔记--UIImageView的属性之animationImages详解
- Java:对象与垃圾回收
- @autoreleasepool内存管理
- 虚拟机VMware里 windows server 2003 扩充C盘方法
- cakephp在linux或者mac上部署的重定向问题
- Storing Videos in the Photo Library(储存视频至手机)
- iOS开发笔记--连续跳转上层页面
- 可见光通讯,无需wifi就能上网。
- 2014-01-29-日志2
- 删除表外键
- 年前的最后一天_写给自己
- 关于mtd字符设备的操作
- 关于直接编写应用程序读写/dev/mtd0 或者 /dev/mtdblock0的问题。
- openjudge 计算概论-数组练习-错误侦测