islujw
V2EX  ›  Apple

LivePhotosKit JS 不能播放声音吗?

  •  
  •   islujw · May 31, 2017 · 2855 views
    This topic created in 3271 days ago, the information mentioned may be changed or developed.

    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 replies    2019-04-15 01:21:12 +08:00
    Hant
        1
    Hant  
       May 31, 2017
    怎么弄的啊,想弄到自己博客里去,无奈一点都不懂。
    islujw
        2
    islujw  
    OP
       May 31, 2017
    @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  
       Apr 9, 2019
    感觉就是没声音的,文档里通篇没有写到声音
    wth123456
        4
    wth123456  
       Apr 9, 2019
    我比对了一下文档
    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
       Apr 15, 2019
    @wth123456 这样就很无奈了,第一个页面可是赫然写着 sound 呢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2893 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 12:03 · PVG 20:03 · LAX 05:03 · JFK 08:03
    ♥ Do have faith in what you're doing.