From 1298d907b857c0dbb2e728114e0354ef7e54cd34 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 28 Feb 2021 16:22:06 +0100 Subject: [PATCH] Reduce the width of embedded videos Closes #3982 --- com.woltlab.wcf/mediaProvider.xml | 6 +++--- .../media/provider/TwitchBBCodeMediaProvider.class.php | 2 +- .../media/provider/YouTubeBBCodeMediaProvider.class.php | 2 +- wcfsetup/install/files/style/bbcode/video.scss | 6 ++++++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/com.woltlab.wcf/mediaProvider.xml b/com.woltlab.wcf/mediaProvider.xml index 581a5c8d89..b6d5cf5494 100644 --- a/com.woltlab.wcf/mediaProvider.xml +++ b/com.woltlab.wcf/mediaProvider.xml @@ -9,18 +9,18 @@ YouTube Playlist [a-zA-Z0-9_-]+)]]> - ]]> + ]]> Vimeo \d+) https?://vimeo\.com/groups/[^/]+/videos/(?P\d+)]]> - ]]> + ]]> Dailymotion [a-zA-Z0-9_-]+)]]> - ]]> + ]]> GitHub Gist diff --git a/wcfsetup/install/files/lib/system/bbcode/media/provider/TwitchBBCodeMediaProvider.class.php b/wcfsetup/install/files/lib/system/bbcode/media/provider/TwitchBBCodeMediaProvider.class.php index ec696661b1..965f267918 100644 --- a/wcfsetup/install/files/lib/system/bbcode/media/provider/TwitchBBCodeMediaProvider.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/media/provider/TwitchBBCodeMediaProvider.class.php @@ -40,7 +40,7 @@ class TwitchBBCodeMediaProvider implements IBBCodeMediaProvider } if (!empty($src)) { - return '
'; + return '
'; } return ''; diff --git a/wcfsetup/install/files/lib/system/bbcode/media/provider/YouTubeBBCodeMediaProvider.class.php b/wcfsetup/install/files/lib/system/bbcode/media/provider/YouTubeBBCodeMediaProvider.class.php index d88e5275d5..e835a85fa7 100644 --- a/wcfsetup/install/files/lib/system/bbcode/media/provider/YouTubeBBCodeMediaProvider.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/media/provider/YouTubeBBCodeMediaProvider.class.php @@ -28,7 +28,7 @@ class YouTubeBBCodeMediaProvider implements IBBCodeMediaProvider $start = $this->timeToSeconds($startParameter); $end = $this->timeToSeconds($endParameter); - return '
'; + return '
'; } /** diff --git a/wcfsetup/install/files/style/bbcode/video.scss b/wcfsetup/install/files/style/bbcode/video.scss index c7a4455bf7..60255e1cc4 100644 --- a/wcfsetup/install/files/style/bbcode/video.scss +++ b/wcfsetup/install/files/style/bbcode/video.scss @@ -13,3 +13,9 @@ width: 100%; } } + +.messageVideoContainer { + iframe { + max-width: 100%; + } +} -- 2.20.1