PHPackages                             oui/oui\_player - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. oui/oui\_player

ActiveTextpattern-plugin[Image &amp; Media](/categories/media)

oui/oui\_player
===============

Manage configurable media players in Textpattern CMS

1.3.1(8y ago)4111MITPHP

Since May 24Pushed 7y ago2 watchersCompare

[ Source](https://github.com/NicolasGraph/oui_player)[ Packagist](https://packagist.org/packages/oui/oui_player)[ Docs](https://github.com/NicolasGraph/oui_player)[ RSS](/packages/oui-oui-player/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (2)Versions (8)Used By (0)

oui\_player
===========

[](#oui_player)

Introduction
------------

[](#introduction)

An extendable plugin to easily embed customized audio and video players.

. This plugin does not use oembed, it builds iframe embedding codes and HTML5 players by its own without any external request for better performances.

### Supported extensions

[](#supported-extensions)

As known at the last plugin release…

- [Abc News](http://abcnews.go.com/video): [oui\_abcnews](https://github.com/NicolasGraph/oui_abcnews);
- [Archive](https://archive.org/): [oui\_archive](https://github.com/NicolasGraph/oui_archive);
- [Bandcamp](https://bandcamp.com/): [oui\_bandcamp](https://github.com/NicolasGraph/oui_bandcamp);
- [Dailymotion](http://www.dailymotion.com/): [oui\_dailymotion](https://github.com/NicolasGraph/oui_dailymotion);
- [Giphy](https://giphy.com/): [oui\_giphy](https://github.com/NicolasGraph/oui_giphy);
- [HTML5 audio](https://developer.mozilla.org/docs/Web/HTML/Element/audio): [oui\_audio](https://github.com/NicolasGraph/oui_audio);
- [HTML5 video](https://developer.mozilla.org/docs/Web/HTML/Element/video): [oui\_video](https://github.com/NicolasGraph/oui_video);
- [Mixcloud](https://www.mixcloud.com/): [oui\_mixcloud](https://github.com/NicolasGraph/oui_mixcloud);
- [Myspace videos](https://myspace.com/myspace/videos): [oui\_myspace](https://github.com/NicolasGraph/oui_myspace);
- [Soundcloud](https://soundcloud.com/): [oui\_soundcloud](https://github.com/NicolasGraph/oui_soundcloud);
- [Twitch](https://www.twitch.tv/): [oui\_twitch](https://github.com/NicolasGraph/oui_twitch);
- [Viddsee](https://www.viddsee.com/): [oui\_viddsee](https://github.com/NicolasGraph/oui_viddsee);
- [Vimeo](http://www.vimeo.com/): [oui\_vimeo](https://github.com/NicolasGraph/oui_vimeo);
- [Vine](http://vine.co/): [oui\_vine](https://github.com/NicolasGraph/oui_vine);
- [Youtube](https://www.youtube.com/): [oui\_youtube](https://github.com/NicolasGraph/oui_youtube).

### Plugin requirements

[](#plugin-requirements)

oui\_player’s minimum requirements:

- [Textpattern CMS](http://textpattern.com/) 4.6+;
- [oui\_provider](https://github.com/NicolasGraph/oui_provider) v1+;
- Any of the above provider related extension.

Plugin management
-----------------

[](#plugin-management)

### Installation

[](#installation)

#### From the admin interface

[](#from-the-admin-interface)

Follow the below instructions before or after installing the wanted oui\_player extensions:

1. [Download](https://github.com/NicolasGraph/oui_player/releases) the `.txt` or `_zip.txt` compiled plugin file;
2. Upload its contents through the *Admin &gt; Plugins* tab;
3. Confirm the plugin install on the preview page.
4. Enable the plugin **and** click the *Options* link to set the plugin preferences.

#### Via Composer (not available yet)

[](#via-composer-not-available-yet)

After [installing Composer](https://getcomposer.org/doc/00-intro.md…)

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\_player:
    `$ composer require nicolasgraph/oui_player`
4. Connect to the Txp admin interface and click *Options* or visit your “Admin &gt; Preferences”:?event=prefs#prefs\_group\_oui\_player tab to fill the plugin prefs.

### Update

[](#update)

#### From the admin interface

[](#from-the-admin-interface-1)

Follow the install instructions.
If you are updating from v1.\*, be sure to install all wanted extensions before to visit the “Admin &gt; Preferences”:?event=prefs#prefs\_group\_oui\_player tab to keep your preference values untouched.

#### Via Composer (not available yet)

[](#via-composer-not-available-yet-1)

```
$ composer update nicolasgraph/oui_player
```

### Uninstall

[](#uninstall)

#### From the admin interface

[](#from-the-admin-interface-2)

1. In the *Admin &gt; Plugins* tab, check the box on the left of the plugin related row.
2. Under the plugins list, select the the *Delete* option.
3. confirm the deletion.

#### Via Composer (not available yet)

[](#via-composer-not-available-yet-2)

```
$ composer remove nicolasgraph/oui_player
```

Preferences/options
-------------------

[](#preferencesoptions)

Plugin prefs can be set under the *Admin &gt; Preferences* tab and are mainly used as default values for the `` tag attributes.

### Global prefs

[](#global-prefs)

 `Field used by default` Defines a field to use as the default `play` attribute value.
The provided fieldname must be different than any value entered in it; avoid digits if you use ID’s as `play` attribute values
**Default:** `article_image`
**valid:** `article_image` or any existing custom field

 `Favourite provider` Set the default `provider` attribute value.
**Default:** the first plugged provider
**valid:** Any plugged provider in the select list

 `Display the provider player preferences` Displays the defined provider prefs as a goup of prefs.
**Default:** yes
**valid:** yes or no

### Providers prefs

[](#providers-prefs)

While some player parameters, related to the item to play, should be used through attributes (e.g. the Youtube `start` parameter which defines the second where to start playing the video), 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 plugin pref value via an attribute when needed.

Tags
----

[](#tags)

### oui\_player

[](#oui_player-1)

Embeds a player.

```

```

#### Presentational attributes

[](#presentational-attributes)

 `label` String; empty by default.
Label for the video.

 `labeltag` HTML container tag name; empty by default.
HTML wraptag for the label, without brackets.

 `wraptag` HTML container tag name; empty by default.
HTML tag to be used as the content wraptag, without brackets.

 `class` String; empty by default.
CSS class for HTML content wraptag.

 `responsive` `true` or `false`, related preference value used by default.
Adapts the final player size from provided width and/or height and/or ratio values to fit the container width.
Wraps the player and adds some styles.

#### Main tag attributes

[](#main-tag-attributes)

Most of the following attributes can be set via the *Preferences* tab; always prefer plugin “global” prefs to tag related attributes!

 `play` Valid values differs from one provider to another, check each extension.
The item to play; **required if** it does not use the value of the custom field selected in the plugin prefs (See each provider to know the valid values).
**default:** changed v1.2.0 the `play` attribute value of an eventual `` container tag, or the custom field value of the one selected in the plugin prefs.

 `provider` Extension related provider name; uses the related preference value by default.
The provider to use; **required if** the `play` attribute is an id, **recommended anyways** if known as it increases the plugin performances by skipping the provider guess.

#### Providers related tag attributes

[](#providers-related-tag-attributes)

See each provider related extension.

### oui\_if\_player

[](#oui_if_player)

Checks the `play` attribute value againsts defined URL schemes.

```

[…]

```

#### Attributes

[](#attributes)

 `play` The custom field value of the one selected in the plugin prefs by default.
The item to play; **required if** it does not use the value of the custom field selected in the plugin prefs (See each provider to know the valid values).

 `provider` Extension related provider name; empty by default.
Check the URL against valid URL schemes of the defined provider.

Examples
--------

[](#examples)

### Display a player from the default values collected via plugin prefs

[](#display-a-player-from-the-default-values-collected-via-plugin-prefs)

```

```

### Display a player from a manually filled URL

[](#display-a-player-from-a-manually-filled-url)

```

```

…or, maybe a bit faster…

```

```

### Display a player from manually filled ID

[](#display-a-player-from-manually-filled-id)

Using the favourite provider set in the prefs.

```

```

…or, in conjonction with the `provider` attribute…

```

```

### Display a player only if its URL is recognized as a provider URL scheme

[](#display-a-player-only-if-its-url-is-recognized-as-a-provider-url-scheme)

With the default values collected via plugin prefs…

```

```

…or, with a manually filled URL…

```

```

You can also add the provider attribute to check the URL against URL schemes of a defined provider.

Credits
-------

[](#credits)

### Author

[](#author)

[Nicolas Morand](https://twitter.com/NicolasGraph)
*Thank you to the Textpattern community and the core team.*

### License

[](#license)

This plugin is distributed under [GPL v2.0](https://www.gnu.org/licenses/gpl-2.0.txt).

oui\_player version 2.0.0-BETA3, Copyright © 2018 Nicolas Morand
This Textpattern plugin comes with ABSOLUTELY [NO WARRANTY](https://www.gnu.org/licenses/gpl-2.0.html#section11).
This is free software, and you are welcome to redistribute it [under certain conditions](https://www.gnu.org/licenses/gpl-2.0.html#SEC3).

### Changelog

[](#changelog)

- **v2.0.0-BETA3** (2018-08-15)
    - Added: admin side player preview;
    - Changed: excerpt field no longer supported;
    - Added: responsive embedding;
        - changed: providers related preferences displayed by default;
    - changed: code rework:
        - providers now work as pluggable extensions:
            - Extension base (required): [oui\_provider](https://github.com/NicolasGraph/oui_provider); any plugin extending the `\Oui\Provider` class in an author prefix related namespace will be plugged into *oui\_player*;
            - ABC News: [oui\_abcnews](https://github.com/NicolasGraph/oui_abcnews);
            - Archive: [oui\_archive](https://github.com/NicolasGraph/oui_archive);
            - Bandcamp: [oui\_bandcamp](https://github.com/NicolasGraph/oui_bandcamp);
            - Dailymotion: [oui\_bandcamp](https://github.com/NicolasGraph/oui_dailymotion);
            - Giphy: [oui\_giphy](https://github.com/NicolasGraph/oui_giphy) (new);
            - Mixcloud: [oui\_mixcloud](https://github.com/NicolasGraph/oui_mixcloud);
            - MySpace: [oui\_myspace](https://github.com/NicolasGraph/oui_myspace);
            - HTML5 audio: [oui\_audio](https://github.com/NicolasGraph/oui_audio);
            - HTML5 video: [oui\_video](https://github.com/NicolasGraph/oui_video);
            - Soundcloud: [oui\_soundcloud](https://github.com/NicolasGraph/oui_soundcloud);
            - Twitch: [oui\_twitch](https://github.com/NicolasGraph/oui_twitch);
            - Viddsee: [oui\_viddsee](https://github.com/NicolasGraph/oui_viddsee);
            - Vimeo: [oui\_vimeo](https://github.com/NicolasGraph/oui_vimeo);
            - Vine: [oui\_vine](https://github.com/NicolasGraph/oui_vine);
            - Youtube: [oui\_youtube](https://github.com/NicolasGraph/oui_youtube);
        - author prefix related namespace;
        - new class names (`Admin` =&gt; `PlayerAdmin`, `Main` =&gt; `Player`, `Player` =&gt; `PlayerBase`);
        - tags now registered with related callback methods from the `Player` class;
        - providers stored with their plugin author related prefix/namespace.
        - instances created/get via `Txp::get()`.
- **v1.3.1** (2017-07-13)
- **v1.3.0** (2017-05-24)
    - Adds [Composer](https://getcomposer.org/) support for [textpattern/installer](https://packagist.org/packages/textpattern/installer);
    - fixes multiple players prefs display and improves perfs;
    - improves scripts embedding;
    - added: Youtube player parameters `enablejsapi` and `origin`;
    - added: Dailymotion player parameters `api` and `origin`;
    - added: Vimeo player parameter `api` and removes `badge`;
    - added: support for:
        - [Bandcamp](https://bandcamp.com/);
        - HTML5 [audio](https://developer.mozilla.org/fr/docs/Web/HTML/Element/Audio) + [video](https://developer.mozilla.org/fr/docs/Web/HTML/Element/Video);
- **v1.2.1** (2017-01-16)
    - Fixed: Fixes the *Field used by default* pref display when no custom field exists;
    - fixed: fixes Textpack typo;
    - changed: compiled code lightened by removing duplicated license related comments;
- **v1.2.0** (2016-12-12)
    - added: sets the custom field plugin pref as the defaut value of the conditional tag `play` attribute;
    - added: introduces a `play` attribute value inheritance in a conditional/container tag context;
    - added: support for:
        - [Twitch channels](https://www.twitch.tv/),
        - [Vine](https://vine.co/);
    - changed: improves PHP classes and methods use (see *For developers*).
- **oui\_player v1.1.0** (2016-10-14)
    - changed: plugin/tag names;
    - removed: Txp 4.5 support;
    - changed: consistency between attribute and player parameter names increased;
    - changed: code rework to be easily extendable;
    - added: support for:
        - [Abc News](http://abcnews.go.com/video),
        - [Archive](https://archive.org/),
        - [Mixcloud](https://www.mixcloud.com/),
        - [Myspace videos](https://myspace.com/myspace/videos),
        - [Soundcloud](https://soundcloud.com/),
        - [Twitch](https://www.twitch.tv/),
        - [Viddsee](https://www.viddsee.com/);
    - (changed) Help file styling improvements.
- **oui\_video v0.1.0** (2016-09-13)
- **oui\_dailymotion v1.3.1** (2016-02-25) inspired by [arc\_youtube](http://andy-carter.com/txp/arc_youtube) and [arc\_vimeo](http://andy-carter.com/txp/arc_vimeo) by [Andy Carter](http://andy-carter.com).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity68

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~112 days

Total

5

Last Release

2828d ago

Major Versions

1.3.1 → 2.0.0-BETA12018-06-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/08870ec5c5f7d2d86060a2af7213ee86577215c40909b7cdbfd748be616bced2?d=identicon)[oui](/maintainers/oui)

---

Tags

abcarchiveaudiobandcampdailymotionembedmixcloudmyspaceoui-playerplayersoundcloudtextpatterntextpattern-plugintwitchtxpviddseevideovimeovineyoutubepluginarchiveaudiovideoyoutubevimeomixclouddailymotiontwitchvineplayersoundcloudbandcampabctextpatternmyspaceviddsee

### Embed Badge

![Health badge](/badges/oui-oui-player/health.svg)

```
[![Health](https://phpackages.com/badges/oui-oui-player/health.svg)](https://phpackages.com/packages/oui-oui-player)
```

###  Alternatives

[happyworm/jplayer

jPlayer allows you to create a media player with a consistent interface and experience across all browsers.

4.6k114.2k1](/packages/happyworm-jplayer)[chojnicki/video-platforms-parser

Easy to use SDK with grabber for multiple platforms at once like YouTube, Dailymotion, Facebook and more.

22226.4k](/packages/chojnicki-video-platforms-parser)[jonnitto/plyr

Plyr.io for Neos.io

1236.2k2](/packages/jonnitto-plyr)[laravel-admin-ext/media-player

Intergrates mediaelement into laravel-admin

3253.7k](/packages/laravel-admin-ext-media-player)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
