Download the PHP package surface/commonmark-ext-youtube-iframe without Composer
On this page you can find all versions of the php package surface/commonmark-ext-youtube-iframe. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download surface/commonmark-ext-youtube-iframe
More information about surface/commonmark-ext-youtube-iframe
Files in surface/commonmark-ext-youtube-iframe
Package commonmark-ext-youtube-iframe
Short Description Extension for league/commonmark to replace YouTube link with an iframe.
License MIT
Homepage https://github.com/trovster/commonmark-ext-youtube-iframe
Informations about the package commonmark-ext-youtube-iframe
YouTube iframe extension
An extension for league/commonmark version 2 built using PHP 8.0. This replaces YouTube links with the embed iframe.
The extension supports for the primary YouTube URL, with and without prefixed with
the www
. It also supports the short shareable URL using the youtu.be
domain.
Initially based on the YouTube extension.
Installation
The project should be installed via Composer:
Usage
Configure your CommonMark Environment
and add the extension.
Dimensions
You can control the dimensions of the videos by using the width
and
height
configuration options.
You can also configure the dimensions using query parameters on the embed URL.
You can provide the height
or width
or both.
Full URL
You can disable the parsing of full YouTube URLs (with or without the www) by
using the following option. If this option is disabled, only URLs under the
‘short’ domain will be used (youtu.be
).
Testing
There are Unit and Integration tests for the project. These can be run using the following commands:
There are also scripts to run code sniffer, mess detector and static analysis:
Changelog
Please refer to the CHANGELOG for more information on what has changed recently.
License
This library is licensed under the MIT license. See the License File for more information.