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.
So I'm working on getting ableplayer integrated into elmsln and came across this a few days ago. While I don't integrate things the way you've got them setup (file entity I'm sure aligns with media module better but we use nodes for our assets), I was hoping maybe I could refactor my approach as well as yours so that we'd have
- Ableplayer as an API module, basically makes the library brought into scope
- Your current module as a sub-module that's ableplayer_file_entity for the file entity implementation
- My current module refactored as a sub-module that's ableplayer_field_formatter which is similar to how media element is done.
From there, we'd try and get this promoted to full project status. Interest in this?
Comment | File | Size | Author |
---|---|---|---|
#5 | ableplayer-field-formatter-2779681-5.patch | 7.62 KB | btopro |
Comments
Comment #2
npacker CreditAttribution: npacker commentedThat sounds like a great idea. Let me know what I can do on my end to help.
Comment #3
btopro CreditAttribution: btopro commentedIf the plan above sounds reasonable maybe we could do the following...
Adding me as a comaintainer might help speed that last part along but isn't necessary. If this sounds good let me know when there's a repo on github I can fork and I'll start refactoring today (it's kinda in my immediate roadmap as is).
Comment #4
btopro CreditAttribution: btopro commentedNm, as I look through this my stuff can basically get injected into yours with minimal changes :) Mostly additions. I'll just make a patch here
Comment #5
btopro CreditAttribution: btopro at Pennsylvania State University for ELMSLN commentedHere's an initial patch. This does the following:
Adds preliminary support for video / audio field formatters for file fields (without requiring file_entity)
Drops explicit requirement of media / file_entity while still checking for it when installing to allow usage as a file formatter without dropping support for file_entity
Currently without having something else pick up and do the heavy lifting of formatting output on the video / audio fields to utilize other fields that they'd need (like captions, poster images, etc) it basically just puts a video tag down. ELMSLN does this currently but I'll need to decouple some of those capabilities and make them settings in field formatters for picking which field provides the poster / caption files, etc.
Comment #6
npacker CreditAttribution: npacker commentedCorrect me if I'm wrong, but it should be possible to have just one theme function, right? But you haven't implemented the source fields for captions,etc and so haven't combined them?
Comment #7
btopro CreditAttribution: btopro at Pennsylvania State University for ELMSLN commentedcorrect, this needs some additional flexibility added in that area but I think it might be good to split out audio vs video since they have some different methods of display.
Comment #8
npacker CreditAttribution: npacker commentedSure. My only concern would be excessive duplication at this stage, as the current theme implements most if not all of the player option attributes. Looking again at the Able Player docs, audio and video seem pretty similar other than the tag and maybe one or two optional parameters.
Either way, I'm just working on a little refactoring of your patch so that the organization of the file entity and field formatter code is a little more parallel. Hopefully that will create a good foundation for ongoing development of those components.
Comment #9
btopro CreditAttribution: btopro at Pennsylvania State University for ELMSLN commentedsounds great to me. Totally open to a refactor of that part though I might be a bit slower on response to that then this initial push due to extreme burn out :)
Comment #10
npacker CreditAttribution: npacker commentedNo problem, I am juggling this with other work so I won't exactly be quick about it.
Something to keep in mind: I heard from the developer of Able Player that he's released a version 3 with an improved YouTube api, among other things. I haven't looked at it yet, so I'm not sure if it is necessary to switch support to that version right away. Might be easier in the long run.
Comment #11
npacker CreditAttribution: npacker commentedComment #12
theMusician CreditAttribution: theMusician at Western Washington University commentedThere is no further development on the 7.x code base.