Hello everyone, I ran into a problem in that there are 3 tracks {1.mp3,2.mp3,3.mp3}

So, it is necessary to make it so that one of the above mentioned mp3 plays on the page of the site (the thing is that there should be cross-browseriness) play the player (the player, if necessary, is invisible to the human eye (excluding the source code)

Who will offer?

(ability to use "js / html / php / mysql / css /"

    3 answers 3

    If you need good compatibility, I advise you to use ready-made solutions, for example one of the best: http://jplayer.org/ knows a lot,

    • in fact, one JS file, takes about 8kb if the browser is shameful, connects Flash? and the default is HTML5

    quote where supported:

    • Windows: Firefox, Chrome, Opera, Safari, IE6, IE7, IE8, IE9 OSX: Safari, Firefox, Chrome, Opera iOS: Mobile Safari: iPad, iPhone, iPod Touch Android: Android 2.3 Browser Blackberry: OS 7 Phone Browser, PlayBook Browser

    Pro sounds supports both Mp3 and

    • HTML5: mp3, mp4 (AAC / H.264), ogg (Vorbis / Theora), webm (Vorbis / VP8), wav Flash: mp3, mp4 (AAC / H.264), flv

    sin not to use, and not reinvent the wheel. Substitute random as you wish. The only thing - you have to figure out how to connect it, but this is a one-time work, but then you can connect anywhere and please the visitors.

    And yes, I am also not a supporter of music by default, but all sorts of sites are in fact.

    • the path will give users a view switch to turn it off and everything will be fine =) - Zowie
    • best-hoster.ru is an example of unreasonable inclusion of music (a hoster, a site for providing a completely different service, not an MP3 player) tochnoe-vremya.ru is an example of reasonable inclusion, the radio turns on right away, and then the first time it will not turn on, but will turn on only if the user chose the station himself last time. - jkeks
    • one
      I liked the phrase “if the browser is shameful”: D - Zowie
    • Aha, there are still enterprises where people behind Windows98 sit and do not buzz. - jkeks
    • Yes, he himself is not a supporter of music on websites. But the problem is that it will be something like training on the site in different variations (main page 3 variations ... etc) Thanks to everyone for the answers, the last one seemed more or less suitable. - Quiss

    HTML5 :)

    In general, I really hate when a melody plays on a page without my participation, I immediately close this page!

    • the chip is that there should be cross-browsering The chip is that HTML5 is not about cross-browsering - Zowie
    • Well, I have described in more detail that the sound on the page is fake! :) - Artem

    Cross-browser compatibility can only guarantee flash, and generating a random number from 1 to 3 is not a problem at all, making the player invisible, all the more.