Here's an initial patch to make the jPlayer module work under D7. The "single" and "playlist" formatters are functional, but the views style plugin isn't done yet.
TODO: define jPlayer using the Library API instead of simply adding it as js and css files.
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | Screen shot 2011-03-07 at 22.14.18.png | 32.25 KB | jdelaune |
| #8 | jplayer_d7.patch | 23.3 KB | floretan |
| #1 | jplayer_d7.patch | 19.7 KB | floretan |
| jplayer_d7.patch | 16.8 KB | floretan |
Comments
Comment #1
floretan commentedUpdated patch with functional views style plugin and additional cleanup of the theme.
Comment #2
monjohn commentedI am thankful to see this patch.
I applied the patch and all changes were successfully made, except those to the info file, which I made by hand. However, when adding a file field to a content type, I don't see the jplayer widget as an option.
Comment #3
floretan commentedThe patch is against the CVS HEAD version. It's possible that it wouldn't apply to the info file packaged for download (the packaging script adds some additional text to the info file).
The jPlayer doesn't provide a field widget, only a formatter. You need to create a regular file field limited to mp3 files and then use either the "jPlayer player" or "jPlayer multifile playlist" formatter for that field under the "Manage display" tab.
Comment #4
monjohn commentedThanks for the pointers. Once the docs are updated, this would be clear.
I am not getting it to play though. When I used the playlist, it would play if I advanced the "second" track, even though I had only uploaded one file. And, where the description should be, it is displaying the file id.
Any suggestions?
Comment #5
monjohn commentedActually, the problem that I was having had nothing to do with this patch. It would be good to use to form a D7 branch.
Comment #6
monjohn commentedThere is still an issue remaining. For display, I am using the single player, but the player is the not playing and the description is not showing up. I tracked the problem down to the preprocess function in jplayer.theme.inc.
$vars['items'] does not seem to be the right way to access the variables, for neither the description nor the uri are being set.
Comment #7
monjohn commentedAlright, the single player works for me when I make this change jplayer.module on line 84:
- '#items' => $item,
+ '#items' => $items,
I would reroll the patch but I don't know how to create a patch for multiple files at once.
Comment #8
floretan commentedThere is indeed a problem with the last patch and single players. However, the proposed change wouldn't work when using a multiple-valued field: we would have multiple (single-file) players, but all of them would play the same file. Instead I fixed the preprocess function by removing the call to current() since we only have one element.
The patch is also updated to keep up with new changes in the latest CVS version.
Comment #9
monjohn commentedI still get an error showing $item as undefined for a single player.
Comment #10
monjohn commentedI finally got back to this and cleared my cache, and it works just fine.
Comment #11
jlporter commentedsub'ing and will test soon, will this patch get rolled into a 7.x-dev branch?
Comment #12
q0rban commentedsubscribe
Comment #13
q0rban commentedPatch no longer applies to latest code.
Comment #14
jlporter commentedI can has d7 branch plox?
Comment #15
estevan_carlos commentedI just want to gain clarity, does this patch no longer work? And how would I apply this patch anyhow?
Comment #16
q0rban commented> I just want to gain clarity, does this patch no longer work? And how would I apply this patch anyhow?
This patch will no longer apply as the development branch of the module has new code in it. See http://drupal.org/patch/apply for how to apply patches. Switching back to task.
Comment #17
jlporter commentedat #16 this is exactly why I've been requesting a 7.x branch be created. At some point you have to fork it, might as well do it while there is a working patch. You would also get more thorough testing and accurate patches with 7.x-1.0-dev branch.
Comment #18
jerryitt commentedSubscribing. I would also like to see a 7.x branch be created..
Comment #19
jdelaune commentedI've done some work on switching jplayer to use the new libraries functionality in D7 core... which I will submit a patch for once there is a 7.x branch to commit to...
Comment #20
q0rban commentedNo need to wait for a 7.x branch, just make your diffs against DRUPAL-6--1
Comment #21
jdelaune commentedhmm that won't work if the changes require D7 core API functionality to work....
Comment #22
q0rban commentedYour patch is against DRUPAL-6--1, but you're updating it for D7. It's not a problem. :)
Comment #23
jdelaune commentedWell I'm slowly chipping away at a patch for D7 while I have the time. Also bringing a lot of new features.
Here's an example of configurability on a single jplayer instance formatter.
Comment #24
q0rban commentedCan you attach your patch? Thanks!
Comment #25
jdelaune commentedI've added a release which you can see here: http://drupal.org/node/786876/release
Still very unstable and possible unusable. But you might begin to see what I'm trying to achieve.
Thanks
Comment #26
jdelaune commentedJust an update. I've spent the day getting most of the basics in place for the single player instance. The new dev release will be packaged tonight.
New features:
- Supports jPlayer 2.0
- Added video support
- Ability to use a multi-value file field to store different kinds of media (e.g. m4v and ogv) along with poster artwork. The module will do the rest.
- Added JS library support in D7 for other modules to use the jplayer library provided by this module.
- Time format options added to global settings.
- Lots of individual instance settings like: autoplay, mute, volume, repeat, preload.
To do:
- Views support
- Playlist formatter
- Finalise theme settings
I'm probably also going to work on a new skin for jPlayer at some point.
I'm going to close this issue since there is now a D7 branch. Feel free to open up new issues against the 7.x-2.x-dev branch as needed.