Iphone - 视频录制应用程序 - 使用相机胶卷或存储在应用程序/数据库中?
对于那些制作录制视频的 iPhone 应用程序的人,
- 您是否使用相机胶卷进行存储,然后对资产 URL 进行索引?
- 或者您是否以某种方式将视频保存到应用程序/捆绑包/数据库中?
stackoverflow 社区是否认为仅存储用于重播的资源 URL 是可行的,还是应该以某种方式存储录制的视频?
我问的原因是,如果您只存储 URL,并且用户无意中从相机胶卷中删除了视频,那么应用程序将失去同步等。这可以处理,但远非理想。
意见/疑问/建议?
For those of you making iphone applications that record video
- Are you utilising the camera roll for storage and then indexing the asset URL?
- Or are you somehow saving the video to the app / bundle / database?
Does the stackoverflow community think it is viable to just store the asset url for replaying or that one should somehow store the recorded vid?
The reason I ask, is that if you just store the URL, and the user inadvertently removes the video from the camera roll then the app will fall out of sync etc. This could be handled but far from ideal.
Comments / queries / suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您想要将本地数据保存到 NSDocumentDirectory(或 NSLibraryDirectory/如果您启用了文件共享并且不希望用户从 iTunes 访问它)。
将其存储在相机胶卷中的优点是,假设您希望用户访问它,则用户可以更轻松地访问它。
我建议将其粘贴在 NSDocumentDirectory 中,并启用文件共享(如果您希望用户访问它),或者如果您不希望它在您脚下消失,则不启用文件共享(我会谨慎地假设它永远不会但不同步)。
You want to save local data to NSDocumentDirectory (or NSLibraryDirectory/whatever if you've enabled file sharing and don't want users to access it from iTunes).
Storing it in the camera roll has the advantage that it's easier for the user to access, assuming you want them to access it.
I'd suggest sticking it in NSDocumentDirectory and enabling file sharing if you want the user to access it, or not enabling file sharing if you don't want it to disappear under your feet (I'd be wary of assuming that it can never get out of sync though).
您是否考虑过使用 CoreData 来实现这一点?
Have you considered using CoreData for that?