LivePhotosKit JS 不能播放声音吗?

2017-05-31 08:16:01 +08:00
 islujw

Apple 之前推出的 LivePhotosKit JS 可以在网页上呈现 Live Photos。

Live Photos: https://developer.apple.com/live-photos/

LivePhotosKit JS: https://developer.apple.com/reference/livephotoskitjs/

试着做了一下,成功了,但是没有声音播放出来。

  1. 第一个网页上的两个示例也没能放出声音,但是看它的源文件 .mov 却是有声音的。如果确定不能播放声音,为什么不将源文件的音频除掉以减小大小呢?
  2. 第一个网页上赫然写着「 Live Photos allows you to relive your favorite memories with movement and sound.」特地提到了声音呢。

有没有别的方法可以让声音在播放时出现呢?

1920 次点击
所在节点    Apple
5 条回复
Hant
2017-05-31 14:51:19 +08:00
怎么弄的啊,想弄到自己博客里去,无奈一点都不懂。
islujw
2017-05-31 22:44:02 +08:00
@Hant 点开第二个 URL,里面有详细的步骤。Live Photos 是由一张 .jpg 静态图片和一段 .mov 视频文件组成的。配置上,在第二个 URL 页面的 Declarative HTML 下面的 Listing 3 Sample Code 有配置结构:在头部声明 script 引用,然后在 body 输入照片以及视频路径。Live Photos 的提取上,可以使用 iPhone 拍摄后,在 Mac 上用照片 app 导出源文件,即可获得上述 .jpg 图片和 .mov 视频。
wth123456
2019-04-09 23:24:47 +08:00
感觉就是没声音的,文档里通篇没有写到声音
wth123456
2019-04-09 23:50:45 +08:00
我比对了一下文档
LivePhotosKit.PlaybackStyle.FULL
Play the entire motion content including transition effects at the start and end.

PHLivePhotoViewPlaybackStyle.full
Plays back the entire motion and sound content of the Live Photo, including transition effects at the start and end.
的确是没有声音的。
islujw
2019-04-15 01:21:12 +08:00
@wth123456 这样就很无奈了,第一个页面可是赫然写着 sound 呢

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/364824

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX