MDL-76104 mediaplayer_youtube: Respect container max width
This commit is contained in:
@@ -96,7 +96,8 @@ class filter_test extends \advanced_testcase {
|
||||
$paddedurl = str_pad($originalurl, 6000, 'z');
|
||||
$validpaddedurl = '<p>Some text.</p><pre style="color: rgb(0, 0, 0); line-height: normal;"><span class="mediaplugin mediaplugin_youtube">
|
||||
<iframe title="Valid link" width="640" height="360"
|
||||
src="https://www.youtube.com/embed/uUhWl9Lm3OM?rel=0&wmode=transparent" frameborder="0" allowfullscreen="1"></iframe>
|
||||
src="https://www.youtube.com/embed/uUhWl9Lm3OM?rel=0&wmode=transparent" frameborder="0"
|
||||
allowfullscreen="1" style="max-width: 100%;"></iframe>
|
||||
</span></pre><pre style="color: rgb(0, 0, 0); line-height: normal;">';
|
||||
$validpaddedurl = str_pad($validpaddedurl, 6000 + (strlen($validpaddedurl) - strlen($originalurl)), 'z');
|
||||
|
||||
|
||||
@@ -78,7 +78,8 @@ class media_youtube_plugin extends core_media_player_external {
|
||||
|
||||
return <<<OET
|
||||
<span class="mediaplugin mediaplugin_youtube">
|
||||
<iframe width="$width" height="$height" src="https://$site/embed/videoseries?list=$playlist" frameborder="0" allowfullscreen="1"></iframe>
|
||||
<iframe width="$width" height="$height" src="https://$site/embed/videoseries?list=$playlist" frameborder="0"
|
||||
allowfullscreen="1" style="max-width: 100%;"></iframe>
|
||||
</span>
|
||||
OET;
|
||||
} else {
|
||||
@@ -100,7 +101,8 @@ OET;
|
||||
return <<<OET
|
||||
<span class="mediaplugin mediaplugin_youtube">
|
||||
<iframe title="$info" width="$width" height="$height"
|
||||
src="https://www.youtube.com/embed/$videoid?{$params}rel=0&wmode=transparent" frameborder="0" allowfullscreen="1"></iframe>
|
||||
src="https://www.youtube.com/embed/$videoid?{$params}rel=0&wmode=transparent" frameborder="0"
|
||||
allowfullscreen="1" style="max-width: 100%;"></iframe>
|
||||
</span>
|
||||
OET;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user