In the node direct link jplayer works ok but...

I'm trying and trying all variants in views but jplayer dont show... I see only text links :(

I try jPlayer multifile playlist option in the Field and playing with the others parameters -> NOTHING

I try jPlayer option in Style under Basic settings and playing with the others parameters -> NOTHING

Please Help!
THanks

CommentFileSizeAuthor
#3 screenshot.png4.15 KBzacharycaplan

Comments

jimajamma’s picture

There is a patch in a thread called Views Oddity that might fix your issue

Jim

Anonymous’s picture

Same to me

outside the views it works

zacharycaplan’s picture

StatusFileSize
new4.15 KB

+1
patch in views oddity thread did nothing, the player doesn't display and just shows the text links.

i can force the player to display using 'Jplayer player' option for filefield display format but it still doesn't work and appears as in the attached screenshot.

if i look at the source for either of these options, the jplayer's id is blank and everything else appears to be missing a distinct id number and instance reference (progress bar id="-progress" instead of id="jplayer-20-field-songs-progress")

hope this helps shed a little more light on the issue

zacharycaplan’s picture

update: it appears using the display style in a view does not trigger the css/js includes for jplayer...thoughts on how to rectify this?

jimajamma’s picture

There were multiple bugs/issues in the beta2 and earlier versions of jPlayer that make me think the views portion could never have worked. I fixed a couple of them that made the module work for me, if you look through the issue cues you can see the patches I've uploaded. If you could post a screen shot of the views screen, that might help me track it down further for you. I fat fingered a whole bunch of this there that after I figured out what was wrong, it was one of those "duh" moments. But just the fact that you are in fact getting SOME of the css in there makes me think that's one of the issues (those blue bordered things in there are defined in the css as an example)

DavidHadaller’s picture

Version: 6.x-1.0-beta2 » 6.x-1.0-beta3

I had this same issue as in the screenshot from #3. I made the following changes to these two files and I was good to go (changes made to 6.x-1.0-beta3).

Note: I used the 'path to file' field formatter in the view, although others should work.

**ISSUE: The variable $filepath was actually just the fileid number, but was being treated by the code as the actual path**
**SOLUTION: load the filepath**
file: jplayer_style_plugin.inc
function: jplayer_style_plugin -> render
line: 101

//DTH: $filepath is actually just an integer representing the fid, need to load the file to obtain the filepath
$loaded_file = field_file_load($filepath);
$actual_filepath = $loaded_file['filepath'];

$items[] = array(
  'url' => file_create_url($actual_filepath), //DTH: changed to $actual_filepath
  'label' => $label,
);

**ISSUE: The output of the view was being blocked by this if statement **
**SOLUTION: Comment out the if-statement. This may have other implications **
file: jplayer.theme.inc
function: template_preprocess_jplayer_view_playlist(&$vars)
line: 76

//DTH REMOVED: This is preventing views from outputing anything.  What is the intention of this check?
/*
if (!$vars['element']['#item']['fid'])
  return;
*/
deviantintegral’s picture

Status: Active » Fixed

I've committed the change fixing the issue with checking the wrong variable template_preprocess_jplayer_view_playlist() in 5be54f6, and am addressing the file ID issue over at #919700: Views Oddity.

Status: Fixed » Closed (fixed)

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

vchen’s picture

Version: 6.x-1.0-beta3 » 7.x-2.0-beta1
Status: Closed (fixed) » Active

Is it just me, or is this still a problem in version 7.x-2.0-beta1 with Drupal 7?

joshuautley’s picture

I'm using views in D7 and I have it as a block which works fine.