Skip to content

Conversation

intriguedlife
Copy link

@intriguedlife intriguedlife commented Feb 8, 2025

Hi all,

I implemented this functionality that allows the youtube iframe's size to be automatically determined.

Hopefully others can enjoy this functionality as well.

Best regards

@Alkarex
Copy link
Member

Alkarex commented Feb 20, 2025

Any comment @kevinpapst ?

{
$content = '';

if ($this->autoSize) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed the class youtube-plugin-video. Can you re-add it, to not break existing customizations?

if ($this->autoSize) {
$iframe_attribute = 'class="yt_player_autosize"';
} else {
$iframe_attribute = 'width="' . $this->width . '" height="' . $this->height . '"';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember why the style attribute was used, but I am almost certain, that I added it on purpose.
It's gone now.


return array(
'yt_videos' => array(
'autosize' => 'Autogröße des Players',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'autosize' => 'Autogröße des Players',
'autosize' => 'Automatische Größe des Players',

Copy link
Collaborator

@kevinpapst kevinpapst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing this 👍 will test it later on.
Could you please have a look at my comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants