A recent change in Discourse has improved the handling of YouTube embeds and thumbnails, removing annoying black bars. merefield noticed the change and thanked renato for pointing to the relevant GitHub pull requests (https://github.com/discourse/discourse/pull/20722/files and https://github.com/discourse/discourse/pull/20914). jancernik explained that the change involved modernizing the lazy loading plugin from jQuery and rebaking due to changes in attribute storage, allowing for future compatibility with providers like Vimeo.
I’m glad you liked it! The old plugin that was used to handle lazy loading for YouTube was written in jQuery and had some issues. So, we decided to modernize it. The rebake was needed because we made some slight changes in the way we store attributes for the embed, which now allows us to use this type of lazy loading on other providers like Vimeo.
Feel free to reach out if you have more feedback on it.