Skip to content

Commit

Permalink
Rework almost complete
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGraph committed Sep 12, 2016
1 parent 8bdbc7a commit 39543f6
Show file tree
Hide file tree
Showing 3 changed files with 437 additions and 273 deletions.
78 changes: 41 additions & 37 deletions README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,9 @@ To install go to the 'plugins' tab under 'admin' and paste the plugin code into

h2(#tags). Preferences/options

Plugin prefs are used as default values for the oui_video @<txp:oui_video />@ attributes.
Plugin prefs are mainly used as default values for the oui_video @<txp:oui_video />@ attributes.
They can be overriden by these attributes when needed.

Golbal prefs:

* *Provider* - Uses as the default value of the @provider@ attribute.
* *Video field* - Uses as the default value of the @video@ attribute.
* *Width* - Uses as the default value of the @width@ attribute.
* *Height* - Uses as the default value of the @height@ attribute.
* *Ratio* - Uses as the default value of the @ratio@ attribute.
* *Display Vimeo player prefs* - Displays the Vimeo player parameters as a group of prefs.
* *Display Youtube player prefs* - Displays the Youtube player parameters as a group of prefs.
* *Display Dailymotion player prefs* - Displays the Dailymotion player parameters as a group of prefs.

Most player parameters can be set through plugin prefs if enabled; see "Dailymotion player":http://localhost:8888/test/textpattern-4.6/textpattern/index.php?event=prefs#prefs_group_oui_video_dailymotion, "Vimeo player":http://localhost:8888/test/textpattern-4.6/textpattern/index.php?event=prefs#prefs_group_oui_video_vimeo and "Youtube player":http://localhost:8888/test/textpattern-4.6/textpattern/index.php?event=prefs#prefs_group_oui_video_youtube prefs.

h2(#tags). Tags

h3. oui_video
Expand All @@ -59,12 +46,17 @@ h4. Presentational attributes

h4. Main tag attributes

Most of this attributes can be set via the _Preferences_ tab; +always prefer plugin "global" prefs to tag related attributes!+

* @video=""@ - Video url, the video id or the custom_field containing it.
* @provider=""@ - The video provider to use if the @video@ attribute value is an id.
* @width=""@ - The width of the player in pixels.
* @height=""@ - The height of the player in pixels.
* @ratio="4:3"@ - The ratio used to calculate the missing value for the width or the height.

h4. Vimeo additional player parameters

More informations on "this Vimeo webpage":https://developer.vimeo.com/player/embedding
Most of this attributes can be set via the _Preferences_ tab; +always prefer plugin "global" prefs to tag related attributes!+

* @autopause="1"@ - @0@ or @1@ - Enables or disables pausing this video when another video is played.
* @autoplay="0"@ - @0@ or @1@ - Play the video automatically on load. Note that this won’t work on some devices.
Expand All @@ -76,46 +68,58 @@ More informations on "this Vimeo webpage":https://developer.vimeo.com/player/emb
* @portrait="1"@ - @0@ or @1@ - Show the user’s portrait on the video.
* @title="1"@ - @0@ or @1@ - Show the title on the video.

More informations on "this Vimeo webpage":https://developer.vimeo.com/player/embedding.

h4. Youtube additional player parameters

More informations on "this Youtube webpage":https://developers.google.com/youtube/player_parameters
Most of this attributes can be set via the _Preferences_ tab; +always prefer plugin "global" prefs to tag related attributes!+

* @autohide="2"@ - @0@, @1@ or @2@ - Indicates whether the video controls will automatically hide after a video begins playing. This parameter has been deprecated for HTML5 players, which display or hide the video progress bar and player controls automatically (autohide=1).
* @autoplay="0"@ - @0@ or @1@ - Specifies whether the initial video will automatically start to play when the player loads.
* @user_prefs="1"@ (@cc_load_policy@) - @0@ or @1@ - Setting the parameter's value to 1 causes closed captions to be shown by default, even if the user has turned captions off.
* @cc_load_policy@ - @1@ - Setting the parameter's value to 1 causes closed captions to be shown by default, even if the user has turned captions off.
* @color="red"@ - @red@ or @white@ - Specifies the color that will be used in the player's video progress bar to highlight the amount of the video that the viewer has already seen.
* @controls="1"@ - @0@, @1@ or @2@ - Indicates whether the video player controls are displayed.
* @api="0"@ (@enablejsapi@) - @0@ or @1@ - Enables the player to be controlled via IFrame or JavaScript Player API calls.
* @full_screen="1"@ (@fs@) - @0@ or @1@ - Setting this parameter to 0 prevents the fullscreen button from displaying in the player.
* @annotations="1"@ (@iv_load_policy@) - @1@ or @3@ - Setting the parameter's value to 1 causes video annotations to be shown by default, whereas setting to 3 causes video annotations to not be shown by default.
* @loop="0"@ - @0@ or @1@ - Causes the player to play the initial video again and again.
* @logo="1"@ (alterate @modestbranding@) - @0@ or @1@ -
* @player_id=""@ (@playerapiid@) - @0@ or @1@ - This setting is used in conjunction with the JavaScript API.
* @related="1"@ (@rel@) - @0@ or @1@ - Indicates whether the player should show related videos when playback of the initial video ends.
* @start=""@ - Value: an integer -
* @info="1"@ (@show_info@) - @0@ or @1@ - Causes the player to begin playing the video at the given number of seconds from the start of the video.
* @disablekb="0"@ - @0@ or @1@ - Disables keyboard commands.
* @enablejsapi="0"@ - @0@ or @1@ - Enables the player to be controlled via IFrame or JavaScript Player API calls.
* @end=""@ - an integer - Specifies the time, measured in seconds from the start of the video, when the player should stop playing the video.
* @fs="1"@ - @0@ or @1@ - Setting this parameter to 0 prevents the fullscreen button from displaying in the player.
* @hl=""@ - Sets the player's interface language. The parameter value is an ISO 639-1 two-letter language code or a fully specified locale.
* @iv_load_policy="1"@ - @1@ or @3@ - Setting the parameter's value to 1 causes video annotations to be shown by default, whereas setting to 3 causes video annotations to not be shown by default.
* @loop="0"@ - @0@ or @1@ - Causes the player to play the video again and again.
* @modestbranding="0"@ - @0@ or @1@ - Lets you use a YouTube player that does not show a YouTube logo.
* @origin=""@ - Provides an extra security measure for the IFrame API and is only supported for IFrame embeds.
* @playerapiid=""@ - @0@ or @1@ - This setting is used in conjunction with the JavaScript API.
* @playlist=""@ - a list of video id's to read after the one provided via the @video@ attribute.
* @playsinline=""@ - Controls whether videos play inline or fullscreen in an HTML5 player on iOS.
* @rel="1"@ - @0@ or @1@ - Indicates whether the player should show related videos when playback of the initial video ends.
* @showinfo="1"@ - @0@ or @1@ - Causes the player to begin playing the video at the given number of seconds from the start of the video.
* @start=""@ - an integer - Causes the player to begin playing the video at the given number of seconds from the start of the video.
* @theme="dark"@ - @dark@ or @light@ - Indicates whether the embedded player will display player controls (like a play button or volume control) within a dark or light control bar. This parameter has been deprecated for HTML5 players

More informations on "this Youtube webpage":https://developers.google.com/youtube/player_parameters.

h4. Dailymotion additional player parameters

More informations on "this Youtube webpage":https://developer.dailymotion.com/player#player-parameters
Most of this attributes can be set via the _Preferences_ tab; +always prefer plugin "global" prefs to tag related attributes!+

* @api="0"@ - @postMessage@, @location@ or @1@ - Enables the Player API. In native mobile apps, use @api="location"@, otherwise we recommend using @api=1@.
* @api=""@ - @postMessage@, @location@ or @1@ - Enables the Player API. In native mobile apps, use @api="location"@, otherwise we recommend using @api=1@.
* @autoplay="0"@ - @0@ or @1@ - Starts the playback of the video automatically after the player load. Note: this parameter may not work on some mobile OS.
* @controls="1"@ - @0@ or @1@ - Whether to display the player controls or not.
* @lang=""@ - - Specifies the default selected subtitles language.
* @endscreen_enable="1"@ - @0@ or @1@ - Whether to enable the end screen or not.
* @id=""@ - ID of the player unique to the page to be passed back with all API messages.
* @mute="0"@ - @0@ or @1@ - Whether to mute the video or not.
* @related="1"@ (@endscreen-enable@) - @0@ or @1@ - Whether to enable the end screen or not.
* @player_id=""@ (@id@) - ID of the player unique to the page to be passed back with all API messages.
* @origin=""@ - The domain of the page hosting the Dailymotion player. When using @api="postMessage"@, you might want to specify origin for extra security.
* @quality="auto"@ - @240@, @380@, @480@, @720@, @1080@, @1440@ or @2160@ - Specifies the suggested playback quality for the video.
* @sharing="1"@ - @0@ or @1@ - Whether to display the sharing button or not.
* @sharing_enable="1"@ - @0@ or @1@ - Whether to display the sharing button or not.
* @start=""@ - Specifies the time (in seconds) from which the video should start playing.
* @subtitles_default=""@ - - Specifies the default selected subtitles language.
* @syndication=""@ - Passes your syndication key to the player.
* @theme="dark"@ - @dark@ or @light@ - Choose the default base colour theme.
* @color="ffcc33"@ (@ui-highlight@) - Change the default highlight colour used in the controls (hex value without the leading #).
* @logo="1"@ (@ui-logo@) - @0@ or @1@ - Whether to display the Dailymotion logo or not.
* @info="1"@ (@ui-start-screen-info@) - @0@ or @1@ - Whether to show video information (title and owner) on the start screen.
* @ui_highlight="ffcc33"@ - Change the default highlight colour used in the controls (hex value without the leading #).
* @ui_logo="1"@ (@ui-logo@) - @0@ or @1@ - Whether to display the Dailymotion logo or not.
* @ui_start_screen_info="1"@ (@ui-start-screen-info@) - @0@ or @1@ - Whether to show video information (title and owner) on the start screen.
* @ui_theme="dark"@ - @dark@ or @light@ - Choose the default base colour theme.

More informations on "this Dailymotion webpage":https://developer.dailymotion.com/player#player-parameters.

h2. oui_if_video

Expand Down Expand Up @@ -166,7 +170,7 @@ bc.. <txp:oui_if_video provider="vimeo" video="https://vimeo.com/155020267">

h2(#author). Author

"Nicolas Morand":https://github.com/NicolasGraph, from "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 and "oui_dailymotion":https://github.com/NicolasGraph/oui_dailymotion by "Nicolas Morand":https://github.com/NicolasGraph.
"Nicolas Morand":https://github.com/NicolasGraph, from "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 and oui_dailymotion by "Nicolas Morand":https://github.com/NicolasGraph.

h2(#licence). License

Expand Down
Loading

0 comments on commit 39543f6

Please sign in to comment.