NicolasGraph / oui_twitch

Embed Twitch video players in @Textpattern CMS through oui_player v2+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oui_twitch

Introduction

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.

Plugin requirements

oui_soundcloud’s minimum requirements:

Plugin management

Installation

From the admin interface

  1. Download the compiled plugin file or the source to compile a customized file.
  2. Paste the content of the compiled plugin file under the “Admin > Plugins”:?event=plugin tab and click the Upload button.
  3. Confirm the plugin install by clicking the Install button on the plugin preview page.
  4. Enable the plugin and click the Options link (or visit the Preferences tab) to set the provider preferences.

Via Composer (not available yet)

After installing Composer

  1. Target your project directory:
    $ cd /path/to/your/textpattern/installation/dir
  2. If it’s not already done, lock your version of Txp:
    $ composer require textpattern/lock:4.6.2, where 4.6.2 is the Txp version in use.
  3. Install oui_soundcloud:
    $ composer require nicolasgraph/oui_soundcloud

Update

From the admin interface

  1. Follow the installation instruction above.

Via Composer (not available yet)

$ composer update nicolasgraph/oui_soundcloud

Uninstall

From the admin interface

  1. Check the box on the left of the plugin row under the “Admin > Plugins”:?event=plugin.
  2. open the select list at the bottom of the plugins table and choose Delete.
  3. confirm the plugin deletion.

Via Composer (not available yet)

$ composer remove nicolasgraph/oui_soundcloud

Tags and parameters

oui_twitch vs oui_player

While 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.

Recognised values for the play attribute

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.

Player customization

Preferences vs attributes

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.

Size
width

Integer; initially set to 620;
The width of the player in pixels.

height

Integer; initially set to 378;
The height of the player in pixels.

ratio

Integer:integer; initially not set;
The ratio used to calculate the missing value for the width or the height.

responsive

true or false; initially set to false.
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.

Parameters (a→z)

From Txp 4.7, paramaters accepting true and false as valid values can be enable through boolean/valueless attributes.

autoplay

true or false; initially set to true.
Whether to play after loading or not.

muted

true or false; initially set to false.
Whether to disable sound by default or not.

time

About

Embed Twitch video players in @Textpattern CMS through oui_player v2+

License:GNU General Public License v2.0


Languages

Language:PHP 100.0%