Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript/Flash tiny, cross-browser sound player

I was searching for Javascript/Flash tiny, cross-browser sound player (notifier), but every solution I've met was or too big and feature-full, or based on different libraries (not on Jquery I'm using), or with bugs. The only feature I need is 'play'. :)

For example, http://flash-mp3-player.net/players/js/download/ - this nice little player does not work in Firefox (SetVariable issue).

I'm working on it almost for 3 days and nights. )

Please recommend tiny, cross-browser implementation. Thank you!

like image 508
topright gamedev Avatar asked Jul 13 '10 10:07

topright gamedev


People also ask

How do I get JavaScript to play audio?

play() to Play Audio Files in JavaScript. We can load an audio file in JavaScript simply by creating an audio object instance, i.e. using new Audio() . After an audio file is loaded, we can play it using the . play() function.

Which JavaScript property allows you to control the volume of sound through JavaScript?

The volume property allows us to set the audio volume, as a number between 0 and 1.

How can I play audio from a website?

To play sound file in the background on a web page, use the <embed>… </embed> element. Also, use the autoplay attribute. This will run music in the background whenever the page loads.

How do you handle browsers that do not support the audio element?

Allow sites to play sound on Chrome Click Privacy and security and then select Site settings. Scroll down to Content and then expand the additional content settings. Scroll down and select Sound. Allow sites to play sound button should be on.


1 Answers

You could use SoundManager 2, allegedly used by last.fm and soundcloud.

like image 113
Vinz Avatar answered Oct 13 '22 05:10

Vinz