Radiant Media Player

Automated player localization



Documentation sections


Introduction

Radiant Media Player is equipped with various labels acting as helpers to better understand the player UI. Player labels are available in 16 languages. The player will automatically detect which is the preferred language for the viewer and display player labels in that language. Currently supported languages are:

  • Chinese (simplified)
  • Dutch
  • English
  • French
  • German
  • Italian
  • Japanese
  • Korean
  • Polish
  • Portuguese
  • Russian
  • Spanish
  • Taiwanese Mandarin
  • Thai
  • Turkish
  • Vietnamese

Feedback welcome! if you spot an area of improvement for a player label in your native language or if you want to help in adding new languages to our player please contact us.


Player settings

detectViewerLanguage: Boolean

When detectViewerLanguage is set to true the player will automatically detect viewer preferred language and translate player labels in this language (amongst the 8 supported languages). Default: true.

labels: Object

When detectViewerLanguage is set to false you can pass to the player a custom list of labels, to support other languages for example. This is done by passing an Object of labels to the player through the labels setting. Default: {}.


Passing custom labels

Below is a list of all player labels. When passing custom labels to the player through the labels setting, you must fill all required slots for the player to display them. Unfilled slots will be displayed using the English language when passing custom labels.

{
  bitrates: {
    auto: 'Auto',
    renditions: [
      ['Low quality', 'High quality'],
      ['Low quality', 'Medium quality', 'High quality'],
      ['Low quality', 'Medium quality', 'High quality', 'Maximum quality'],
      ['Low quality', 'Medium quality', 'High quality', 'Higher quality', 'Maximum quality']
    ]
  },
  hint: {
    play: 'Play',
    pause: 'Pause',
    seek: 'Seek',
    enterFullscreen: 'Full screen',
    exitFullscreen: 'Exit full screen',
    quickRewind: 'Quick-rewind',
    quickForward: 'Quick-forward',
    sharing: 'Share',
    sharingLink: 'Link to video',
    sharingEmbedCode: 'Share video',
    quality: 'Quality',
    volume: 'Volume',
    mute: 'Mute',
    unmute: 'Unmute',
    minus: 'Minus',
    plus: 'Plus',
    volumeMid: '50%',
    volumeFull: '100%',
    quickUnmute: 'Activate sound',
    speed: 'Speed',
    captions: 'Captions',
    audio: 'Audio languages',
    audioItem: 'Audio',
    chapters: 'Chapters',
    live: 'Live',
    skipToLive: 'Skip to live',
    pip: 'PiP',
    close: 'Close',
    cast: 'Cast',
    airplay: 'AirPlay',
    playlist: 'Playlist',
    next: 'Next',
    previous: 'Previous',
    related: 'Related',
    upNext: 'Up Next',
    threeSixtyVideo: '360°',
    off: 'Off'
  },
  error: {
    customErrorMessage: 'This content is currently unavailable.',
    noSupportMessage: 'This content cannot be played on this device.',
    noSupportDownload: 'You may download video by clicking on that link',
    noSupportInstallChrome: 'Using the latest version of Google Chrome may help to view this content.',
    noSupportInstallChromeLink: 'https://www.google.com/chrome/'
  },
  ads: {
    controlBarCustomMessage: 'Ad',
    skipMessage: 'Skip ad',
    skipWaitingMessage: 'Skip ad in',
    textForClickUIOnMobile: 'Learn more',
    adBlockerDetectedMessage: 'Ad-blocker detected. To view this content please disable your ad-blocker.'
  }
}

When passing custom labels and using the Google IMA SDK to display video ads make sure to set a custom value to adLocale setting.

Player code example for passing custom labels:

<script src="https://cdn.radiantmediatechs.com/rmp/5.5.5/js/rmp.min.js"></script>
<!-- Player container element -->
<div id="rmpPlayer"></div>
<script>
var src = {
  mp4: [
    'https://your-mp4-sd-url.mp4',
    'https://your-mp4-hd-url.mp4'
  ]
};
// Define player labels
var labels = {
  bitrates: {
    auto: 'Auto',
    renditions: [
      ['Basse qualité', 'Haute qualité'],
      ['Basse qualité', 'Qualité moyenne', 'Haute qualité'],
      ['Basse qualité', 'Qualité moyenne', 'Haute qualité', 'Qualité maximale'],
      ['Basse qualité', 'Qualité moyenne', 'Haute qualité', 'Très haute qualité', 'Qualité maximale']
    ]
  },
  hint: {
    play: 'Lire',
    pause: 'Pause',
    enterFullscreen: 'Plein écran',
    exitFullscreen: 'Quitter le mode plein écran',
    quickRewind: 'Retour rapide',
    quickForward: 'Avance rapide',
    sharing: 'Partager',
    quality: 'Qualité',
    volume: 'Volume',
    quickUnmute: 'Activer le son',
    speed: 'Vitesse',
    captions: 'Sous-titres',
    audio: 'Langue audio',
    chapters: 'Chapitres',
    live: 'Direct',
    pip: 'PiP',
    cast: 'Caster',
    airplay: 'AirPlay',
    playlist: 'Playlist',
    related: 'Médias liés',
    upNext: 'A suivre',
    threeSixtyVideo: '360°',
    off: 'Désactivé'
  },
  error: {
    customErrorMessage: 'Ce contenu n\'est pas disponible pour le moment.',
    noSupportMessage: 'Ce contenu ne peut être lu sur cet appareil.',
    noSupportDownload: 'Télécharger le média:',
    noSupportInstallChrome: 'Utiliser la dernière version de Google Chrome peut vous aider à lire ce contenu.',
    noSupportInstallChromeLink: 'https://www.google.com/intl/fr/chrome/'
  },
  ads: {
    controlBarCustomMessage: 'Pub',
    skipMessage: 'Passer la pub',
    skipWaitingMessage: 'Passer la pub dans',
    textForClickUIOnMobile: 'En savoir plus',
    adBlockerDetectedMessage: 'Bloqueur de publicité détecté. Pour accéder à ce contenu, merci de le désactiver.'
  }
};
// Player settings
var settings = {
  src: src,
  licenseKey: 'your-license-key',
  width: 640,
  height: 360,
  speed: true,
  sharing: true,
  // Passing custom labels
  detectViewerLanguage: false,
  labels: labels,
  poster: 'https://your-poster-url.jpg'
};
var elementID = 'rmpPlayer';
var rmp = new RadiantMP(elementID);
rmp.init(settings);
</script>

Hiding player labels

If you do not want player player labels (those are hint.sharing, hint.quality, hint.speed, hint.captions, hint.audio, hint.cast, hint.related) to be shown within the player you can hide them with the hideExternalPlayerLabels player setting set to true. This setting must be Boolean either true or false. false is the default.


Support notes

The bitrates.renditions label only applies for MP4 and WebM progressive download. For HLS or DASH renditions information (height and bitrate) are automatically displayed instead. You can tune the bitrates.auto label for HLS or DASH.

Labels are set using the JavaScript textContent property. Take this into account when using special characters.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.