Simple way to embed an MP3 audio file in a (static) HTML file, starting to play at a specifc position?

I want to produce a simple, static HTML file, that has one or more embedded MP3 files in it. The idea is to have a simple mean of listening to specific parts of an mp3 file. On a single click on a visual element, the sound should start to play; However, not from the beginning of the file, but from a specified starting point in that file (and play to the end of the file). This should work all locally from the client's local filesystem, the HTML file and the MP3 files do not reside on a webserver. **So, how to play the MP3 audio from a specific starting point? The solution I am looking for should be as simple as possible, while working on most browsers, including IE, Firefox and Safari.** *Note: I know the `` tag as described [here][1], but this seems not to work with my target browsers. Also I have read about [jPlayer][2] and other Java-Script-based players, but since I have never coded some JavaScript, I would prefer a HTML-only solution, if possible.* **Update**: By now this has become a live tool, located at [http://quir.li/player.html][3]. I ended up using the excellent [mediaplayer.js by John Dyer][4] [1]: http://www.htmlcodetutorial.com/embeddedobjects/_EMBED_STARTTIME.html [2]: http://www.happyworm.com/jquery/jplayer/ [3]: http://quir.li/player.html [4]: http://mediaelementjs.com/
Why don't you embed your object, and if its using quicktime/flash or whatever, just include the parameter to the plugin so that when they try to use it, it prompts them to install a plugin from the source.

以上就是Simple way to embed an MP3 audio file in a (static) HTML file, starting to play at a specifc position?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏