Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi all,
Has anyone managed to get the circle player (http://www.jplayer.org/latest/demo-05/) working with this module? I may have to dive into this for a client. I took a quick look at the current 7.x-dev version I don't see any development of this front yet.
Thanks
Nick
Comment | File | Size | Author |
---|---|---|---|
#8 | jplayer_circleplayer.tar_.gz | 12.57 KB | jlyon |
#7 | JPlayer-CirclePlayer Integration-1340382-7.patch | 6.14 KB | nickgs |
Comments
Comment #1
jumptrnr CreditAttribution: jumptrnr commentedNick - any luck with this one? Happy to help test a patch....
Comment #2
PESTO3567 CreditAttribution: PESTO3567 commentedI also would like to use the circle player, there's some initial theme support but it looks rather incomplete actually
Comment #3
nickgs CreditAttribution: nickgs commentedI read through most of the module and applied some basic code to enable the selection of "Circle" from the view field. I also looked into modifying some of the CSS for the current player to achieve a similar effect. I did notice that the circle player is using a different version of jplayer BUT I have not gotten deep enough to see if that is in fact a problem.
I am working through some other, more pressing, features for this client currently. I am looking at probably about a month before I can refocus on this.
I do think this would be a nice addition to this module and am glad to see some interest!
Thanks.
Nick
Comment #4
nickgs CreditAttribution: nickgs commentedI put a little thought into this last night. I am going back and forth with how this should be implemented.
The Circle Player seems to live in its own project. (https://github.com/maboa/circleplayer) and has a few additional dependencies (jquery.grab, jquery.transform). I am almost thinking this should be a separate module but that may be crazy talk.
If we don't make it a separate module we will have to do a bunch of tweeking in this module to make this work such as registering the additional libraries, directing output the correct theme calls, etc.
Anyone have any thoughts on this?
Thanks.
Nick
Comment #5
jlyon CreditAttribution: jlyon commentedA couple days ago, I tried integrating it into jplayer and ran into a bunch of the same issues that you describe above, so I'm thinking it should be its own module. I'm going to start working on a separate module and should have something in the sandbox in a few days. Perhaps jplayer could be used for the private file protection.
Comment #6
hedac CreditAttribution: hedac commentedthat would be a great module for audio formatter. Soundmanager2 ui360 is similar but still not working well in 7.x
Comment #7
nickgs CreditAttribution: nickgs commentedOk, so I put my head back into this and began trying to get the Circle Player integrated without having to create a new module. I did this while watching the Super Bowl of course... :) Attached is my first attempt. Its not working yet BUT does bring in the Circle Player assets and exposes an option in the field formatter settings to select "Circle" as a mode option. It will also renders the player on the screen BUT there seems to be some Jquery issues with the way I am using the library currently.
To play with this simply download the CirclePlayer code here: https://github.com/maboa/circleplayer and drop the entire contents into your /sites/all/libraries directory and apply the patch.
Its not there yet BUT wanted to get something out for anyone that wants to take a crack at this OR may have some insights into what I am doing wrong with respect to the CirclePlayer to properly execute in the context of jquery. Once we get a working player we can do things such as dynamic ID's for multiple players on the page and passing in the JS settings array for actually playing our fields content.
Thanks.
Nick
http://nickgs.com
Comment #8
jlyon CreditAttribution: jlyon commentedHey Nick,
Thanks, I'll try to take a look at it tomorrow. I got most of the stand-alone module working, but got stuck what sound like the same point you're at. I had all of the resources attached and the players were properly styled, but they wouldn't play. Here's the code that I was working on. The project I was working on decided to just go with the standard jplayer, so I stopped working on it.
Thanks,
Jeff
Comment #9
shortspoken CreditAttribution: shortspoken commentedSubscribing. Would love to see the Circle jPlayer working.
Comment #10
AliceEldridge CreditAttribution: AliceEldridge commentedI second that
Comment #11
lunk rat CreditAttribution: lunk rat commented+1 for circle player
Comment #12
lunk rat CreditAttribution: lunk rat commentedI am willing to sponsor development work on getting circle player as a D7 field display formatter option.
Comment #13
pwaterz CreditAttribution: pwaterz commented@Link Rat, please email me privately.
Comment #14
steve hawkins CreditAttribution: steve hawkins commentedI am also interested in seen circle player working. May have some funds to help make it happen.
Comment #15
nickgs CreditAttribution: nickgs commentedI have been a bit busy with other projects but I am still interested in what everyone thinks the best approach to implement this type of feature is. I have made good head way with the patch in #7, has any tried testing this? Any feedback would help push this along.
Thanks.
Nick
Comment #16
pwaterz CreditAttribution: pwaterz commentedI was working on this over the last two days, and went down a few roads. Here are the implementations options I see could work:
1. Build a plugable theme system into jplayer and allow other modules to add theme/"styles"
I think this would be really nice because it would give more options to users and possibly require less tpl overriding and adding of additional css. This would require some abstraction of the current jplayer architecture because most themes will need to share some functionality.
Then build a separate module for circle player that plugs into jplayer
2. Do what the patch above attempted. Just kinda work it into the module. I personally dont like this because it makes things messy.
Appreciate anyones thoughts.
Comment #17
nickgs CreditAttribution: nickgs commentedHi Pat,
I tend to agree. I was thinking along the same lines as your first thought. It would be nice if we expose a way for other modules to provide their own theming layer but still use much of the core jplayer work accomplished. I haven't read the code in a while but I do think it would require a rather large refactor to make this play nicely.
I also agree with not liking the approach I took above. Although I do think we could get it working, it is not very flexible and introduces some complexities in the code. It also will become a nightmare if/when other jplayer modes want to get rolled in.
I guess the question would be what types of hooks would we need to implement in order to expose a way for other modules to extend the jplayer.
Just thinking out loud here but my initial thoughts are we would need ways to do the following:
I am sure I am missing some stuff here and may be misunderstanding some of the architecture of the current system but this was where most of my work above seems to have taken place. If those are the correct hook in points it may be a good starting point.
Thoughts?
Thanks.
Nick
Comment #18
pwaterz CreditAttribution: pwaterz commentedNIck,
That is exactly what I was thinking. Here a few hooks I think that would work.
1. hook_jplayer_style_info
Would require returning an array like so
2. Then jplayer_field_formatter_settings_form can invoke that hook and get a list of styles and provide a select list
3. I think it would also be necessary to have a settings form hook. something like hook_player_style_[SYTLE NAME]_settings_form. Then the settings form would change based on the style. If this hook doesnt exist then, just use the default form
4. hook_jplayer_style_{STYLE NAME}_render($args) this hook would be invoked from the default jplayer theme function and would add the necessary jplayer default settings and would dynamically change the tpl file based on the style choosen. The hard part will be trying to generalize the current setup. The JS file may also be tricky because each theme may need to have it's own custom js.
I think this would be a good start.
Another option that I have played with is using ctools plugin system. It is really simple and easy to use.
What are your thoughts?
Comment #19
ldweeks CreditAttribution: ldweeks commentedThis sounds really great. I'd really love to use this on a project I have coming up, and so I'm willing to test patches.
Comment #20
lunk rat CreditAttribution: lunk rat commentedI like the direction that this is going. I am here to test patches and provide feedback. Thanks so much for moving this along! Rock!
Comment #21
OMD CreditAttribution: OMD commentedsubscribing
Comment #22
nickgs CreditAttribution: nickgs commentedExcellent, I think the ctools plugin system is a viable option. Just not sure if we want to introduce a dependency. Personally, I don't have much experience with the plugin system but have been following the D8 initiative to get a plugin system in core, which is modeled on ctools. Correct me if I am wrong, but using the ctools plugin system would enable us to expose a consistent interface to the jplayer module that would abstract the actual implementation. This would make it easier and less error prone for further implementations to plugin to the jplayer module?
I think we should probably vet these two strategies before jumping in. Unfortunately I don't have much time to code at the moment but this may change in the coming weeks.
Thanks.
Nick
Comment #23
pwaterz CreditAttribution: pwaterz commentedNick,
It would defiantly abstract the functionality and make it less error prone. It would only require one hook to implement which is
If the ctools plugin system is going in to D8, then that is even more of a reason to go the ctools route. I think we should try both directions and see what comes up. If we go the ctools wrote in might need to do some custom work to get the field display settings to work properly.
I'll see if I can get a patch together this weekend.
Patrick
Comment #24
ldweeks CreditAttribution: ldweeks commentedAny luck on this?
I know things get busy. Just checking in... Thanks!
Comment #25
cez CreditAttribution: cez commentedHi,
is there anything new about this topic ?
Cheers
Comment #26
RachelIsland CreditAttribution: RachelIsland commentedSuscribing.
Comment #27
shortspoken CreditAttribution: shortspoken commentedKnock knock. I'm still interested in this feature. Having the circle player available would be awesome!
Comment #28
bohemier CreditAttribution: bohemier commentedSubscribing too... This circle player is awesome.
Comment #29
lameei CreditAttribution: lameei commentedAnything new?
Comment #30
aag4 CreditAttribution: aag4 commentedHey Nick,
responding to your post #7
I had a problem of jPlayer circle player not rendering properly in Safari. The green progress circle did not display correctly.
Happy Worm have a demo of two circle player buttons at - http://happyworm.com/jPlayerLab/circleplayer/v13/
Copying the source code and downloading the code from the source hrefs produced the two circle player buttons. They played fine in Firefox and Opera. However, for some reason, when I loaded all the code into a new website I was building the progress circle did not render correctly in Safari.
However, thank you to "nickgs" at #7 - https://github.com/maboa/circleplayer
Using the downloads provided by you I have managed to get the circle player rendering correctly in Safari in the website that I've been adding audio play buttons to. I have also been able to scale the button right down to 50px x 50px.
Thank you
Comment #31
jessZ CreditAttribution: jessZ commentedAny progress in getting this to work in D7? The blue monday default is so ugly and none of the 'customized' versions i have found offer any real implementation steps to even get the pink flag version working.
Comment #32
markie CreditAttribution: markie commentedAll
So I spent some time this evening on getting other skins working with this module. The problem is that the HTML template for the circle player is different from the standard (default) Blue Monday skin. I will review the patches attached but the 7.x-2.x dev release has been modified a bit. Can you please re-roll your patches against the latest?
mark
Comment #33
markie CreditAttribution: markie commentedComment #34
rivimeyI too am looking to move away from blue.monday and make use of circle player. I want to use jP 2.9.2.
I started working on enabling a 'skin' selection in the field config -- initially with the expectation that it wouldn't work to have two different skins in use on one page, but that on different pages it would be seamless. My reason is that I would like to use 'Circle' player on a views page but a different one - probably derived from pink.flag - on the node page.
[I found and addressed the issue with Version in the js file, by ignoring whether it's 'minified' and just check for the known regexes. While I did that hard-coded it would probably be better done via an array.]
I started by adapting the provided skins -- changing references to the skin image jpg to be a relative path (so css/X.css references ../images/Y.jpg). Then added to the jplayer admin form a skin selection in the variables, and used that in the _jplayer_get_css() function so the correct css file is loaded, which then pulls in the correct images. In all this I kept to the base two skins, figuring I could generalise that later. Having shown that working, I then moved the skin selection into the field settings (which is where I wanted it) and showed that working too. However, the template's html is not right.
And here I'm a but stuck for the best way forward. The only thing I'm sure of is that changing skin does need to change template html that is output, and that in the long run the whole lot should be providable from a different module or theme. So, I like the previous suggestions of using ctools for that.
There is still the problem of how, exactly, to discover and select the correct template. I am, for the moment, assuming that it is best to retain the jPlayer.org project's idea of a skin. Given this, I can see several options:
My preference, I think, would be for (2). Alongside this are some questions:
I am happy to post a patch -- though I really haven't got that far. My main reason for posting is to gain better understanding of how to proceed, especially if there's a hope the result is committed to the module.
Comment #35
markie CreditAttribution: markie at Mediacurrent commentedLooked at the patch and there are still some DPM's in there and a few other formatting issues. I have updated this thread (https://www.drupal.org/node/2485867) with a way to add custom css and js. combined with a tpl file I have gotten the circle player to work, but have not written up any documentation about it. It's in my todo list.