javascript - How to USE <embed> tag for music player control? -
i'm using html tag control mp3 file. learnt 2 method start , stop embeded music in html using javascript works in ie
function play() { document.embeds[0].play(); } function stop() { document.embeds[0].stop(); }
and js code below:
<body> <embed height="50" width="100" src="demo.mp3" autostart="false" loop="true"> <script type="text/javascript"> function play() { document.embeds[0].play(); } function stop() { document.embeds[0].stop(); } function pause() { document.embeds[0].pause(); } function forward() { //how? } function rewind() { //how? } function volumeup() { //how add volume? } function volumedown() { //how turn down? } </script> </body>
and,the problem obvious still coundnot find out method or function of embed control mp3 player after looong searching.
and have tried audio tag,however in ie9(and 10 also) still cannot work well,it trun out black box red error symbol.
so,can give me advice?thx.
Comments
Post a Comment