jplayer

jplayer ready event with playlist addon

孤街浪徒 提交于 2019-12-11 06:00:01
问题 Further to my previous post about when/where to dynamically add items to a playlist, it appears that the jPlayer ready event handler function is not available when the Playlist add-on is used, as can be seen by a simple example: $(function () { var MyPlayList = new jPlayerPlaylist({ jPlayer: "#jquery_jplayer_1", cssSelectorAncestor: "#jp_container_1" }, [], { smoothPlayBar: true, supplied: "mp3" }); $("#jquery_jplayer_1").jPlayer({ ready: function () { alert('here'); } }); Whether this is

Is it possible to play this stream using HTML5/javascript?

让人想犯罪 __ 提交于 2019-12-11 02:51:28
问题 Basically trying to play some live audio streams in an app I'm porting to the browser. Stream example: http://kzzp-fm.akacast.akamaistream.net/7/877/19757/v1/auth.akacast.akamaistream.net/kzzp-fm/ I have tried HTML5 audio tag and jPlayer with no luck. I know next to nothing about streaming audio, however, when I examine the HTTP response header the specified content type is "audio/aacp" (not sure if that helps). I'm hoping someone with more knowledge of audio formats could point me in the

jPlayer 2.2.0: display track title in separate div on page load

送分小仙女□ 提交于 2019-12-11 02:32:50
问题 I'm working with jPlayer directly since the mp3-jplayer plugin for WordPress broke with the WP 3.5 update, and it seems to be abandoned by the developer. One of the nice features of the plugin is that it displays the title of the current track in a div above the control bar. Also, if there's only a single song in the playlist, there's a script to hide the playlist, so you only have the track title above the control bar. I'm trying to add this functionality to the regular (non-plugin) jPlayer.

How to disable jQuery.jplayer autoplay?

只谈情不闲聊 提交于 2019-12-10 23:57:07
问题 when i initialize the player like this: $("#jquery_jplayer").jPlayer({ ready: function () { this.element.jPlayer("setFile", "/previews/cancion.mp3", "/previews/horse.ogg").jPlayer("play"); }, volume: 50, oggSupport: true }) is there any way to disable the autoplay? 回答1: Remove .jPlayer("play") 回答2: how about reading the manual: http://www.happyworm.com/jquery/jplayer/latest/developer-guide.htm to disable looping (repeat) i would try: $("#jpId").jPlayer("onSoundComplete", function() { //

Music Player select some songs and play in rails

倾然丶 夕夏残阳落幕 提交于 2019-12-10 20:54:53
问题 In my rails 4 application I have jplayer to play music files , its works fine and I need to add select some songs from playlist using check-box and play option ,Its harder to customize the default jplayer playlist so that I have created a separate playlist and the code is <%= form_tag album_path , method: :get, id: "sel" do %> <%= submit_tag "play", name: nil, :class => "btn btn-success " %> <%= link_to "Play All", album_path , :class => "btn btn-success "%> <% @album.audios.each do |audio| %

JPlayer mp3 not working (chrome)

笑着哭i 提交于 2019-12-10 17:26:54
问题 I'm trying to set up JPlayer on a website in Chrome. I have an mp3 and ogg file on the server called: test.mp3 and test.ogg. If I set the media to mp3 supplied and the mp3 path, it doesn't work. If I do the same for the ogg file, it works. I also can hit www.website.com/test.ogg and it plays the audio. However, if I hit www.website.com/test.mp3, it doesn't play the mp3 audio. Here is my HTACCESS: AddType audio/mpeg mp3 Server appears to accept range requests: Response Headersview source

jQuery jPlayer - How to stop all players before playing a new one?

瘦欲@ 提交于 2019-12-10 14:22:39
问题 I need to stop all other instances of jPlayer before playing a new one when i click play. Thanks for you help. 回答1: SOLVED just assigned onclick function to the play trigger and the functions does: function stopall(){ $(".jplyrselectr").jPlayer("stop"); } 回答2: Give all of your players a class (I think default is class="jp-jplayer"), then include the following "play" event handler in your initialisation options: $("#jplayer1").jPlayer({ ready: function() { $(this).jPlayer("setMedia", { mp3:

jPlayer not playing mp3 in Firefox

穿精又带淫゛_ 提交于 2019-12-10 10:27:08
问题 I'm integrating jplayer to play a selection of mp3 files triggered by an click event using jQuery. The code used to achieve this is: $('.play-link').click(function() { $("#jquery_jplayer_1").jPlayer("destroy"); srcFile = $(this).attr('href'); $("#jquery_jplayer_1").jPlayer({ ready: function (event) { $(this).jPlayer("setMedia", { mp3:srcFile }).jPlayer("play"); }, swfPath: "http://www.mydomain.co.uk/swf/Jplayer.swf", supplied: "mp3", wmode: "window" }); return false; }); srcFile is set from

jPlayer text link does not play

限于喜欢 提交于 2019-12-07 08:38:47
问题 i am trying to do a basic jplayer text link on click to play an mp3 file, but i am unable to get it to function as there is no sound. here is the code $(document).ready(function(){ $("#jquery_jplayer").jPlayer({ ready: function (event) { $('.voice').click(function(e) { e.preventDefault(); $(this).jPlayer("setFile", $(this).attr('href')).jPlayer("play"); }); }, swfPath: "/ui/core/js/jPlayer/", supplied: "mp3", wmode: "window" }); }); here is the html: <table> <tr> <td> <a href="music.mp3"

jPlayer and PhoneGap Build compatibility

北战南征 提交于 2019-12-07 08:32:25
问题 I'm trying to use jPlayer for a web app that will be native compiled for iPhone, Android and Blackberry using the PhoneGap Build service. I'm using the player to play short MP3 audio snippets and it works fine in the web browser. However, when this is compiled using PhoneGap, the audio won't play and it doesn't display the length of the file in the player. It looks like it can't find the file, although I'm referencing it using a relative path ( ../audio/myaudio.mp3 ). Does anybody have any