I've installed 6.x-2.10-rc4 and want to use the mp3 player. I've downloaded and extracted the contents of WordPress standalone Audio Player into ./sites/all/modules/webfm/modules/webfm_mp3/mp3player/ yet I still get the warning:

audio-player.js or player.swf were not found in /sites/all/modules/webfm/modules/webfm_mp3/mp3player/, download the standalone WordPress Audio Player.

Are there some sort of permissions missing? The actual directory is /home/jazzband/public_html/sites/all/modules/webfm/modules/webfm_mp3/mp3player and the rest of webfm (and everything else on the site) seem to be working fine.

Comments

kbell’s picture

I am having the exact same issue - everything works fine, the players are where they're supposed to be - I still get the error and the player is not activating when a media fil (audio or video) is present. Please help?

Thanks,
Kelly

mymaestro’s picture

I think the problem is in the webfm_mp3_check_flash_files() function of webfm_mp3.module:

/**
 * Check for required flash components in 'mp3player' directory.
 */
function webfm_mp3_check_flash_files() {
  if(!file_exists(drupal_get_path('module', 'webfm_mp3').'/mp3player/audio-player.js') || !file_exists(drupal_get_path('module', 'mp3player').'/mp3player/player.swf')) {
    return FALSE;
  }
  return TRUE;
}

!file_exists(drupal_get_path('module', 'mp3player') should be !file_exists(drupal_get_path('module', 'webfm_mp3')

kbell’s picture

I'm giving this fix a try and I'll get back to you. THANK YOU!!!!!
-Kelly

kbell’s picture

YES!!!
That seems to get rid of the error, but I'm still not getting an audio player coming up for the file I'm attaching to the node... that may be a webfm configuration problem on my part though, so I'll check on that. In any case - thank you thank you thank you!!!

-Kelly

robmilne’s picture

Make sure that you save a configuration from .../admin/settings/webfm_mp3 and then flush the cache on your browser.

mymaestro’s picture

I have to right-click the file and choose "Play mp3 file" from the popup menu (although I'd prefer to have the single-left-click perform the Play function too).
But when I am logged on as a non-admin user I can't play mp3's; an "access denied" message displays. There are no permissions settings for Playing mp3 that I can find...

robmilne’s picture

Hmmm, if you can see the file in the webfm browser you should be able to play it. The minimum permission required is 'access webfm'.

The click on the file link will play the file in the Wordpress player if you uncomment the 'webfm_send' hook in the module, however I want a more elegant solution wrt presentation - themeing has never been my forte.

mymaestro’s picture

I want to give a unique role permission to play mp3's; it only works if I give "administer webfm" - a permission that allows things I don't necessarily want to allow :-(

So I think this will allow users with a special role to play mp3's (it works in my case):

Old

        if($file->perm & WEBFM_FILE_ACCESS_PUBLIC_VIEW ||
           $file->uid == $user->uid ||
           $webfm_perm == WEBFM_ADMIN) {

New

        if($file->perm & WEBFM_FILE_ACCESS_PUBLIC_VIEW ||
           $file->perm & WEBFM_FILE_ACCESS_ROLE_VIEW ||
           $file->uid == $user->uid ||
           $webfm_perm == WEBFM_ADMIN) {
robmilne’s picture

Status: Fixed » Active

You are right - thanks for pointing that out. I'll fix in head. Not sure when the next rev will formalize this change but I'm sure other fixes for all my recent additions will force it sooner than later.

robmilne’s picture

Status: Active » Fixed

In Head

JLWM’s picture

Status: Active » Fixed

I solved the problem by giving full access to the files (777) in the .zip file:

audio-player-noswfobject.js
audio-player-uncompressed.js
audio-player.js
license.txt
player.swf

I didn't have to change the code.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tawebworks’s picture

Status: Closed (fixed) » Active

I'm having this same problem. I've worked through all options mentioned here and still have the error message. So what do I do now?

telemako’s picture

GR8!!! IT works!
TY

Colorful Tones’s picture

#2 worked for me, but I'm not sure if it proper?

Muchos gracias!

ckleiman’s picture

worked for me too! many thanks!

rcgeary’s picture

#2 worked for me

however i did make the mistake initially of not looking closely enough at the line to be amended and seeing that it was the second part of the || that needed to be changed.

coodtec’s picture

#2 solution working with me too.

Why webfm module did not to try fix this bug?

robmilne’s picture

Status: Active » Fixed

This was fixed in head back in February - awaiting a new release

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.