oui_twitch is a oui_player v2+ extension to easily embed Twitch provided videos in Textpattern powered websites.
The above platform serves cookies with its player, according to the EU legislation, you should warn your users about these cookies before they are added. This can be done by using oui_cookie.
oui_soundcloud’s minimum requirements:
- Textpattern CMS v4.6+;
- oui_player v2+;
- oui_provider v1+.
- Download the compiled plugin file or the source to compile a customized file.
- Paste the content of the compiled plugin file under the “Admin > Plugins”:?event=plugin tab and click the Upload button.
- Confirm the plugin install by clicking the Install button on the plugin preview page.
- Enable the plugin and click the Options link (or visit the Preferences tab) to set the provider preferences.
After installing Composer
- Target your project directory:
$ cd /path/to/your/textpattern/installation/dir - If it’s not already done, lock your version of Txp:
$ composer require textpattern/lock:4.6.2, where4.6.2is the Txp version in use. - Install oui_soundcloud:
$ composer require nicolasgraph/oui_soundcloud
- Follow the installation instruction above.
$ composer update nicolasgraph/oui_soundcloud- Check the box on the left of the plugin row under the “Admin > Plugins”:?event=plugin.
- open the select list at the bottom of the plugins table and choose Delete.
- confirm the plugin deletion.
$ composer remove nicolasgraph/oui_soundcloudWhile the <txp:oui_player /> tag is able to embed any video from any extension-related provider, the <txp:oui_twitch /> tag is a shortcut to embed Twitch videos only. It is strictly equivalent to <txp:oui_player provider="twitch" />.
Check the oui_player documentation for more informations.
- vID;
- http(s)://(www.)twitch.tv/…/v/ID (video);
- http(s)://(www.)twitch.tv/ID (channel);
- http(s)://twitch.go.com/…/video/…*ID*.
When using the oui_player tag (vs oui_twitch), the right provider needs to be set if the play value or its field related one is an ID. It is optional, but can fasten the rendering, if the value is an URL.
While some player customization elements, related to the media to play, should be used through attributes, these used as global settings should preferrably be set through the plugin preferences to avoid a massive use of tag attributes.
Of course, it is still possible to override a preference value via an attribute when needed.
widthInteger; initially set to
620;
The width of the player in pixels.heightInteger; initially set to
378;
The height of the player in pixels.ratioInteger
:integer; initially not set;
The ratio used to calculate the missing value for the width or the height.responsivetrueorfalse; initially set tofalse.
Adapts the final player size from the provided width and/or height and/or ratio values to fit the container width.
Wraps the player and adds some styles.
From Txp 4.7, paramaters accepting true and false as valid values can be enable through boolean/valueless attributes.
autoplaytrueorfalse; initially set totrue.
Whether to play after loading or not.mutedtrueorfalse; initially set tofalse.
Whether to disable sound by default or not.time