An open API service indexing awesome lists of open source software.

https://github.com/nicolasgraph/oui_dailymotion

Embed Dailymotion video players in @Textpattern CMS through oui_player v2+
https://github.com/nicolasgraph/oui_dailymotion

dailymotion embed oui-player player responsive textpattern textpattern-plugin video video-player

Last synced: 14 days ago
JSON representation

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

Awesome Lists containing this project

README

          

h1. oui_dailymotion

* "Introduction":#introduction
* "Plugin management":#plugin-management
* "Tags and parameters":#tags-and-parameters
* "Examples":#examples
* "Credits":#credits

h2. Introduction

"oui_dailymotion":https://github.com/NicolasGraph/oui_dailymotion is a "oui_player":https://github.com/NicolasGraph/oui_player v2+ extension to easily embed "Dailymotion":https://dailymotion.com/ provided videos in "Textpattern":https://textpattern.com/ 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":https://github.com/NicolasGraph/oui_cookie.

h3. Plugin requirements

oui_dailymotion's minimum requirements:

* "Textpattern CMS":http://textpattern.com/ v4.6+;
* "oui_player":https://github.com/NicolasGraph/oui_player v2+;
* "oui_provider":https://github.com/NicolasGraph/oui_provider v1+.

h2. Plugin management

h3. Installation

h4. From the admin interface

# "Download":https://github.com/NicolasGraph/oui_dailymotion/releases 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.

h4. Via Composer (not available yet)

After "installing Composer":https://getcomposer.org/doc/00-intro.md…

# 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@, where @4.6.2@ is the Txp version in use.
# Install oui_dailymotion:
@$ composer require nicolasgraph/oui_dailymotion@

h3. Update

h4. From the admin interface

# Follow the installation instruction above.

h4. Via Composer (not available yet)

bc. $ composer update nicolasgraph/oui_dailymotion

h3. Uninstall

h4. From the admin interface

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

h4. Via Composer (not available yet)

bc. $ composer remove nicolasgraph/oui_dailymotion

h2. Tags and parameters

h3. oui_dailymotion vs oui_player

While the @@ tag is able to embed any video from any extension-related provider, the @@ tag is a shortcut to embed Dailymotion videos only. It is strictly equivalent to @@.

Check the "oui_player":https://github.com/NicolasGraph/oui_player documentation for more informations.

h4. Recognised values for the @play@ attribute

* *ID*;
* http(s)://dai.ly/[*ID*];
* http(s)://www.dailymotion.com/video/[*ID*]…;
* http(s)://www.dailymotion.com/embed/video/[*ID*].

When using the @@ tag (vs @@), 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.

h4. Player customization

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

h5. Size

- @width@ :=
Integer; initially set to @480@;
The width of the player in pixels. =:
- @height@ :=
Integer; initially set to @270@;
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. =:

h5. Parameters (a→z)

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

- @api@ :=
@false@, @postMessage@, @location@ or @1@; initially set to @false@.
Enables or disables "the javascript player api":https://developer.dailymotion.com/player#player-api. =:
- @autoplay@ :=
@true@ or @false@; initially set to @false@.
Starts the playback of the video automatically after the player load.
This parameter may not work on some mobile OS. =:
- @controls@ :=
@true@ or @false@; initially set to @true@.
Whether to display the player controls or not. =:
- @endscreen_enable@ :=
@true@ or @false@; initially set to @true@.
Whether to enable the end screen or not. =:
- @mute@ :=
@true@ or @false@; initially set to @false@.
Whether to mute the video or not. =:
- @origin@ :=
URL; initially not set.
The domain of the page hosting the Dailymotion player.
When using @api="postMessage"@, you might want to specify origin for extra security. =:
- @quality@ :=
@240@, @380@, @480@, @720@, @1080@, @1440@ or @2160@; initially set to @auto@.
Set the suggested playback quality for the video. =:
- @sharing_enable@ :=
@true@ or @false@; initially set to @true@.
Whether to display the sharing button or not. =:
- @start@ :=
Integer, initially not set.
Specifies the time (in seconds) from which the video should start playing. =:
- @subtitles_default@ :=
Initially not set.
Specifies the default selected subtitles language. =:
- @syndication@ :=
Initially not set.
Passes your syndication key to the player. =:
- @ui_highlight@ :=
Hexadecimal color value; initially set to @ffcc33@.
Changes the default colour used in the controls. =:
- @ui_logo@ :=
@true@ or @false@; initially set to @true@.
Whether to display the Dailymotion logo or not. =:
- @ui_start_screen_info@ :=
@true@ or @false@; initially set to @true@.
Whether to show video information on the start screen or not. =:
- @ui_theme@ :=
@dark@ or @light@, initially set to @dark@.
Choose the default base colour theme. =:

h3. oui_if_dailymotion vs oui_if_player

p. While the @…@ tag is able to check an URL against any URL from any extension-related provider, the @…@ tag is a shortcut to check an URL against Dailymotion related URL schemes only. It is strictly equivalent to @…@.

Check the "oui_player":https://github.com/NicolasGraph/oui_player documentation for more informations.

h2. Examples

h3. Embed a player using the preference values

bc(language-markup).

"oui_player":https://github.com/NicolasGraph/oui_player preference related field value: @http://dai.ly/x2m8jpp@.

h3. Embed a player by defining its provider and a media ID through attributes

bc(language-markup).

…or:

bc(language-markup).

h3. Conditionally embed a player using attributes

bc(language-markup)..

p. …or:

bc(language-markup)..

h2. Credits

h3. Author

"Nicolas Morand":https://twitter.com/NicolasGraph
_Thank you to the Textpattern community and the core team._

h3. License

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

oui_dailymotion version 2.0.0-BETA3, Copyright (C) 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.

h3. Changelog

* *oui_dailymotion v2.0.0-BETA3* (2018-08-15)
** Changed: initial player size.
* *oui_player v1.3.0* (2017-05-24)