HTML5 audio starts from the wrong position in Firefox

后端 未结 5 1005
栀梦
栀梦 2021-01-04 12:09

I\'m trying to play an mp3 file and I want to jump to specific location in the file. In Chrome 33 on Windows, the file jumps the correct position (as compared with VLC play

5条回答
  •  孤独总比滥情好
    2021-01-04 12:41

    I met the same issue, and I solved it by converting my MP3 file to the CBR(Constant Bit Rate) format. Then, it can solve the inconsistent issue between the currentTime and the real sound.

    Choose the CBR format


    Steps:

    • Download and install "Audacity" (it's a free for any platform)
    • Open your MP3 file
    • Click [File] -> [Export] -> [Options] -> [Constant] (See: Converting MP3 to Constant Bit Rate)
    • Audacity will ask you to provide the LAME MP3 encoder (See: [download and install the LAME MP3 encoder])

    There will be no inconsistent/asynchronous issue.


    Also see:

    • HTML5 audio starts from the wrong position in Firefox
    • Inconsistent seeking in HTML5 Audio player

    tsungjung411@gmail.com

提交回复
热议问题