oui_soundcloud is a oui_player v2+ extension to easily embed Soundcloud provided player 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.2
is 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_soundcloud
While the <txp:oui_player />
tag is able to embed any player from any extension-related provider, the <txp:oui_soundcloud />
tag is a shortcut to embed Soundcloud player only. It is strictly equivalent to <txp:oui_player provider="soundcloud" />
.
Check the oui_player documentation for more informations.
- http(s)://(api.)soundcloud.com/….
When using the oui_player
tag (vs oui_soundcloud
), 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.
width
Integer; initially set to
100%
.
The width of the player in pixels (OK, pourcentage works also…).
Default: related plugin prefheight
Integer; initially set to
166
(alt height is450
, usually whenvisual="true"
).
The height of the player in pixelsratio
Integer
:
integer; initially not set.
The ratio used to calculate the missing value for the width or the height.responsive
true
orfalse
; 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.
Some prefs/attributes can conditionate the behavior of others (e.g. visual="true"
desactivates color
).
From Txp 4.7, paramaters accepting true
and false
as valid values can be enable through boolean/valueless attributes.
auto_play
true
orfalse
; initially set tofalse
.
Whether to play after loading or not.buying
true
orfalse
; initially set totrue
.
Whether to display the Buy button or not.color
Hexadecimal color value; initially set to
#ff8800
.
Changes the colour of the user interface elements.download
true
orfalse
; initially set totrue
.
Whether to display the Download button or not.hide_related
true
orfalse
; initially set tofalse
.
Whether to display related tracks or not.sharing
true
orfalse
; initially set totrue
.
Whether to enable the sharing features or not.show_artwork
true
orfalse
; initially set totrue
;
Whether to display the artwork or not.show_comments
true
orfalse
; initially set totrue
.
Whether to display comments or not.show_reposts
true
orfalse
; initially set totrue
.
Whether to display reposts or not.show_playcount
true
orfalse
; initially set totrue
.
Whether to display the playcount or not.show_user
true
orfalse
; initially set totrue
.
Whether to display the uploader or not.single_active
true
orfalse
; initially set totrue
.
Whether to stop playing while another player is on or not.start_track
Integer; initially set to
0
;
Specifies the time (in seconds) when the track should start playing.theme_color
Hexadecimal color value; initially set to
#ff3300
.
Changes the color of the player theme.visual
true
orfalse
; initially set tofalse
.
Whether to display the artwork as a background or not.
- Album:
- big:
height="450"
;visual="true"
.
- medium:
height="300"
.
- big:
- track :
- big:
height="300"
;visual="true"
.
- medium:
- initial values.
- big:
While the <txp:oui_if_player>…</txp:oui_if_player>
tag is able to check an URL against any URL from any extension-related provider, the <txp:oui_if_soundcloud>…</txp:oui_if_soundcloud>
tag is a shortcut to check an URL against Soundcloud related URL schemes only. It is strictly equivalent to <txp:oui_if_player provider="soundcloud">…</txp:oui_if_player>
.
Check the oui_player documentation for more informations.
<txp:oui_player />
oui_player preference related field value: https://soundcloud.com/uiceheidd/lucid-dreams-forget-me
.
<txp:oui_if_player provider="soundcloud" play="https://soundcloud.com/uiceheidd/lucid-dreams-forget-me">
<txp:oui_player height="300" />
</txp:oui_if_player>
…or:
<txp:oui_if_soundcloud play="https://soundcloud.com/uiceheidd/lucid-dreams-forget-me">
<txp:oui_soundcloud height="300" />
</txp:oui_if_soundcloud>
Nicolas Morand
Thank you to the Textpattern community and the core team.
This plugin is distributed under GPL v2.0.
oui_soundcloud version 1.0.0-BETA3, Copyright © 2018 Nicolas Morand
This Textpattern plugin comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions.
- oui_soundcloud v1.0.0-BETA3 (2018-08-15)
- oui_player v1.3.0 (2017-05-24)