Active
Project:
jPlayer
Version:
7.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2011 at 21:23 UTC
Updated:
4 Feb 2017 at 20:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dreadlocks1221 commentedsubscribing, very interested in seeing this work
Comment #2
tike012 commentedsubscribing.
Comment #3
yugongtian commentedPlaylist jPlayer instance. But when I hit the Update button the format is still Single jPlayer instance.
Yes , I think it's bug.....
Same problem ,can not play playlist.
Comment #4
yugongtian commentedSorry Mistake.
+1
Comment #5
btmash commentedI get the same issue. The way I resolved it was by doing things at the template layer for the field. So I'm curious to see what might be a good way to go about working this out.
Comment #6
dellis commentedthe nid -> fid code change lets the module function, however the field-display formatter (jplayer) doesn't show up as an option on the manage display page of the content type configuration screen.
You can do this through the various round-about steps you have taken, but it does seem to break down at the rendering of the multiple-valued field in a playlist. I think because we are selecting "file style: large" or whatever, it is treating each value separately rather than aggregating or building the array at the field-level.
Is there any way to enable the jplayer-* field formatters for the "Multimedia Asset" field type (rather than just for the filefield type)? Would that solve the problem?
Comment #7
dellis commentedUpdating to Media 7.x-2.x. and using the "file field" instead of the "media field" allows this module to work out of the box! The solution below works for "media field" types
Okay! So I have a solution for using the media module (with "Media Field") and JPlayer--so far I've tested it with Audio files and it is working quite nicely!
Using Media 7.x-2.x-dev, though still using a "media" field (multimedia asset widget) which is set to accept unlimited values.
Here is what you do:
There may be an easier way to do this, but I couldn't find one--and there are likely things that could be done better in the above code, but it works for now. I've attached a screenshot of the working formatter (it looks like the regular non-multivalued playlist).
Also, it occurs to me that you could do a count to see whether there are multiple audio files or not in order to dynamically switch between "single" and "playlist" (even though I know this isn't clean/good coding):
I hope this helps someone else until the module gets updated/patched!
Comment #8
dellis commentedsmall tweak to the "out of the box" statement... I had 2 fields, an audio_file (using jplayer) and a video_file (using something else because of youtube/remote oembed files) on the same content type.
When viewing a node created this way, this module seems to look at all available media "files" and consider them fair game for rendering or at least processing. I had errors related to missing player_type and filename and still had a problem with the $object->fid (or nid) in line 96. Likely because the videos were remote URLs without file extensions or "filenames" in the strict sense.
So... in jplayer.theme.inc:
- I added to line 108:
$player_type = '';
- and to line 127 (just before setting $item['label'] = $item['filename']):
$item['label'] = '';
- and for good measure, added a line after 128 to clean up some html spaces issues I was having in filenames:
$item['label'] = str_replace("%20"," ",$item['label']);
I also ended up changing the jplayer.module's player div's id to (line 96):
'player_id' => 'jplayer-' . $instance['field_name'] . '-' . str_replace('_', '-', $instance['field_name']),
where $instance['field_name'] replaced $object->nid or $object->fid
I realize that "hacking" a module's files is not a good idea, these are some changes that may not be "correct" but they do work for me so far (especially since it has been 6 months since the last update).
Comment #9
deviantintegral commentedComment #10
rob c commentedI got Media: Soundcloud 7.x-2.x 'tracks' to work with jPlayer. (and it's awesome!)
I added a bit more then $wrapper = file_stream_wrapper_get_instance_by_uri($item['uri']); but that is where the magic happens. I'll upload everything to my github, for everybody to test. At this moment it's not yet a real patch or even close to it, but it might help a bit. You need to register for an api key (app) at Soundcloud before it will work and set the display to the jPlayer and disable the normal rendering.
https://github.com/ClusterFCK/jplayer
https://github.com/ClusterFCK/media_soundcloud
See https://github.com/ClusterFCK/jplayer/blob/master/includes/jplayer.theme... for more details.
Comment #11
candelas commentedI am looking for an audio player for the media 7-2.x module. I don't find an issue that is from last months, so I ask here for support. Thanks for any tip :)