Hey
@Tyler DuPont, while Waterhole will automatically embed .mp4 links, unfortunately embedding a YouTube video isn't as simple as appending the .mp4 extension to the URL.
However there is a TextFormatter plugin that can automatically embed YouTube videos (among other things). Take a look at Waterhole's Formatter documentation to learn how to configure the formatter, and the TextFormatter MediaEmbed plugin. The code will end up looking something like this:
use Waterhole\Extend;
use s9e\TextFormatter\Configurator;
Extend\Formatter::configure(function (Configurator $configurator) {
$configurator->MediaEmbed->add('youtube');
});
2 Comments
Hey @Tyler DuPont, while Waterhole will automatically embed .mp4 links, unfortunately embedding a YouTube video isn't as simple as appending the .mp4 extension to the URL.
However there is a TextFormatter plugin that can automatically embed YouTube videos (among other things). Take a look at Waterhole's Formatter documentation to learn how to configure the formatter, and the TextFormatter MediaEmbed plugin. The code will end up looking something like this:
Hi, Sir,
For your reference,
On my test forum, I added the following code in the "WaterholeServiceProvider.php":
This allows for quick and simple embedding of the above media platforms.