accessing an audio - Post ID 224498

User 385949 Photo


Registered User
1 post

I have the html code to access an audio file. I want to be able to listen to the audio from my website. I tried using the html feature and placed the code in there, but when I looked at the site, I could see nothing.

How do I use this code:

<script type="text/javascript" src="https://www.freeconferencecalling.com/recordings/jwplayer/jwplayer.js" ></script><div id="IA1205_10032013180402915_1157162">Loading the player ...</div><script type="text/javascript">jwplayer("IA1205_10032013180402915_1157162").setup({ flashplayer: "https://www.freeconferencecalling.com/recordings/jwplayer/player.swf", file: "http://recording.freeconferencecalling.com/mp3/1146603/128798/IA1205_10032013180402915_1157162.mp3", controlbar: "bottom", fullscreen: "false", height: 24, width: 200, modes: [ { type: 'html5' }, { type: 'flash', src: 'https://www.freeconferencecalling.com/recordings/jwplayer/player.swf' }, { type: 'download' } ] }); </script>

Thanks!
User 2147626 Photo


Ambassador
2,958 posts

Do you have a link to the site? It may help someone to help you. :cool:
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 38401 Photo


Senior Advisor
10,951 posts

It would also help if we know what program you're using to put this into your site so we know what type of help to give you on it.
User 187934 Photo


Senior Advisor
20,245 posts

All the files appear to be there. The mp3 works.:) Can you place the code into a test webpage and provide us a link?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2147626 Photo


Ambassador
2,958 posts

There is a simple way to play an audio file. Place the following code in the 'Body' of an HTML box:
<span id="dummy" onclick="playSound(this, 'http://yourwebsite.com/music/yoursoundfile.mp3');">
<img src="http://yourwebsite.com/music/image1.jpg" name="Bottom-1" width="40" height="40" border="0" id="Bottom-1"/>
</span>

Place the following code in the 'Header' of the same HTML box:
<script type="text/javascript">
function playSound(el,soundfile) {
if (el.mp3) {
if(el.mp3.paused) el.mp3.play();
else el.mp3.pause();
} else {
el.mp3 = new Audio(soundfile);
el.mp3.play();
}
}
</script>

Be sure to use the website and path to your audio file. The width and height are the size of the image you want to 'click' on to play the file. Use any image you want. :cool:
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 165894 Photo


Registered User
8 posts

What is the best way to play an mp3 clip on page load? I have been using a java applett called tinyplayer from javazoom.net and it used to work great until the latest Java security updates. They don't offer a digitally signed applett for du to the cost of the code signing certificate, and now java won't load unsigned with lowering the security settings and confirming each run.
I found a this post by Gunsmoke that shows how to play an mp3 file on a link using java script. Can that also be applied to page properties for autoplay on page load?

Thanks,
dg
_______________________
Darrell P. Getz, President
Excel Consulting Ltd.
User 603315 Photo


Registered User
938 posts

excel wrote:
What is the best way to play an mp3 clip on page load? I have been using a java applett called tinyplayer from javazoom.net and it used to work great until the latest Java security updates. They don't offer a digitally signed applett for du to the cost of the code signing certificate, and now java won't load unsigned with lowering the security settings and confirming each run.
I found a this post by Gunsmoke that shows how to play an mp3 file on a link using java script. Can that also be applied to page properties for autoplay on page load?

Thanks,
dg


Either this
<object height="70" width="100" data="example.mp3"></object> or <embed height="70" width="100" src="example.mp3">
should auto play, but do your viewers want auto play? Maybe best to give them a choice. You can change the height and width of these

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.