Muteless

Restyle the player with your own CSS

The player loads one extra stylesheet that you host. It loads after the player’s own styles, so your rules win over them, and it can restyle anything on the bar as long as you keep the credit visible.

Add your stylesheet

  1. Put your stylesheet on a host that serves it over https:.
  2. Encode its address for a URL, so https://example.com/bar.css becomes https%3A%2F%2Fexample.com%2Fbar.css.
  3. Add &css= and the encoded address to your player URL, before the #.
  4. Paste the new URL into the player’s browser source.

The player URL then reads like this:

https://muteless.fm/player/?mix=lofi&css=https%3A%2F%2Fexample.com%2Fbar.css#key=<your-player-key>

Keep the player URL to yourself. The FAQ says what to do if it ends up in chat or on stream.

The player ignores an address that does not start with https:. Your stylesheet’s host sees a request each time a player loads it, from your streaming computer; Muteless sends it nothing else.

What a stylesheet can load

The player’s content security policy takes images only from muteless.fm and from data: URLs, and fonts only from muteless.fm. A url() image or a web font on any other host does not load. A small image written into the stylesheet as a data: URL does.

Keep the credit visible

Change colours, sizes and fonts freely, but keep the title, the artist and the licence readable on stream: the bar is how your stream credits each track while it plays. A stylesheet that hides the bar leaves the link to the credits page as the only credit, so keep that link in your channel panel or video description.

The class names you can rely on

The player marks its root with data-ml-contract="1". Within contract version 1, these class names and custom properties keep their names and meaning; other markup can change in any release. A renamed class keeps its old name alongside the new one for one release, and this page announces the removal.

Class or property What it is
ml-player The page root. It also carries ml-theme-dark, ml-theme-light or ml-theme-minimal, and ml-player--playing or ml-player--paused.
ml-bar The bar.
ml-bar__title, ml-bar__artist The first line: the title and the artist.
ml-bar__licence, ml-bar__site The licence tag and the muteless.fm text.
ml-bar__progress The progress line. Its --ml-progress, from 0 to 1, updates once a second.
ml-bar--changing Present on the bar for the 300 milliseconds a track change takes.
ml-hint, ml-hint__button, ml-hint__link A hint in the bar area, its button and its setup link.
ml-hint__icon The small icon a room hint shrinks to after 15 seconds.
--ml-bg, --ml-fg Custom properties on ml-player: the panel and the text colour.
--ml-accent, --ml-scale Custom properties on ml-player. The player URL sets them on the root: --ml-scale from scale= always, and --ml-accent from accent= when the URL has one. Change them in the URL, or override them with !important. The font size is 20 pixels times --ml-scale, and everything inside sizes from it.

For example, add &scale=1.25 to the player URL to make the whole bar a quarter larger, and this stylesheet makes the title gold:

.ml-bar__title {
  color: #ffd166;
}

Written for OBS 32. Not yet checked in the apps.

Took longer than 5 minutes? Tell us