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.
We want to use the video_filter module, but some of the default codecs aren't appropriate for the site (for example, 'myspace' and 'collegehumour' don't set well with the brand).
Rather than hack the unwanted codecs out of the module, I'd like to allow other modules to alter or unset the defined codecs, for example, via a hook_codec_alter.
Comment | File | Size | Author |
---|---|---|---|
#7 | video_filter_codec_alter_747074_7.patch | 1.55 KB | crea |
#1 | 747074-add_hook_codec_alter.patch | 1.39 KB | manarth |
Comments
Comment #1
manarth CreditAttribution: manarth commentedPatch attached...
replaces all 'module_invoke_all' calls with a call to a helper function.
Helper function calls module_invoke_all, then passes the results (by reference) through hook_codec_alter.
Comment #2
manarth CreditAttribution: manarth commentedComment #3
anonNice idea.
What about settings for this instead? So users with no php skills can enable/disable codecs?
Comment #4
blackdog CreditAttribution: blackdog commentedI like both ideas.
Should the settings be for each format, or a global setting?
Comment #5
anonFor each format I think, but not sure on how to deal with this tho.
Comment #6
blackdog CreditAttribution: blackdog commentedThis needs to go into the 3.x branch. I'll take another stab at it.
Comment #7
crea CreditAttribution: crea commentedComment #8
blackdog CreditAttribution: blackdog commentedGood stuff crea!
I've committed the patch with one change, I named the alter video_filter_codec_info. In both 6.x-3.x and 7.x-3.x. Thanks!
If someone need an UI for this, let's open a new issue.