Friday 15 June 2012

javascript - How to provide audio preview in Safari without loading file into memory -



javascript - How to provide audio preview in Safari without loading file into memory -

i have web page allows users select multiple .wav files using file select button of form. each .wav displayed using next markup:

<audio src="blob:f3xyz808-1a65-440e-8e5f-b5djfht4ad1a" controls=""></audio>

this works fine in chrome , firefox. in safari, however, if seek load many .wavs @ 1 time stops loading. using javascript console can see memory safari using grows each .wav , can reach upwards of 2gb. chrome, memory usage not increment significantly. seems chrome , ff stream files disk. possible safari?

edit: looks possible solution first problem include: preload="none" in sound tag

on separate related note: seems browsers decode sound files, @ to the lowest degree extent, when added sound tag, because if file invalid complain. possible access decoded info without creating sound buffer in memory. specifically, want create graph of files' volume level vs. time. currently, decoding arraybuffer using web sound api. uses lot of memory. possible volume level info .wav's raw binary data?

i realize question has shortcomings. little vague on of concepts.

any tips or suggestions great help. give thanks you.

javascript audio safari html5-audio web-audio

No comments:

Post a Comment