V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
islujw
V2EX  ›  Apple

LivePhotosKit JS 不能播放声音吗?

  •  
  •   islujw · 2017-05-31 08:16:01 +08:00 · 1888 次点击
    这是一个创建于 2494 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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.」特地提到了声音呢。

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

    5 条回复    2019-04-15 01:21:12 +08:00
    Hant
        1
    Hant  
       2017-05-31 14:51:19 +08:00
    怎么弄的啊,想弄到自己博客里去,无奈一点都不懂。
    islujw
        2
    islujw  
    OP
       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
        3
    wth123456  
       2019-04-09 23:24:47 +08:00
    感觉就是没声音的,文档里通篇没有写到声音
    wth123456
        4
    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
        5
    islujw  
    OP
       2019-04-15 01:21:12 +08:00
    @wth123456 这样就很无奈了,第一个页面可是赫然写着 sound 呢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5866 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 02:16 · PVG 10:16 · LAX 19:16 · JFK 22:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.