Skip to content

Commit f7ce844

Browse files
committed
Make CKE5 oEmbed integration opt-in instead of automatic
- Removed automatic OembedParser::register() from boot.php - Users must manually activate in project addon if needed - Prevents conflicts with custom consent solutions - Updated README.md and README_de.md with activation instructions
1 parent 7460af7 commit f7ce844

File tree

3 files changed

+40
-7
lines changed

3 files changed

+40
-7
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,34 @@ Features with FFmpeg:
247247

248248
### CKE5 Integration
249249

250-
oEmbed tags from CKEditor 5 are automatically converted to Vidstack players:
250+
The addon provides an oEmbed parser to convert CKEditor 5 oEmbed tags to Vidstack players.
251+
252+
**Manual activation required** (e.g., in your project addon's `boot.php`):
253+
254+
```php
255+
<?php
256+
// In your project addon's boot.php
257+
use FriendsOfRedaxo\VidstackPlayer\OembedParser;
258+
259+
// Register oEmbed parser for CKE5
260+
OembedParser::register();
261+
```
262+
263+
**How it works:**
251264

252265
```html
253266
<!-- CKE5 inserts: -->
254267
<oembed url="https://youtube.com/watch?v=abc"></oembed>
255268

256-
<!-- Automatically becomes: -->
269+
<!-- Gets converted to: -->
257270
<media-player src="..." title="...">...</media-player>
258271
```
259272

273+
**Why manual activation?**
274+
- You might use custom consent management solutions
275+
- Gives you full control over when and how videos are embedded
276+
- Prevents conflicts with existing oEmbed handlers
277+
260278
## Architecture
261279

262280
The addon is structured into focused, single-purpose classes:

README_de.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,34 @@ Features mit FFmpeg:
247247

248248
### CKE5-Integration
249249

250-
oEmbed-Tags aus CKEditor 5 werden automatisch zu Vidstack-Playern konvertiert:
250+
Das AddOn bietet einen oEmbed-Parser, um CKEditor 5 oEmbed-Tags in Vidstack-Player umzuwandeln.
251+
252+
**Manuelle Aktivierung erforderlich** (z.B. in der `boot.php` deines Projekt-AddOns):
253+
254+
```php
255+
<?php
256+
// In der boot.php deines Projekt-AddOns
257+
use FriendsOfRedaxo\VidstackPlayer\OembedParser;
258+
259+
// oEmbed-Parser für CKE5 registrieren
260+
OembedParser::register();
261+
```
262+
263+
**So funktioniert es:**
251264

252265
```html
253266
<!-- CKE5 fügt ein: -->
254267
<oembed url="https://youtube.com/watch?v=abc"></oembed>
255268

256-
<!-- Wird automatisch zu: -->
269+
<!-- Wird konvertiert zu: -->
257270
<media-player src="..." title="...">...</media-player>
258271
```
259272

273+
**Warum manuelle Aktivierung?**
274+
- Du nutzt möglicherweise eigene Consent-Management-Lösungen
275+
- Gibt dir volle Kontrolle über wann und wie Videos eingebettet werden
276+
- Verhindert Konflikte mit bestehenden oEmbed-Handlern
277+
260278
## Architektur
261279

262280
Das AddOn ist in fokussierte, zweckgebundene Klassen strukturiert:

boot.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,3 @@
3636
return BackendIntegration::renderMediapoolSidebar($ep);
3737
});
3838
}
39-
40-
// Frontend: Register oEmbed parser for CKE5
41-
OembedParser::register();

0 commit comments

Comments
 (0)