Jump to content

d'Hinnisdaël

Members
  • Posts

    166
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by d'Hinnisdaël

  1. I had several clients request a version of this module that honors the aspect ratio of a video when using the responsive embed method. For now, the module is using a hard-coded 16/9 ratio. I decided to give it a go myself and forked Ryan's repo. I added functionality to calculate a video's aspect ratio from the oEmbed return values for width and height and made a change to the module's custom db schema to save the aspect ratio. In the (improbable) case the aspect ratio can't be determined, I added a fallback aspect ratio to the module's config. After looking around for a bit, this post about db schema updates for modules with custom databases provided excellent examples on how to handle the schema updates for existing installations. The changes have been tested on several live sites (3.0) and the update went without hiccups. If anyone's interested, here's the commit: https://github.com/[...]/commit/76e9a5e7bba79aef8fae35aaa7a1b7b79e970f90 I'd love to get some feedback on this! Especially from people running this on the 2.7 or 2.8 branch. If all works well, it'd be great to integrate this into @ryan's official repo at some point.
  2. +1 — This is especially important for portfolio sites with multiple large images. Lazyloading is a possibility, but even then progressive loading is visually more satisfying than scanlines. I don't know about the technical details of implementing this in PHP, but I imagine this can't be too complicated. Or do you think this would best be handled by writing a PW module?
×
×
  • Create New...