问题标签 [apple-live-photos]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
65 浏览

google-drive-api - How do I retrieve the image component of an iOS live photo from the Google Drive API?

We fetch a lot of media from Google's Drive API on behalf of our users. We care about photos and videos and we determine which is which via the mime type. The files endpoint is what we use to do this:

https://developers.google.com/drive/v2/reference/files

However, since about mid-2016 Google Photos began backing up iOS live photos, which have a still image component and a video component. My questions is, how do I programmatically determine which is which and once I've detected a live photo, how do I access just the image component?

In practice what I've found is that live photos return as video/mp4 with a file extension of .JPG. However, the only image I have access to is a thumbnail.

0 投票
0 回答
148 浏览

ios - 如何将具有反弹或循环类型的实时照片保存到照片库?

我已被保存Live Photos到照片库,如下所示。

但您可能知道,Live Photos 中有一个新功能,用户可以使用 iOS 11 以上的新类型(反弹、循环)编辑 Live Photos。

当涉及到普通的 Live Photos 时,我已经编写的代码运行良好。但是使用新类型(反弹、循环)制作的 Live Photos 并没有像我预期的那样工作。

当我尝试用它保存实时照片时,我收到了这个错误:

ERROR: Err-1 not found in table FoundationErrors of bundle CFBundle </System/Library/Frameworks/Foundation.framework> (not loaded)

那么有没有办法将具有新类型(反弹,循环)的实时照片保存到照片库?

0 投票
0 回答
270 浏览

swift - 拍摄 LivePhoto 图像时可以设置不同的纵横比吗?

我正在使用 Swifts 4 SDK 在我的应用程序中拍摄实时照片。

是否可以拍摄不同纵横比的实时照片图像?我想支持 4:3、16:9 和 1:1。我将添加一些关于如何拍摄照片的代码,我不知道如何更改宽高比,而且我知道这可能不是一项简单的任务,因为 LivePhoto 既有视频部分,也有照片部分。

那么有可能做到吗?如果是这样,如何?

0 投票
0 回答
75 浏览

ios - 针对某些苹果实时图像编写视频时出错

我正在我的自定义应用程序中填充画廊资产。在我的应用程序中,苹果实时图像被视为视频。我明确写了一个针对苹果实时图像的视频。我的一些苹果实时图像被正确地写为视频,而我的一些图像出现错误。NSError 错误描述说:“操作无法完成。[可可错误-1]。

以下方法对某些媒体对象返回错误:PHAssetResourceManager's writeDataForAssetResource

以下是我的方法,它将苹果实时标识符数组和我的自定义对象数组作为参数,并通过在自定义对象数组中根据传递的苹果实时标识符标识符查找资产来进行处理。

0 投票
1 回答
671 浏览

ios - UIImagePickerController with a source of savedPhotosAlbum won't show Live Photos?

I'm working in an app where a user has a profile picture. One of the remarks that someone had was that when you open the library, live pictures weren't shown. I tried adding the media type like this:

However, when I did this, my app crashed, and it gave me the following error:

This was tested on an iPhone 7, running iOS 11.0 and an iPhone 8 plus, running iOS 11.2

Is there something I'm missing, perhaps some extra step I forgot when trying to use Live Photos?

Thanks.

0 投票
1 回答
633 浏览

ios - 如何在 iOS Swift 中显示库中的实时照片视频并在 Collection-View 中显示?

显示实时照片:

并在网格代码中显示如下:

而对于获取视频,我正在使用这个谓词:

但是在 Collectionview 中两者都没有显示。

0 投票
0 回答
348 浏览

ios - 使用带有 UIActivityViewController 的 PHLivePhoto

尝试在 UIActivityViewController 中将 PHLivePhoto 共享为活动,而没有任何结果超过控制台输出:

  • 未找到资源(已记录 3 次)

我使用来自文档目录的本地 URL 的 PHLivePhoto 请求:两个文件都已经存在。我设置了一个 PHLivePhotoView,完成 Live Photo 女巫工作正常,我可以毫无问题地复制/重播。

问题是我不太确定活动的内容应该是什么,我尝试过没有任何结果:

一直在尝试填写以下活动项目:

  • URL 文档路径(存在视频和图像的位置)
  • 来自图像和视频的 URL(倒序)
  • LivePhoto 本身(如下代码)
  • 尝试像其他人建议的那样延迟 LivePhoto 创建。
0 投票
0 回答
373 浏览

ios - 如何从 URL 将 Live Photo 保存到图库?

我目前正在从 url 保存实时图像。但是互联网上没有太多文件,我坚持这一点。我已经检查过这段代码,它真的很有帮助,但不幸的是它只会将你录制的视频转换为 Live Photo。所以我正在尝试的是,从一个 mov 格式的视频的 URL 制作和保存实时照片。

希望有人有解决方案。谢谢..

0 投票
0 回答
255 浏览

objective-c - iOS - 无法将 .MOV 和 .jpg 保存为 LivePhoto - 显示错误 NSCocoaErrorDomain Code=-1 [目标 C]

我想用 jpg 和 MOV 的混合物以编程方式创建实时照片。下面是我的实现代码

这些是文件 jpg 文件的链接 - http://18.220.72.107/hd_wallpapers/images/animation/43625_wallpaper-2.jpg

MOV 文件 - http://18.220.72.107/hd_wallpapers/images/animation/43625_wallpaper-2.MOV

我的 MOV 和 JPG 来自服务器。相同的代码适用于放置在本地文件中的项目。

每当代码执行时,它都会抛出Error Domain=NSCocoaErrorDomain Code=-1

0 投票
1 回答
941 浏览

ios - Swift - 从 mov 和 jpg 文件创建 Live Photo

我想从 mov 和 jpg 文件创建实时照片。我找到了 LivePhoto 库https://github.com/LimitPoint/LivePhoto

当我调用生成函数时,我收到一个错误 - “调用中的参数'完成'缺少参数”。

我应该怎么做才能解决这个问题?