Player skinning
Skinning is how you customize the look and feel of Flowplayer Native, such as the brand color, logo, controlbar, icons and buttons. For the cloud hosted (OVP managed) player, you can predefine these options in the Flowplayer OVP player configurator, see the section below. Both the cloud player and the standalone JavaScript player can be further enhanced and modified with CSS code. The elements you can style are described in HTML and CSS structure.
Table of contents
Platform player builder
The platform player configurator allows you to create individual cloud-hosted settings which can be selected per video or livestream when creating your platform embed code. For a full tutorial, please see this player configuration guide. The player configurator handles a lot more than just the appearance, it's also responsible for the playback and preload behavior, ad scheduling, the host allowed to use the player configuration and which plugins to load.
In regards to skinning, you can modify the following elements in the configurator interface:
- play icon: select one of three predefined styles for the center play button
- controlbar: thick or slim timeline, show / do not show a drag handle on the scrubber
- brand color: set the timeline and volume bar to your company brand color
- custom logo: show your company logo on the top left player (can be changed to right with CSS) by adding an image url
- button visibility: whether volume, mute and fullscreen buttons should be visible
- metadata visibility: should the player show video title and/or description on the start screen
- player interface language (in the standalone player, this is handled by loading the respective language file), for example in the sharing menu or the ads controls
You can load cloud player configurations (in combination with platform mediaids) in the standalone JavaScript player as well if you use the platform integration plugin
Programmatic skinning
For maximum flexibility, you can modify the player's appearance, including all elements available in the player configurator, with CSS styles.
Brand color
The most simple way to make the player match your brand is to configure the player with your own brand color. This can be accomplished with one simple CSS rule:
.fp-color {
background-color: #02539F;
}
Custom logo
You can show your custom logo on the top/left corner of the player with the logo configuration option. For example
flowplayer('.player', {
src: 'video/acme-promo.{mp4,webm}',
logo: 'assets/acme-logo.png'
})
You can use the logo-on-right and logo-on-bottom (since v3.4.5) CSS configuration class to place it on the right and/or bottom instead. See below for details on the skinning options.
Skinning options
Flowplayer looks can be altered with extra CSS modifier classes added to the root element (container) of the player. You can check out the effects by adding the classes to a container in our try sandbox
Modifier CSS classes
logo-on-right — displays the configured logo on top/right corner instead of the default top/left
logo-on-bottom — displays the configured logo at the bottom of the player instead of the default top/left v3.4.5+
use-drag-handle — displays a round "drag handle" on the right edge of the progress bar.
use-muted-autoplay — uses a design that is optimized for muted autoplay similar to what you can see on Facebook
use-play-1 — uses the standard play (solid triangle) and (solid) pause icon in the center of the player
use-play-2 — uses an alternate play (outlined triangle) and (outlined) pause icon in the center of the player
use-play-3 — uses an alternate play (small solid triangle in circle) icon in the center of the player
use-thin-controlbar — uses a thinner controlbar that gets taller when the mouse is hovering the player
CSS modifier sample code
<div id="player-00dc2cd3-3813-4869-8ab8-00ece266b958" class="use-drag-handle use-thin-controlbar use-play-2 logo-on-right flowplayer"></div>
<script type="module">
import flowplayer from "https://embed.flowplayer.com/c5ad8e31-7bbe-441a-8c29-eaeca03ac6e1/00dc2cd3-3813-4869-8ab8-00ece266b958.js";
flowplayer("#player-00dc2cd3-3813-4869-8ab8-00ece266b958", {
logo: "https://flowplayer.com/images/acme-logo.png"
});
</script>
CSS variables
Since version 3.0, the player skin uses CSS variables to define overridable properties.
You can control for instance the brand color with the --fp-brand-color variable.
Another example is the player's icons. All the icons are stored in global variables and used as background images. You can use your own simply by overriding the aforementioned variables.
<style>
:root{
--fp-play-icon: url("your svg as Data URL");
}
</style>
Here's a list of all the icon variables
--fp-play-icon— the standard play (solid triangle)--fp-play-circle-icon— an alternate play (small solid triangle in circle)--fp-play-stroke-icon— an alternate play (outlined triangle)--fp-pause-icon— solid pause icon--fp-pause-stroke-icon— outlined pause icon--fp-volume-icon— volume icon--fp-fs-icon— fullscreen icon--fp-fs-exit-icon— exit fullscreen icon--fp-unmute-icon— unmute icon--fp-mute-icon— mute icon--fp-close-icon— X close icon
Player states
The player can be in various states during playback, and for each state there is a specific CSS class name. For example:
/* make player semi-transparent before it's fully loaded */
.is-loading {
opacity: .3
}
State classes let you change the player looks dynamically during the lifetime of a player. Here's a list of the most commonly used state classes. They are set on the player root element.
ad-paused — when an ad is paused
ad-playing — when an ad is being played
has-poster — when the player shows a poster image
is-destroyed — after the player has been destroyed
is-disabled — when the player is disabled
is-ended — when the playback is ended
is-error — when a playback error is shown
is-fullscreen — when player is on fullscreen mode
is-hovered — when the mouse is hovering the player
is-in-viewport — when at least 20% of the player is visible in the viewport
is-live — when the live option is set
is-loaded — after the first media data has been loaded
is-loading — while the video is being loaded initially
is-muted — when player is muted
is-paused — when player is paused
is-playing — when player is playing
is-seekable — when the seekable option is set
is-seeking — when player is seeking
is-small — when player is less than 600px wide
is-starting — when playback has not yet started
is-tiny — when player is less than 400px wide
is-touch-device — when the player runs on a touch device
is-waiting — when the player is waiting for data (buffering)
no-controls — when the controls option is set to false
no-timeline — when a live stream has no DVR timeline
Adding custom CSS
You can also create custom CSS to override or enhance the existing skin. For example, to add a background to the controlbar (advisable if your video does not contrast with the controls), create a custom <style> and add the created CSS class to the root element:
<style>
.use-controlbar-background .fp-controls { background-color: rgba(0,0,0,.6) }
</style>
<div id="player-00dc2cd3-3813-4869-8ab8-00ece266b958" class="use-controlbar-background flowplayer"></div>
<script type="module">
import flowplayer from "https://embed.flowplayer.com/c5ad8e31-7bbe-441a-8c29-eaeca03ac6e1/00dc2cd3-3813-4869-8ab8-00ece266b958.js";
flowplayer("#player-00dc2cd3-3813-4869-8ab8-00ece266b958", {
logo: "https://flowplayer.com/images/acme-logo.png"
});
</script>
Create your own skin
A skin is a stylesheet that changes the look of the player as a whole: colors, typography, shapes and spacing. You don't need to replace the default stylesheet for this. Build your skin on top of it and change only what you need. The default stylesheet keeps handling layout, states and plugins, and your skin keeps working when the player is updated.
Before you start, read HTML and CSS structure. It shows the elements the player renders and how the default stylesheet lays them out.
Design principles
Scope the skin with a class. Put all rules under a class of your own, for example .acme-skin, and add that class to the player container. Players without the class keep the default look, and you can run several skins on one page.
Use variables before rules. Change the brand color with --fp-brand-color and the icons with the icon variables. Write CSS rules only for what the variables cannot do.
Style states, not events. Don't toggle classes with JavaScript to react to playback. The player already sets state classes such as is-playing, is-paused or is-fullscreen on the root element. Combine them with element classes, for example .acme-skin.is-paused .fp-controls.
Size in em. All player sizes are relative to the root font size, which the player reduces for small (is-small) and tiny (is-tiny) players. Use em or the --spacing variable in your skin so it scales the same way. Check your skin at small sizes, for example in a narrow column or on a phone.
Keep the default behavior. Leave the .fp-togglable auto-hide and the play/pause switch intact. Never change width or height of the big play and pause buttons, because the player hides them by setting both to 0. Use transform: scale() to resize them.
Keep the player accessible. Make sure the icons and the time display stay readable on bright video. Keep the visible focus on buttons and sliders, and keep click and touch targets at least as large as in the default skin.
Change structure with components, not CSS. CSS is enough to restyle, hide or reorder elements within their bar. To add or replace controls, use custom web components.
Example: a custom skin
The following skin gives the player a rounded frame, a dark controlbar with a thin, rounded timeline, a round play button in the brand color, and a visible keyboard focus. It also hides the volume bar on small players, where the mute button is enough.
/* acme-skin.css – load after the Flowplayer stylesheet */
.flowplayer.acme-skin {
--fp-brand-color: #e4572e;
font-family: "Inter", system-ui, sans-serif;
border-radius: 0.75em;
}
/* controlbar: dark background for better contrast on bright video */
.acme-skin .fp-controls {
background-color: rgba(20, 20, 20, 0.8);
}
/* thin, rounded timeline */
.acme-skin .fp-timeline {
height: calc(var(--spacing) / 2);
border-radius: 1em;
}
.acme-skin .fp-timeline .fp-buffer,
.acme-skin .fp-timeline .fp-hover,
.acme-skin .fp-timeline .fp-progress {
border-radius: 1em;
}
/* fixed-width digits, so the time display doesn't jump */
.acme-skin .fp-elapsed,
.acme-skin .fp-duration {
font-variant-numeric: tabular-nums;
}
/* round play and pause buttons in the brand color;
only colors and icon size change, never width or height */
.acme-skin .fp-middle .fp-play,
.acme-skin .fp-middle .fp-pause {
background-color: var(--fp-brand-color);
background-position: center;
background-size: 55%;
border-radius: 50%;
}
/* visible keyboard focus */
.acme-skin [role="button"]:focus-visible,
.acme-skin [role="slider"]:focus-visible {
outline: 2px solid var(--fp-brand-color);
outline-offset: 2px;
}
/* small players: mute button only, no volume bar */
.acme-skin.is-small .fp-volume {
display: none;
}
To use the skin, load its stylesheet after the Flowplayer stylesheet and add the class to the player container:
<link rel="stylesheet" href="https://cdn.flowplayer.com/releases/native/3/stable/style/flowplayer.css">
<link rel="stylesheet" href="acme-skin.css">
<script src="https://cdn.flowplayer.com/releases/native/3/stable/flowplayer.min.js"></script>
<div id="player" class="acme-skin use-thin-controlbar"></div>
<script>
flowplayer("#player", {
src: "https://edge.flowplayer.org/bauhaus.mp4",
title: "Bauhaus",
token: "eyJraWQiOiI3cW5idHhsWkhMcWUiLCJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJjIjoie1wiYWNsXCI6NixcImlkXCI6XCI3cW5idHhsWkhMcWVcIixcImRvbWFpblwiOltcImZsb3dwbGF5ZXIuY29tXCJdfSIsImlzcyI6IkZsb3dwbGF5ZXIifQ.7hqE246u2u_UbEXuEwcgM4LOqQOJkJT3bQaqcR023mazRZHKuAbYaxrIlPTXZIvl8iDu2wMkz5LSp3fE55xQgQ"
})
</script>
The skin works together with modifier classes, as use-thin-controlbar shows in the example. For the OVP managed player, add the class to the container element of your embed code in the same way.