doubt- play mp3

13 views
Skip to first unread message

Vijay Ahire

unread,
Dec 10, 2015, 1:43:45 AM12/10/15
to Professi...@googlegroups.com
Hi All.


I save simple script to play mp3 file on click of button.
it works well on local.

but when i upload on server it does not. Do i need to install any library to support this related with sound ?



<html>
<head>
<script language="javascript">
function playIt()
{
   document.getElementById("embed").innerHTML="<embed src='280.mp3' autostart=true loop=false volume=100 hidden=true>";
   return true;
}
</script>
</head>
<body>
    <form action="" method="post">
         <button type="button" onclick="playIt()">play</button>
        <div id="embed"></div>
    </form>
</body>
</html>





Thanks & Regards,
Vijay Ahire

Ovidiu Alexa

unread,
Jan 3, 2016, 9:27:34 AM1/3/16
to professi...@googlegroups.com
Can you access http://YOURDOMAIN/280.mp3 ? Does it download or does the (modern) browser display the little player? Please look at the javascript errors, if any. Furthermore look at any http traffic and catch any http error codes such as 404, 401, 500

--
This group is managed by the web application development team at www.360psg.com
---
You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to professional-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/professional-php.
To view this discussion on the web visit https://groups.google.com/d/msgid/professional-php/CAHR1qCFJ-oOsf-yQ7SGksrFxfVdMDDyEm9BxXDaSLHoJY2QLuw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages