playing mp3 in the background (no player visible)

8,133 views
Skip to first unread message

snooper

unread,
May 15, 2012, 6:11:42 PM5/15/12
to jpl...@googlegroups.com
hi folks.

this plugin looks great.

i know, i know, everyone hates when music plays when you enter the site, bur for this one site, i really need it done.
can this be done with jPlayer? ie - have no player visible, and just have the music play when the page has loaded?

thanks!

Mark Panaghiston

unread,
Jun 8, 2012, 7:05:24 AM6/8/12
to jpl...@googlegroups.com
Like this:
http://www.jplayer.org/latest/quick-start-guide/example-audio-soundtrack/


On Monday, 4 June 2012 06:26:17 UTC+1, Nitin Mukesh wrote:
Yes its possible as jPlayer itself has no interface

Include script
    <script type="text/javascript" src="../js/jquery.jplayer.min.js"></script>

Include div for jPlayer
    <div id="jquery_audioPlayer" class="jp-jplayer"></div>

Initialize jPlayer
    $("#jquery_audioPlayer").jPlayer({
        swfPath: "../js",
        wmode: "window"
    });

now when you want to play audio use the code

    $('#jquery_audioPlayer').jPlayer("setMedia", {mp3:"mp3 file path"});
    $('#jquery_audioPlayer').jPlayer("supplied", "mp3");
    $('#jquery_audioPlayer').jPlayer("play");

Papa Orange

unread,
Oct 5, 2012, 5:54:13 PM10/5/12
to jpl...@googlegroups.com
You could put some jquery and put the visibility at false.

Mark Panaghiston

unread,
Oct 8, 2012, 12:34:04 PM10/8/12
to jpl...@googlegroups.com
Reviewed on Nexus 7. Android 4.1.1.
http://jplayer.org/latest/quick-start-guide/example-audio-soundtrack/

Chrome played when you touched the screen.
Opera Mobile played when the page loaded.


On Tuesday, 2 October 2012 23:09:44 UTC+1, Bob wrote:
Ok, 

and how would this example look with the fix so that it also works on Chrome for Android (this is html5 without flash)
Also on Opera Mobile for Android it displays three characters



Any idea?

Thanks!
Reply all
Reply to author
Forward
0 new messages