Hello,
we noticed that Opencast videos inserted via TinyMCE are not responsive when “Original size” is used. Setting “Custom size” to width/height = 0 makes them responsive but affects the editor preview.
Environment
- Moodle 5.0.4 (Build: 20251208)
- Editor: TinyMCE
- Plugin version, (filter_opencast | v5.0-r2 | 2025080102)
Steps
- Add “Text and media area.”
- Insert media → Opencast → select file.
- Choose “Original size” → Save.
- Save and return to course.
Actual
- Video is fixed-size, not responsive.
Expected
- Video should be responsive.
Hotfix applied
We temporarily forced width/height to 0 in text_filter.php:
// Original:
$width = self::get_attribute($match, 'width', '[0-9]+');
$height = self::get_attribute($match, 'height', '[0-9]+');
// Hotfix:
$width = 0;
$height = 0;
Could you confirm if this is a bug and if a fix is planned?
Thanks!