I followed the directions in the README and created a file field with display format jPlayer. The field displays as a player but nothing happens when I click on any of the buttons. (I tried it in Firefox & Chrome on my Mac.) The audio file plays when I visit the URL of the mp3 file directly. Has anyone else had this behavior?
I tried it with the current (2.1.0) and previous (2.0.0) versions of the jPlayer library. I tried futzing with the display format settings but still can't get it to play.
I must have done something wrong. Has anyone gotten a simple, single instance mp3 field to play with this combination?
Comment | File | Size | Author |
---|---|---|---|
#29 | jplayer-wont-play-1289016.patch | 653 bytes | davidneedham |
Comments
Comment #1
jeremyluby CreditAttribution: jeremyluby commentedI am having the same issue! I see the player, but nothing happens regardless of browser.
Comment #2
tresero CreditAttribution: tresero commentedI also see the same problem.
Comment #3
piwchix CreditAttribution: piwchix commentedSame here
Comment #4
jh3 CreditAttribution: jh3 commentedIt seems that jplayer.js is loaded before every other script (i.e., jquery.js), in my case anyway. You can confirm this by checking the console tab in Firebug on a page with jplayer. If jplayer.js is loaded before jQuery you should see an error that says "jQuery is not defined."
If this is everyones problem, it can quickly be fixed by removing the scope key-value pair on line 484 of jplayer.module. For me, this made jplayer load after jquery.js, jquery.once.js, and drupal.js.
I have also moved the scripts variable to the bottom of my page template so I am not completely sure if this will resolve everyones problem. I am pretty certain it's a weight issue, though. See http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ad... for more on how Drupal handles the order in which it adds javascript files to a page. I am guessing the scope is set to footer because the module assumes your scripts variable is in the tag of your page template.
For example, you would want to go from this:
to this:
Comment #5
DanishK CreditAttribution: DanishK commentedand how do you solve this for Drupal 6? I have the same problem but for D6.
Comment #6
dddave CreditAttribution: dddave commentedThis is a critical bug.
Comment #7
mostoneskin CreditAttribution: mostoneskin commentedI'm getting this too, on 7.8.
Comment #8
clcanela CreditAttribution: clcanela commentedI can confirm ejh3 solution, this is indeed a scope problem, actually my error said: "Cannot read property 'timeFormat' of undefined" and moving the attached js from the footer actually worked (at least for a single player/single song)
Note: I downloaded the jPlayer 2.0 library, haven't reverted to the newest 2.1 library
Comment #9
mostoneskin CreditAttribution: mostoneskin commentedI can also confirm that this worked for me. Thanks ejh3. Not sure I understand what the long-term solution is (new to Drupal)?
Comment #10
aasarava CreditAttribution: aasarava commentedFor Drupal 6, make sure you are using jPlayer 1.2, not 2.0 or later.
Comment #11
rlmumfordI have this issue on drupal 7.8, not getting any script errors though and the jplayer library is definately getting included after drupal.js, jquery.js and jquery.once.js
Also, I've tried the solution above : still no luck.
Comment #12
rlmumfordUpdate, I only seem to have this problem on firefox. It might be a filetype thing.
Update: Not working in firefox with ogg either.
Comment #13
wheatpenny CreditAttribution: wheatpenny commentedI tested this module on a local site, and I took a look at the Lullabot podcasts. I'm on Ubuntu, and I'm using Chromium and Firefox out of the Ubuntu repos. On both the local site and on http://www.lullabot.com/podcasts/lullabot-podcast-99-drupalizeme-1-year-..., the player worked in Firefox, but nothing played in Chromium.
Comment #14
obstikle CreditAttribution: obstikle commentedFor Drupal 6, this issue might be more relevant #1298126: Missing play command for single-file player
Comment #15
czigor CreditAttribution: czigor commentedI would like to use this for playing mp3 files.
I can see the player both in Firefox and Chromium. When I click the play button, it changes to the pause sign for half a second then back to the play sign. The play does not start. I tried it with both the single and the playlist mode.
Comment #16
czigor CreditAttribution: czigor commentedChanging the formatter setting from HTML5 to Flash has solved it for me.
Comment #17
ronny89 CreditAttribution: ronny89 commentedin my case it plays mp3 in firefox and neither mp3 nor ogg in chromium.
the firebug-console doesn't show any message. :-/
edit:
using Flash let's jplayer play mp3s in chromium
i also found out, that some mp3-files are played while others are not.
Comment #18
rayvan CreditAttribution: rayvan commentedTry using jPlayer v1.3
Comment #19
D2ev CreditAttribution: D2ev commentedi have the same problem #15.... in jplayer support i found
like @czigor changing the formatter setting from HTML5 to Flash work for me.
Comment #20
sbree CreditAttribution: sbree commentedI had a similar problem but with single view and a video.
The problem was in the use of Drupal.settings passed to jQuery.extend.
I started listen error event at iniatilisation of jplayer instance (need to be placed just before the initialisation in jplayer.js):
(this code is provided by jplayer.org... I only add some strings and function calls)
It returned error about variable passed to setMedia
How playerSettings.files looks in jQuery.extend:
{"m4v":"video.m4v"}
What jplayer seems wanting:
{m4v:"video.m4v"}
So, I wrote a function which rewrite playerSettings.files passed to jplayer's "setMedia" method:
And modified the script jplayer.js this way:
not sure that's secure, with the use of eval method... and it may be optimised. But it works...
I also rewrite jplayer.tpl.php where you can find this :
<div class="jp-type-playlist">
become<div class="jp-type-<?php print $mode; ?>">
, javascript pending "jp-type-single" for single views.PS: Sorry for my poor english (that's not Google translation!)
Comment #21
deviantintegral CreditAttribution: deviantintegral commentedIt seems like there's a few issues being discussed here. Something to keep in mind when testing is that some browsers (especially on Linux) won't have MP3 support by default due to patent issues. Make sure that you can actually play an MP3 in the browser and that you have any additional required packages installed (such as gstreamer codecs).
Regarding the script order in #4, I'm not sure that's actually a problem with this module. On a default D7 site the script is added in the footer and it works fine. jQuery is added in the head, so it will always be processed before the jPlayer JS in the body. I wonder if your jQuery library is being added in the body instead of the head.
Comment #22
russellb CreditAttribution: russellb commentedI'm seeing a 'won't play' problem in Firefox 3.6.27 Windows with mp3s. On page load the play button doesn't work. If I click on the download link below the clip plays in QT for me. After that if I go back in the browser I see a little square by the download link, and the HTML 5 play button is working.
My test site here is Drupal 7, Media 7.x-2.0-unstable3
Problem observed on Firefox 3.6.27 under Windows 7. It works for me first time all fine in Internet Explorer 8 on Win7 and on the mac in Firefox 10 and Safari 5 so I guess it's an old Firefox issue.
Comment #23
russellb CreditAttribution: russellb commentedUpdate:
I've upgraded the Firefox in question on Windows 7 here to latest (10.0.2) and the problem looks to have gone away, so this looks very much like an old Firefox issue. We are only seeing the problem in latest firefox on Windows 2000 now so that is fine.
Comment #24
onehandsomedog CreditAttribution: onehandsomedog commentedPlayer not working in firefox 11.0 or earlier, IE 8, Opera 11.6, & Chrome is off and on. Safari works everytime ;) This is true on mac os 10.6 and windows 7
Comment #25
amonteroFor the record, jPlayer was working OK for me until recently when I updated Flash player. Downgrading Flash plugin made it work again.
HTML5 mode is unaffected.
Comment #26
amonteroReplying to myself, with my problem's cause:
Adobe Flash 11.2 broke FLV playing. See https://bugbase.adobe.com/index.cfm?event=bug&id=3157899
Also, for the record :)
Comment #27
deviantintegral CreditAttribution: deviantintegral commentedSounds like we'll just have to wait for Adobe to fix this. I'm marking this issue as closed since there's no changes required in the jPlayer module code.
Comment #28
christophrumpel CreditAttribution: christophrumpel commentedI also have the problem, thtat the controls does not work and i cannot play the songs, only if i click the titles then they are played in a new window by the browser.
I am trying to follow the approach in #4 but i do not know where to try to add the JS file. My jplayer.js is also loading before the jquery js. Can someone help me what i exactyl have to write and where?
That would be great!
thx
Comment #29
davidneedhamI can confirm that this bug still exists in osx with the latest chrome and firefox. Clicking the play button makes it flash for a second, but nothing happens. I followed the steps in #4 above and made a patch. Like him, I'm not sure if this is the best "fix", but it makes it work for me.
fwiw, @christophrumpel, the file to change is jplayer.module
Comment #30
micnap CreditAttribution: micnap commentedPatch didn't work for me. No change.
Mickey
Comment #31
i_rice CreditAttribution: i_rice commentedHi, just the same situation.
Thanks for patch! it really works)
patch help me only in Chrome, but in FF still jPlayer is not working. Can it be that FF loads js files differently from Chrome?
Comment #32
glamdring CreditAttribution: glamdring commentedIf you are having an issue where it starts and stops again in the flash fallback mode, but it loads properly in IE try renaming the file. In FF, Chrome, and Opera audio files with odd names containing things like - would not play. After I renamed this file it loaded perfectly in flash fall back.
Comment #33
bentleychan CreditAttribution: bentleychan commentedMy observations: In Windows 7 SP1, jPlayer works in IE9, Chrome 24.0, and Safari 5.1.7, but not in Opera 12.02 and Firefox 18.02. For tablets, jPlayer works on my iPad 3 (both Safari and Chrome), but does not work on my HP TouchPad.
Note: The above observations apply to my website in a remote server. If I test jPlayer with my localhost server, both Opera and Firefox work, i.e. all my five browsers will work with jplayer in localhost.
Comment #34
pradeep22saini CreditAttribution: pradeep22saini commentedMy issues with jplayer:
windows: In Internet Explorer7,8,9 a link to download appears.
Mac: works only on chrome but on safari browser "player on play button click it's icon changes but songs doesn't play" and in firefox it redirects me to url of the song and play it in new tab.
Touch pad : it also gives the link to download.
linux: it works fine in linux browsers opera firefox and chrome.
I applied all patch and done the modification but didn't find a satisfactory solution. Can any body help me regarding issues in windows and mac. Thanks in advance.
Comment #35
pradeep22saini CreditAttribution: pradeep22saini commentedit was an flash palyer issue and worked when flash player is installed.
Comment #36
Mohva CreditAttribution: Mohva commentedBest response, work perfectly for me @sbree #41
Comment #37
davidneedhamI just applied my patch from #29 on a different website and it fixed this problem again.
This still doesn't seem like the right solution... anyone care to suggest something else or RTBC so at least this module will function as downloaded without patching?
Comment #38
heyehren CreditAttribution: heyehren commentedI'm having the same problem. Both HTML5 and Flash option are not working in Safari and FF.
I have applied the change described in #4, and downgraded jPlayer from the latest version 2.4.0 to 2.0.0. Now it's working in Safari and Chrome, but not Firefox.
Play button doesn't work, and clicking on the media file name in a playlist brings me to the media file. Any help would be greatly appreciated.
Comment #39
spgd01 CreditAttribution: spgd01 commentedI found that MP3 works in FF and IE 10 but other file formats and IE 8 and 9 are problematic.
Comment #40
Vemma-1 CreditAttribution: Vemma-1 commentedGot it to finally work using FF 25.0.1 while having to use Player V. 2.0.0. Scared to update my FF now.
Comment #41
jathoo CreditAttribution: jathoo commentedhad the problem and mine was a silly mistake ,
we have to use the player 2.0 library , and jquery.jplayer.min.js and Jplayer.swf must be in the root folder (she be in - sites/all/libraries/jplayer)
and now its working on all the browsers . just need some skinning to do
hope it may help someone :)
Comment #42
nateB CreditAttribution: nateB commentedOther folks with the jQuery Update module may run into this issue, so let me say that I had to limit the jQuery version to 1.8 to keep the player playing.
jQuery versions 1.9 and 1.10 broke the jplayer.
Comment #43
markie CreditAttribution: markie commentedPlease update to the latest dev. the function mentioned in the above patch no longer exists. If all looks well I will be pushing a new full release.
Comment #44
guidot CreditAttribution: guidot commentedDoes not play an mp3 with dev from 2015-Mar-08, jPlayer 2.9.2, firefox 36.0 on Linux. If I switch to Generic file format firefox plays it.
Comment #45
rivimey@hylid: I too fount jQ > 1.8 to be a problem (and not just for this module but eg views_ticker too).
@guidot: is it all mp3 files that don't play, or just a specific one? Can you play any other format file (e.g. ogg)?
@markie, @deviantintegral could this thread be addressed best with an FAQ section on the project page or in other docs? For example:
Q: Player is not visible onscreen
A1: is the widget type for the field set to 'jPlayer'? If in doubt, check the html for the page includes elements with classes such as jp-audio or jp-playlist in the expected area).
A2: has the jplayer module's CSS been included on the page?
A3: has the jPlayer JS been included on the page?
Q: Player apparently there but is completely unresponsive (no JS events attached to controls)
A1: check to see that JavaScript enabled on your browser
A2: Check that you are not relying on a version of Flash being installed that isn't present or is too old.
[ I found you needed Flash >= v10 for the supplied jplayer.swf ... is that a known issue? ]]
A3: check you are using jQuery >= 1.4 and jQuery <= 1.8; could jQuery Update have switched the site to v1.9 or v2.0?
Q: Player active (JS events applied, buttons respond when clicked), but won't play
A1: Check that the browser and platform you're testing with is able to play the files you're giving it when given a direct link. For example, some Linux-based platforms have no support for mp3 file playback out of the box.
A2: something about supported file extensions / file formats ... ?
Q: Which versions of the jPlayer library are known to work with the module?
A1: The Drupal 6 jplayer module only supports jPlayer version 1; version 2 is not compatible.
A2: The Drupal 7 jplayer module supports jPlayer versions 2.0 to [[ 2.9? not sure ]]
Note: in the above, "jPlayer" refers to the main jplayer.org javascript library, while "jplayer" refers to the Drupal module.
Comment #46
Swarnendu-Dutta CreditAttribution: Swarnendu-Dutta as a volunteer and commentedi had the same issue multiple time and #4 worked for me.
Comment #47
samheuck CreditAttribution: samheuck as a volunteer commented'jQuery is not defined' was the issue for me as well. However, I didn't want to hack the jPlayer contrib module, so I used
hook_js_alter()
:in template.php (or in some custom module if you prefer)
Comment #49
markie CreditAttribution: markie at Mediacurrent commented@rivimey I updated the README.txt in the latest dev branch with an FAQ as suggested. Thanks for that. Please let me know if you have any questions about the... err questions.. Since Drupal6 support is going away soon, I will not be addressing the D6 version anymore. If no complaints are heard soon, I'll be creating a full release.
Comment #50
markie CreditAttribution: markie at Mediacurrent commentedClosing issue as 7.x-2.0 has been released. Please open any new issues against that.