=== Glissando – Animated Audio Player ===
Contributors: tomsgl, freemius
Tags: audio player, music player, mp3, visualizer, audio
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Glass-style audio player with animated visualizer. Gutenberg block, Elementor widget and shortcode.

== Description ==

Glissando is a glass-style audio player with an animated visualizer that follows the track. Add players anywhere with the Gutenberg block, the Elementor widget or the `[glissando]` shortcode.

**Features**

* Artwork and Compact player presets
* Dark and light themes, six color palettes, your own gradients
* Visualizer bars: count from 32 to 160, animation speed, frequency range, low cut
* Card styling: glass tint, button hover color, corner radius, shadow, background opacity
* Album artwork: square or 16:9, zoom and vertical position
* Download button: icon, text or both, a second file (e.g. instrumental), download counter
* Tracks from the media library or any URL, title and artist filled in automatically
* Fits any column, from full width down to a 300px sidebar
* Site-wide defaults in Settings - Glissando, any player can override them
* Keyboard-operable, respects the "reduce motion" setting
* Themes cannot break it: the player renders in a Shadow DOM

A separately sold Pro version adds further player layouts (Standard, Minimal, Radial), playlists, the LED and Dots bar styles and a share button.

== Installation ==

1. Upload the plugin ZIP via Plugins > Add New > Upload, or unzip into `wp-content/plugins/`.
2. Activate the plugin.
3. Add the Glissando Player block (or Elementor widget), or use `[glissando id="123"]` / `[glissando src="https://example.com/track.mp3"]`.

== Source code ==

None of this plugin's own code is minified, compiled or obfuscated. Every PHP, JavaScript and CSS file I wrote is the original human-readable source, and it uses no third-party JavaScript libraries.

There is one generated value: the `GLISSANDO_CSS` string near the top of `assets/glissando.js`. The player renders inside a Shadow DOM so that themes cannot break it, and a Shadow DOM cannot see enqueued stylesheets, so the stylesheet has to be injected as a string.

The readable source for that string is bundled with the plugin, uncompressed, at `assets/glissando.css`. `GLISSANDO_CSS` is that same stylesheet encoded as a JavaScript string literal - the rules, selectors, comments and formatting are identical, so the two can be read side by side.

The build step is bundled too, as `bake-css.js` in the plugin folder. It needs Node.js and nothing else: no npm install, no dependencies, no bundler. After editing `assets/glissando.css`, run this from the plugin folder to regenerate the string: `node bake-css.js`

== External services ==

This plugin uses Freemius to handle licensing, plugin updates and optional
usage diagnostics.

No data is sent unless you opt in. Freemius is contacted when you accept its
opt-in prompt on activation, or if you later connect a Pro licence or start a
trial. When that happens it sends your site URL, the WordPress and PHP
versions, this plugin's version, and the email address of the account you
connect with. Declining the prompt leaves the plugin fully functional.

Service provider: Freemius, Inc. - https://freemius.com
Terms of Service: https://freemius.com/terms/
Privacy Policy: https://freemius.com/privacy/

== Frequently Asked Questions ==

= Does it work with any theme? =

Yes. The player renders in a Shadow DOM, so theme styles cannot break it.

= Do I have to set every option on every player? =

No. Settings - Glissando holds the defaults for the whole site; a player only
carries the settings you change on it.

= Is there a limit on track length? =

Yes: 60 minutes per track. A longer track is not added to the player. When you
are logged in you see a note in its place saying so; visitors see nothing
there. In a playlist the longer tracks are left out and the rest play.

The reason is the visualizer. It needs a spectrum of the whole track, which
your browser builds from the decoded audio, and beyond an hour that is too
much to ask of a browser. Split a longer mix into parts of up to 60 minutes.

= How does the visualizer get its data? =

The first time you, logged in, add a track or open a page that has one, your
browser analyses the track in the background and saves the result to
`wp-content/uploads/glissando/`. You do not have to press play or do anything
else. Visitors then load that saved data, one minute at a time, as they listen.

The saved data takes 190 KB to 1.5 MB per minute of audio. Players with more
bars, or wider players, get more detail and so larger files; this is chosen
automatically.

If a visitor reaches a track before you have opened its page, their browser
analyses it by itself when the track is 7 minutes or shorter. For longer
tracks they see static bars until your first logged-in visit to that page.

An audio file on another site only gets moving bars if that site allows other
sites to read it (CORS). It always plays either way.

= Does it fit in a narrow sidebar column? =

Yes. The player measures the column it is in, not the browser window, so it
lays out the same in a 300px sidebar on a desktop as it does on a phone.

= Can visitors download the track? =

If you turn the download button on. You can label it, show it as an icon, text
or both, offer a second file alongside it, and show how many times each track
has been downloaded.

== Screenshots ==

1. Artwork preset, dark theme, mid-playback - the same player at four column widths.
2. Compact preset - from full width down to a narrow sidebar, controls collapsing as the column shrinks.
3. Dark and light theme, same track.
4. Adjustable bar count and per-player colours.
5. Elementor widget controls - the same settings exist in the block sidebar and the shortcode.
6. What the separately sold Pro version adds - not included in this free plugin.

== Changelog ==

= 2.0.0 =
* New audio engine: smoother playback and seeking, especially on Safari and iPhone.
* Visualizer stays in sync with the track and uses less CPU.
* Visualizer data is prepared automatically, no setup needed.
* Bars keep their height at any volume.
* Tracks can be up to 60 minutes long.

= 1.2.9 =
* Performance: the visualizer now animates only while its player is playing and on screen. Paused and idle players no longer redraw in the background.
* Performance: displays faster than 60 Hz draw the visualizer on every second refresh.
* All players on a page now share one audio engine instead of opening one each.

= 1.2.8 =
* The plugin icon now shows on the Plugins and Dashboard - Updates screens instead of a placeholder.

= 1.2.7 =
* The actions button no longer appears when both downloads and share are off - it used to open an empty bubble.

= 1.2.6 =
* Narrow columns: the volume slider now hides by column width, not viewport width, so the actions button stops wrapping to a second line in a narrow Elementor column.
* Radial preset: download/share collapse behind the actions button like every other preset, so nothing spills outside the card at small sizes.
* Radial preset: artwork vertical position slider now applies (and shows up in the Elementor widget).

= 1.2.5 =
* First release on WordPress.org.
