Is there a way to autostart JPlayer?

9,646 views
Skip to first unread message

marvette

unread,
Feb 9, 2012, 7:27:45 AM2/9/12
to jPlayer: HTML5 Audio & Video for jQuery
Hi guys,

I've searched this group and I've searched the Internet, but I can't
find the answer to my (simple?) question. I have a working Jplayer on
my site. It's great! Plays on all platforms, iPads, etc.....

I'm trying to set it to AutoPlay. But I have not succeeded yet. Is
there anyone who knows how to set the following code to autoplay?

<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
$("#jquery_jplayer_1").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", {
mp3:"http://server-09.stream-server.nl:8532/;listen.pls"
});
},
swfPath: "js",
supplied: "mp3",
wmode: "window"
});


});


//]]>
</script>

Thanks for all messages
Yvette

Mark

unread,
Feb 9, 2012, 8:08:05 AM2/9/12
to jpl...@googlegroups.com
Hi Yvette,

Try the play function http://jplayer.org/latest/developer-guide/#jPlayer-play there's an example of how to autoplay in the example code.

Cheers

Mark B


--
You received this message because you are subscribed to the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
To post to this group, send email to jpl...@googlegroups.com.
To unsubscribe from this group, send email to jplayer+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jplayer?hl=en.


marvette

unread,
Feb 9, 2012, 12:49:59 PM2/9/12
to jpl...@googlegroups.com
Thanks for helping me looking in the right direction. It works!
Take a look at www.hitz24.nl to hear for yourself!
 
Yvette

Ravindu Bimsara

unread,
Jul 22, 2019, 3:21:44 AM7/22/19
to jPlayer: HTML5 Audio & Video for jQuery
can you please provide me with a example code for or something for the autoplay thing? I'm Developing a site same as yours I need a solution for this as soon as possible.

Nick C

unread,
May 18, 2020, 1:44:59 PM5/18/20
to jPlayer: HTML5 Audio & Video for jQuery
Last I heard, Safari (and other mobile browsers?) prevented this from working.  This was intentional.

That said, the autoplay still seems to work for a playlist, at least, in a Chrome Browser, using this code:

playlistOptions: {
autoPlay: true
},
Reply all
Reply to author
Forward
0 new messages