kookxiang
V2EX  ›  HTML

HTML5 Audio 好像在 IE / Edge 浏览器上有点问题

  •  
  •   kookxiang ·
    kookxiang · Sep 15, 2015 · 3623 views
    This topic created in 3965 days ago, the information mentioned may be changed or developed.

    currentTime 属性值傻逼了,例:

    <audio src="http://ikk.me/usr/uploads/2015/07/2619546082.mp3"></audio>

    然后在 console 跑:

    $0.play ();
    $0.currentTime = 70

    然后再查询下 $0.currentTime 返回 279.2627362
    而实际上音乐还在 70s 的位置

    如果播放过程中不通过 js 调整播放进度的话那么 currentTime 的值是准确的。
    而且这首歌每次跳到 70s 都会变成 280s 。
    另一首歌跳到 70s 变成 83s 。

    Chrome 下就没这个问题,音频文件都是 mp3 格式,好神奇

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2400 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:07 · PVG 00:07 · LAX 09:07 · JFK 12:07
    ♥ Do have faith in what you're doing.