Custom Player Templates
With our templating framework you can create your own custom player designs. This feature is available with player version v5.1 and above.
A player template is comprised of a HTML and CSS definition of the player elements. To use a player template, you can provide links to these files hosted on your sever using the parameters htmlFile
and cssFile
. If you choose to host the files yourself, please check your CORS
settings.
Alternatively you can post the markup inline using the config parameters html
and css
.
Hint: If you use inline Markup, we recommend using string literals (`
) instead of quotes ( "
, '
), to avoid issues with line breaks.
Finally, it is also possible to upload the files directly to a player using our GUI.
Template Options
The following additional options are available when configuring a playlist
htmlFile
string
URl of the template. Be aware of CORS
html
string
inline Markup
cssFile
string
URL of the CSS
css
string
inline CSS
audioPoster
boolean
For hiding the cover in the audio template
true
audioDescription
boolean
For hiding the description in the audio template
true
Syntax
You can add a class
attribute to each container to define the CSS. The data-role
attribute is used by our engine to map the button role. You can find a complete list of all buttons below.
Base Template (Video)
Roles and Classes
sdn-player
.js3q-player
✅
sdn-audio-player
.js3q-player.js3q-audio-player
(as alternative to sdn-player)
sdn-display
.sdn-display
✅
sdn-stats
.sdn-stats
motion-poster
.sdn-motion-poster
display-ad
.sdn-display-ad
✅
adskip-button
.sdn-display-adskipbutton
title
.sdn-title
✅
sdn-wall
.sdn-wall
sdn-unmute-button
.sdn-display-ad
context
.sdn-context-menu
channel-label
.sdn-channel-label
✅
source-container
.sdn-source-element
play-button-overlay
.sdn-play-overlay
play-button-overlay-span
.sdnicbsun-play.none-shadow
play-minus15-overlay
.sdn-minus15-overlay
play-minus15-overlay-button
.ssdnicbsun-minus15.none-shadow
play-plus15-overlay
.sdn-plus15-overlay
play-plus15-overlay-button
.ssdnicbsub-plus15.none-shadow
play-buffer-overlay
.sdn-buffering
play-buffer-overlay-spinner
.sdn-spinner
player-controls
.sdn-player-controls
seek-bar
.sdn-time-seekbar
scrubberbar
.sdn-time-scrubber
scrubber-loaded
.sdn-time-loaded
scrubber-loaded-pointer
.sdn-time-loaded-pointer
scrubberdragger
.sdn-time-playahead
scrubber-playahead
.scrubbBarDragger
chrome
.sdn-player-chrome
pause-button
.sdn-button.sdn-play-button.sdnicbsun-play
play-button
.sdn-button.sdn-play-button.sdnicbsun-pause
back-button
.sdn-button.sdn-play-button.sdnicbsun-back
play-minus10-button
.sdn-button.sdn-play-button.sdnicbsun-minus10
play-plus10-button
.sdn-button.sdn-play-button.sdnicbsun-plus10
play-plus15-button
.sdn-button.sdn-play-button.sdnicbsun-plus15
play-minus15-button
.sdn-button.sdn-play-button.sdnicbsun-minus15
volume-button
.sdn-button.sdnicbsun-volume3wave
volume-display-wrapper
.sdn-volume-wrapper
volume-display
.sdn-volume-slider
volume-controls-marker
.sdn-volume-marker
volume-controls-thumb
.sdn-volume-thumb
timeleft-display
.sdn-button.sdn-time-left
timeleft-span
enter-button
.sdn-button-right.sdnicbsun-fullscreen
exit-button
.sdn-button-right.sdnicbsun-exitfullscreen
qos-button
.sdn-button-right.sdn-audioonly-hidden.sdnicbsun-cog
cast-button
.sdn-button-right.sdnicbsun-cast
airplay-button
.sdn-button-right.sdnicbsun-airplay
thumbnails
.sdn-thumbnails
gradient
.sdn-player-gradiant
gradient-top
.sdn-player-gradiant-top
qos-menu
.sdn-qos-menu
qos-menu-header-close-button
.sdn-button-right.sdnicbsun-close.sdn-hidden
qos-menu-wrapper
.sdn-qos-menu-wrapper
qs-playbackrate-settings
.sdn-quality-settings
qs-playbackrate-menu
.sdn-ul-menu
qs-quality-settings
.sdn-quality-settings
qs-audio-settings
.sdn-audio-settings
qs-cc-settings
.sdn-audio-settings
qs-audio-menu
.sdn-ul-menu
top-chrome
.sdn-top-chrome
share-menu
.sdn-share-menu
sidebar-button
.sdn-button-right.sdnicbsun-info.sdn-hide
playlist
.sdn-playlist
infobar
.sdn-infobar.sdn-hide
sidebar
.sdn-sidebar
watermark
.sdn-watermark
watermark-picture
.sdn-watermark-picture
Labels/Language Strings
For language strings in the template, you can use the same fields as described here. To embed them, place the field name between curly brackets. (e.g. {{tips.play}}
)
Not only you can use the built-in language strings, you can also define your very own ones:
Components
Several components are separated for easier maintenance. You can override each component as described above, or you can create your own components.
To embed a component, place it between square brackets. (e.g. [[context]]
)
[[context]]
The right-click menu
Markup
The cog menu for quality- and language-settings.
Markup
[[seekbar]]
The seekbar which indicates the progress of the content
Markup
[[videoControls]]
The control bar for video content
Markup
[[audioControls]]
The control bar for audio content
Markup
Minimal Example Audio Player
Last updated