开发者

Playing local audio files with Flash and/or HTML5

I realize it is possible to play audio with Flash and HTML5 by passing a URL.

However, is it possible to get a reference to an audio file using a file browser (either with HTML5 or Flash), to then play t开发者_StackOverflow社区his local file, again using either Flash or HTML5?

Of course, this should happen without the interference of a server. Since the file is already on the local system, it does not make sense to route it through a server only to receive the same file again.


Potential solution :

window.URL.createObjectURL and Audio(src)

This solution works with creating object urls and the Image constructor but I'm not sure how solid the Audio constructor support is.

Don't have a browser that supports both of those available but feel free to test them. You'll need to use the HTML5 File API to upload the audio file and manipulate it with JavaScript

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜