How to add external subtitles to the Bitmovin Player


If subtitle tracks are provided with in the manifest of your content, the player automatically recognizes them and shows them in its subtitle selection menu.
You also add external subtitle tracks to the player using its Subtitle API. It allows to control all subtitle tracks available to the player


<!DOCTYPE html>
<html lang="en">

    <title>Bitmovin Demo</title>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href=",400" rel="stylesheet">
    <link rel="icon" type="image/png" href="images/bit-fav.png">
    <!-- Bitmovin Player -->
    <script src="//"></script>

    <div id="wrapper">
        <div id="banner">
            <div class="logo"><img src="images/bitmovin-logo.png"></div>
            <div class="title">
                <h1>Bitmovin HTML5 Player</h1>
            <div class="clear"></div>
        <div class="container">
            <h1>HTML5 Adaptive Streaming Player for MPEG-DASH & HLS</h1>
            <h2>Your videos play everywhere with low startup delay, no buffering and in highest quality.</h2>
            <div class="content">
                <div class="player-wrapper">
                    <div id="player"></div>
                <div class="description">
                    <p>For more information about the bitmovin player, please have a look at our online <a href="//" target="_blank">Developer Section</a>.</p>
    <script type="text/javascript">
        var player;

        var conf = {
            key: 'YOUR KEY HERE'
        var source = {
            dash: '',
            hls: '',
            progressive: '',
            poster: ''

        player = new bitmovin.player.Player(document.getElementById('player'), conf);

        player.load(source).then(function() {
            console.log('Successfully loaded source'); // Success!
            var enSubtitle = {
                id: "sub1",
                lang: "en",
                label: "English",
                url: "",
                kind: "subtitle"


        }, function() {
            console.log('Error while loading source'); // Error!


Player events

Further the player fires an event, if subtitles are added or removed, or if a different subtitle track is being used by the player: