https://github.com/clubside/vern-responsive-video
WordPress plugin that adapts oEmbed video to full width while maintaining aspect ratio.
https://github.com/clubside/vern-responsive-video
oembed video wordpress-plugin youtube
Last synced: about 2 months ago
JSON representation
WordPress plugin that adapts oEmbed video to full width while maintaining aspect ratio.
- Host: GitHub
- URL: https://github.com/clubside/vern-responsive-video
- Owner: clubside
- Created: 2023-12-22T06:12:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-15T00:41:41.000Z (over 2 years ago)
- Last Synced: 2025-04-09T11:24:14.229Z (about 1 year ago)
- Topics: oembed, video, wordpress-plugin, youtube
- Language: PHP
- Homepage:
- Size: 1.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Easy Responsive Video
Easy Responsive Video is a WordPress plugin that adapts `oEmbed` video to full width while maintaining aspect ratio.
## Description
Automatically adapt your embedded videos to the full width of their containers while maintaining the correct aspect ratio.
This is a simple filter that scans each embed in your posts, pages and custom post types, reads the width and height on the `iframe` and adds a style attribute including CSS `width`, `height` and `aspect-ratio` properties.
Currently supporting YouTube, Vimeo, WordPress/VideoPress and DailyMotion.
## Motivation
I'm the devloper for the film writer [Vern](https://outlawvern.com) and had been using the plugin [Fluid Video Embeds](https://wordpress.org/plugins/fluid-video-embeds/) for years. After noticing a large number of errors in the server logs I discovered it was no longer maintained. The other solutions I found wrapped the `iframe` in a div and used CSS tricks to scale and maintain aspect ratio, and many required changing the links to shortcodes. I wanted a simple solution that would work with both Classic editor URLs as well as modern embed Blocks. This is my solution.