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.
Control player dimensions by formatter.
Comment | File | Size | Author |
---|---|---|---|
#3 | 1303910-formatter-based-width-height-02.patch | 25.04 KB | heshanlk |
#1 | 1303910-formatter-based-width-height-01.patch | 25.06 KB | heshanlk |
Comments
Comment #1
heshanlkPatch attached.
Comment #2
heshanlkComment #3
heshanlkComment #4
jec006 CreditAttribution: jec006 commentedI like this idea, however, the issue I have is that youtube and vimeo videos + players aren't the same aspect ratio.
Youtube player + video by default is 349x560 while the vimeo one is 315x560 (i think this is mostly because of the differences in control schemes on the players). So having a single heightxwidth for a player will basically cause one or the other to be distorted. This was the original reason I pushed it off onto the handler functions and made the configuration by-provider.
I have moved all the configuration to the field instances, instead of it being in the variables table in a separate configuration. I also fixed the spacing issues you corrected in your patch.
I suppose an option would be to have settings-per-provider for each formatter - and specify based on which provider the video is from (similar to how the configuration is now). I don't know if this is preferable to field instance based height and width configuration - though it seems a bit purer.
Comment #5
jec006 CreditAttribution: jec006 commentedMarking active so we can continue this discussion. Portions of patches were used, while formatter changes weren't - the current patches will no longer apply.
Comment #6
jec006 CreditAttribution: jec006 commentedCheck out 7.x-2.x which creates a nice video_style idea that will basically fulfill these needs.