Skip to content

Commit a99d63b

Browse files
committed
version 1.3.0 with css classes, width fix, better responsiveness, and updated lite-youtube compontent
1 parent 7ea0231 commit a99d63b

File tree

5 files changed

+18
-16
lines changed

5 files changed

+18
-16
lines changed

enhanced-embed-block.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Author: Mark Root-Wiley, MRW Web Design
77
* Author URI: https://MRWweb.com
88
* Text Domain: enhanced-embed-block
9-
* Version: 1.2.1
9+
* Version: 1.3.0
1010
* Requires at least: 6.5
1111
* Requires PHP: 7.4
1212
* GitHub Plugin URI: mrwweb/enhanced-embed-block
@@ -19,7 +19,7 @@
1919

2020
namespace EnhancedEmbedBlock;
2121

22-
define( 'EEB_VERSION', '1.2.1' );
22+
define( 'EEB_VERSION', '1.3.0' );
2323

2424
add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_lite_youtube_component' );
2525
/**

inc/vimeo.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
function render_vimeo_embed( $content, $block ) {
2020
$video_id = extract_vimeo_id( $block['attrs']['url'], $content );
2121

22-
do_action( 'qm/debug', $block );
23-
24-
2522
if ( ! $video_id ) {
2623
return $content;
2724
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "enhanced-embed-block",
3-
"version": "0.1.0",
3+
"version": "0.3.0",
44
"author": "Mark Root-Wiley",
55
"devDependencies": {
66
"@cshawaus/lite-vimeo": "^1.0.2",
7-
"@justinribeiro/lite-youtube": "^1.8.1"
7+
"@justinribeiro/lite-youtube": "^1.8.2"
88
},
99
"scripts": {
1010
"update-lite-youtube": "cp node_modules/@justinribeiro/lite-youtube/lite-youtube.js vendor/lite-youtube/ && cp node_modules/@justinribeiro/lite-youtube/README.md vendor/lite-youtube/ && cp node_modules/@justinribeiro/lite-youtube/LICENSE vendor/lite-youtube/",

readme.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: YouTube, Vimeo, embed, video, block
55
Requires at least: 6.5
66
Tested up to: 6.8
77
Requires PHP: 7.4
8-
Stable tag: 1.2.1
8+
Stable tag: 1.3.0
99
License: GPLv3 or later
1010
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1111

@@ -61,7 +61,7 @@ No. It enhances the default WordPress Embed block for YouTube and Vimeo videos.
6161

6262
= Does it automatically enhance all my YouTube and Vimeo embeds? =
6363

64-
It works for any embeds using the YouTube or Vimeo variations of the Embed block. Embeds using the [embed] shortcode or literal YouTube embed code in HTML are not enhanced. Using the core WordPress Embed block is highly recommended!
64+
It works for any embeds using the YouTube or Vimeo variations of the Embed block. Embeds using the [embed] shortcode or a literal YouTube embed code in an HTML block are not enhanced. Using the core WordPress Embed block is highly recommended!
6565

6666
= Why don't Google and Vimeo load all their videos this way by default? =
6767

@@ -83,6 +83,13 @@ This plugin uses the [`lite-vimeo` custom-element](https://github.com/cshawaus/l
8383

8484
== Changelog ==
8585

86+
= 1.3.0 (7 October 2025) =
87+
88+
- Add missing block CSS classes (including custom ones, if provided)
89+
- Fixes alignment support (wide, full, etc.)
90+
- Improve responsive and aspect ratio behavior of blocks. For instance, old YouTube videos now correctly display with 4/3 placeholder and video player!
91+
- Update lite-youtube component to 1.8.2
92+
8693
= 1.2.1 (4 June 2025) =
8794

8895
- Fix unset array key warning
@@ -112,5 +119,6 @@ This plugin uses the [`lite-vimeo` custom-element](https://github.com/cshawaus/l
112119

113120
== Upgrade Notice ==
114121

115-
= 1.2.0 =
116-
Add Vimeo support! Upgrade lite-youtube custom element. Even faster loading times.
122+
= 1.3.0 =
123+
124+
Add support for block alignment (e.g. wide) and responsive block settings

vendor/lite-youtube/lite-youtube.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ export class LiteYTEmbed extends HTMLElement {
209209
}
210210
generateIframe(isIntersectionObserver = false) {
211211
let autoplay = isIntersectionObserver ? 0 : 1;
212+
let autoPause = this.autoPause ? '&enablejsapi=1' : '';
212213
const wantsNoCookie = this.noCookie ? '-nocookie' : '';
213214
let embedTarget;
214215
if (this.playlistId) {
@@ -217,17 +218,14 @@ export class LiteYTEmbed extends HTMLElement {
217218
else {
218219
embedTarget = `${this.videoId}?`;
219220
}
220-
if (this.autoPause) {
221-
this.params = `enablejsapi=1`;
222-
}
223221
if (this.isYouTubeShort()) {
224222
this.params = `loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`;
225223
autoplay = 1;
226224
}
227225
return `
228226
<iframe credentialless frameborder="0" title="${this.videoTitle}"
229227
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
230-
src="https://www.youtube${wantsNoCookie}.com/embed/${embedTarget}autoplay=${autoplay}&${this.params}"
228+
src="https://www.youtube${wantsNoCookie}.com/embed/${embedTarget}autoplay=${autoplay}${autoPause}&${this.params}"
231229
></iframe>`;
232230
}
233231
addIframe(isIntersectionObserver = false) {
@@ -343,4 +341,3 @@ export class LiteYTEmbed extends HTMLElement {
343341
}
344342
LiteYTEmbed.isPreconnected = false;
345343
customElements.define('lite-youtube', LiteYTEmbed);
346-
//# sourceMappingURL=lite-youtube.js.map

0 commit comments

Comments
 (0)