HLS Plugin

Video Cloud
Brightcove Player
Player Developer

The HLS plugin is a Brightcove player plugin that relies on W3C's Media Source Extensions (MSE) to play HTTP Live Streaming (HLS) video on platforms that do not natively support it. The HLS plugin is automatically included in the player.

HLS plugin basics

The following points help you understand and use the HLS plugin:

  • As mentioned in the opening sentence of this document, the plugin relies on W3C's Media Source Extensions (MSE). MSE is a W3C specification that allows JavaScript to send byte streams to media codecs within web browsers that support HTML5 video. Among other possible uses, this allows the implementation of client-side prefetching and buffering code for streaming media entirely in JavaScript.
  • With the plugin you can then use HLS (m3u8) video content in the player. For instance you could create a player using this configuration for the media section:
        "sources": [{
            "src": "http://example.com/video.m3u8",
            "type": "application/x-mpegURL"
  • Cross-origin resource sharing (CORS) can be an issue when using HLS. For more information about using CORS, see the CORS guide.
  • Flash will be used as a fallback to play HLS only on IE11 on Windows 7.
  • HLS is not supported on versions of IE earlier than IE11.


HTTP Live Streaming (HLS) has become a de-facto standard for streaming video on mobile devices thanks to its native support on iOS and Android. Although, there are a number of reasons independent of platform to recommend the format:

  • Supports (client-driven) adaptive bitrate selection
  • Delivered over standard HTTP ports
  • Simple, text-based manifest format
  • No proprietary streaming servers required

Unfortunately, all the major desktop browsers except for Safari are missing HLS support. That leaves web developers in the unfortunate position of having to maintain alternate renditions of the same video and potentially having to forego HTML-based video entirely to provide the best desktop viewing experience.

This plugin addresses the situation by providing a polyfill for HLS on browsers that have Media Source Extensions or Flash support. You can deploy a single HLS stream, code against the regular HTML5 video APIs, and create a fast, high-quality video experience across all the big web device categories.

Currently, at this time there is no support for:

  • Alternate audio and video tracks
  • Segment codecs other than H.264 with AAC audio
  • Internet Explorer < 11


There are several options you can use to configure the HLS plugin.


Type: boolean

Can be used as:

  • a source option
  • an initialization option

When the withCredentials property is set to true, all XHR requests for manifests and segments would have withCredentials set to true as well. This enables storing and passing cookies from the server that the manifests and segments live on. This has some implications on CORS because when set, the Access-Control-Allow-Origin header cannot be set to *, also, the response headers require the addition of Access-Control-Allow-Credentials header which is set to true. See the HTML5Rocks's article for more info.

You can configure the plugin using the Player Management API using an HTTP PATCH method, as shown here:

curl \
    --header "Content-Type: application/json" \
    --user YOUR_EMAIL \
    --request PATCH \
    --data '{ "hls": { "withCredentials": true } }' \

You can also set the withCredentials option on a per source basis, rather than on a player basis as just shown. For instance, when setting the source you can include withCredentials, as shown here:

curl \
  --header "Content-Type: application/json" \
  --user $EMAIL \
  --request POST \
  --data '{
      "name": "MySamplePlayer",
      "configuration": {
        "media": {
          "sources": [{
            "withCredentials": true
    }' \

Runtime configuration

You can configure withCredentials at runtime. You will see below two implementations:

  • Using player.hls.xhr.beforeRequest
  • Using player.src()

In the following code you are using the player.hls.xhr.beforeRequest to assign a function that will be called with an object containing options that will be used to create the xhr request. In this example you see only withCredentials is being configured.

if (videojs.Hls) {
  videojs.Hls.xhr.beforeRequest = function (options) {
    options.withCredentials = true;

You can also set the withCredentials options when setting the video source. You use the player.src() method, as shown here:

  src: 'https://adomain.com/bipbop_16x9_variant.m3u8',
  type: 'application/x-mpegURL',
  withCredentials: true


Type: boolean

Can be used as:

  • an initialization option

When enableLowInitialPlaylist is set to true, it will be used to select the lowest bitrate playlist initially. This helps to decrease playback start time. This setting is false by default.

You can configure the plugin using the Player Management API using an HTTP PATCH method, as shown here:

curl \
    --header "Content-Type: application/json" \
    --user YOUR_EMAIL \
    --request PATCH \
    --data '{ "hls": { "enableLowInitialPlaylist": true } }' \

Runtime properties

In general, you can access the HLS object this way:

  • Brightcove Player v5: player.hls
  • Brightcove Player v6: player.tech().hls


Type: object

An object representing the parsed master playlist. If a media playlist is loaded directly, a master playlist with only one entry will be created.


Type: function

A function that can be used to retrieve or modify the currently active media playlist. The active media playlist is referred to when additional video data needs to be downloaded. Calling this function with no arguments returns the parsed playlist object for the active media playlist. Calling this function with a playlist object from the master playlist or a URI string as specified in the master playlist will kick off an asynchronous load of the specified media playlist. Once it has been retrieved, it will become the active media playlist.


Type: number

The number of bits downloaded per second in the last segment download. This value is used by the default implementation of selectPlaylist to select an appropriate bitrate to play. Before the first video segment has been downloaded, it's hard to estimate bandwidth accurately. The HLS tech uses a heuristic based on the playlist download times to do this estimation by default. If you have a more accurate source of bandwidth information, you can override this value as soon as the HLS tech has loaded to provide an initial bandwidth estimate.


Type: number

The total number of content bytes downloaded by the HLS tech.


Type: function

A function that returns the media playlist object to use to download the next segment. It is invoked by the plugin immediately before a new segment is downloaded. You can override this function to provide your adaptive streaming logic. You must, however, be sure to return a valid media playlist object that is present in player.hls.playlists.master.



Fired after the first media playlist is downloaded for a stream.


Fired immediately after a new master or media playlist has been downloaded. By default, the plugin only downloads playlists as they are needed.


Fired when a new playlist becomes the active media playlist. Note that the actual rendering quality change does not occur simultaneously with this event; a new segment must be requested and the existing buffer depleted first.

Reload source on error

When using the HLS plugin there is a method you can call that will reload the source at its current time when an error is emitted by the player. To turn on this feature you need to call the reloadSourceOnError() method. The following short video shows the method in action. All the code shown in the video is described later in this section.

The syntax for the reloadSourceOnError() method is as follows:


The optional optionsObject has the following properties:

Property Data Type Default Value Description
errorInterval Number 30 The minimum amount of time (in seconds) that has to pass between two errors for the reload to trigger. For example, if you set the time to 10, each time an error occurs the function will check to see if a reload has happened less than 10 seconds ago. If less than the time interval has passed, it will NOT reload the source. (This is to ensure that content with an error doesn't reload constantly.) If more time than the interval specified has passed, the video is reloaded at the point when the error occurred.
getSource() Function Retrieves current source A function that is called to get a source object to load or reload. By default it gets the current source of the player.

The following details the code used in the video demonstration above:

  • Lines 1-9: Standard in-page embed code with a player id added.
  • Line 11: Button to manually create errors.
  • Lines 22-24: Function called on button click to dispatch an error.
  • Line 19: Create an object in which to place configuration options.
  • Line 20: In the configuration object, create an errorInterval property and assign it a value.
  • Line 21: Call the reloadSourceOnError() method, passing the configuration object as an argument.
<video-js id="myPlayerID"

<p><button onclick="createError()">createError</button></p>

<script src="https://players.brightcove.net/1507807800001/HJLp3Hvmg_default/index.min.js"></script>

<script type="text/javascript">
  var createError;
  videojs.getPlayer('myPlayerID').ready(function() {
    var myPlayer = this,
      reloadOptions = {};
    reloadOptions.errorInterval = 10;
    createError = function(){

In-Manifest WebVTT

The HLS plugin supports in-manifest WebVTT. There is nothing you need to do to enable this feature as it is standard in the plugin. Videos need to be ingested with in-manifest WebVTT considered. For instance, the Brightcove Dynamic Ingest API can ingest videos and configure captions as in-manifest. See the Overview: Dynamic Ingest API for Dynamic Delivery document for more details.

The player below is playing a video with in-manifest WebVTT captions. You can select the captions via the captions icon, as shown here:

display captions icon

After you start the video you will be able to choose the captions you wish to see.

Simply to see, as this is something you would not build yourself, here is the manifest for the video shown in the player above:

#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Woofer (Forced)",DEFAULT=NO,AUTOSELECT=NO,FORCED=YES,LANGUAGE="en",URI="subtitles/en_forced/index.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Spanish (Forced)",DEFAULT=NO,AUTOSELECT=NO,FORCED=YES,LANGUAGE="es",URI="subtitles/es_forced/index.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=865000,CODECS="mp4a.40.2, avc1.42001e",RESOLUTION=640x360,SUBTITLES="subs"
#EXT-X-STREAM-INF:BANDWIDTH=12140000,CODECS="mp4a.40.2, avc1.42001e",RESOLUTION=1280x720,SUBTITLES="subs"

In it you can see references to the captions file.

Adaptive switching

MP4 Rendition Selection

Generally, if viewing a video on a mobile device and playing an MP4, the player will choose the MP4 that has a bitrate closest to .5 MB/s. If on a desktop or laptop device it will choose one that is closest to 3 MB/s.

HLS Rendition Selection

During playback, the player will switch to a higher or lower rendition based on an algorithm. Inputs to this algorithm are:

  • Available bandwidth
  • Player dimensions

For a complete discussion of rendition selection, please see the Determining Which Rendition Will Play document.

In-band metadata

Brightcove Player will recognize certain types of ID3 tag information embedded in an HLS video stream. The ID3 standard was originally used to provide metadata about MP3 audio tracks. (The acronym is from IDentify MP3.) When a stream is encountered with embedded metadata, an in-band metadata text track will automatically be created and populated with cues as they are encountered in the stream. A common use case is the ID3 data would direct when advertisements should be shown in a live stream.

The ID3 standard defines many frame types, but only the following two UTF-8 encoded frames will be mapped to cue points and their values set as cue text:

  • WXXX - User defined URL link frame
  • TXXX - User defined text information frame

Cues are created for all other frame types and the data is attached to the generated cue:


For more information about text tracks in general see Getting Started With the Track Element. For information on Brightcove Player and cue points see Using Cue Points.


The information in this section is supplied for you to gather information that can then be passed to Brightcove Support to help resolve any HLS issues. That being said, some of the data reported could be of interest to you.

Two methods and one property will be detailed that assist in HLS debugging.

Method: videojs.log.level()

The videojs.log.level() method gets or sets the current logging level. To turn on debugging you use:


Method: videojs.log.history()

The history() method returns an array containing everything that has been logged to the history.

Any message that gets logged through the videojs.log API will be appended to the history array. What information is placed into that array is dependent on what plugins are in use that use the API, and the state of the player. This means that the history can easily contain non-HLS information. An example display from the console of the history array follows:

console display of history array

If you need to send the history array to support, the best thing to do is at the console type the following:


You will get information similar to what is shown here:

console display of history stringified

Copy the JSON that is generated and that can then be sent to support.

Property: player.tech().hls.stats

This object contains a summary of HLS and player related stats. The available properties are shown in the following table:

Property Name Type Description
bandwidth number Rate of the last segment download in bits/second
buffered array List of time ranges of content that are in the SourceBuffer
currentSource object The source object; has the structure {src: 'url', type: 'mimetype'}
currentTech string The name of the tech in use
currentTime number The current position of the player
duration number Duration of the video in seconds
master object The master playlist object
mediaBytesTransferred number Total number of content bytes downloaded
mediaRequests number Total number of media segment requests
mediaRequestsAborted number Total number of aborted media segment requests
mediaRequestsErrored number Total number of errored media segment requests
mediaRequestsTimeout number Total number of timedout media segment requests
mediaSecondsLoaded number Total number of content seconds downloaded
mediaTransferDuration number Total time spent downloading media segments in milliseconds
playerDimensions object Contains the width and height of the player
seekable array List of time ranges to which the player can seek
timestamp number Timestamp of when hls.stats was accessed
videoPlaybackQuality object Media playback quality metrics as specified by the W3C's Media Playback Quality API

An example display from the console of the stats object follows:

console display of stats object

Code example

If you wish to experiment with these debugging features, code based on the following can server as a starting point:

<video-js id="myPlayerID" data-video-id="5622718636001"
<script src="https://players.brightcove.net/1507807800001/SkxERgnQM_default/index.min.js"></script>

<script type="text/javascript">
  videojs.getPlayer('myPlayerID').ready(function() {
    var myPlayer = this;


    myPlayer.on('ended', function(){
      console.log('videojs.log.history(): ', videojs.log.history());
      console.log('videojs.log.level(): ', videojs.log.level());
      console.log('videojs.hls.stats: ', player.tech().hls.stats);

608 captions

Brightcove's HLS plugin has support for 608 captions. 608 captions, also known as CEA-608 captions, EIA-608 captions and Line 21 captions, are a standard for closed captioning for NTSC TV analog broadcasts in the United States and Canada. The 608 captions can be inserted into a live stream where they are mixed into the HLS' ts (transport stream) files.

Hosting issues

Unlike a native HLS implementation, the HLS plugin has to comply with the browser's security policies. That means that all the files that make up the stream must be served from the same domain as the page hosting the video player or from a server that has appropriate CORS headers configured. Easy instructions are available for popular webservers and most CDNs should have no trouble turning CORS on for your account.


Errors during HLS playback will be reported using the type APPEND_BUFFER_ERR. The message will be what is retrieved from the browser's native error. For instance, The quota has been exceeded.

Known issues

IE11/Win7 & HLS playback delayed

A playback delay occurs on Internet Explorer 11/Windows 7 when using HLS. This is due to the FlasHLS library used for HLS playback on that browser/platform combination. There is a chance delay on other browsers could occur if a customer forces Flash playback.


14 Nov 2018


  • Added redirect support for manifest and media requests

21 Mar 2018


  • Fixed the minified dist file
    • Updated webwackify to 0.1.6
    • Updated videojs-contrib-media-sources to 4.7.2

15 Mar 2018


  • Updated videojs-contrib-media-sources to 4.7.1 and webwackify to 0.1.5
  • More useful info in segment-metadata cue (bandwidth/resolution/codecs/byte-length)

7 Mar 2018


  • Use webwackify for webworkers to support webpack bundle
  • Fix tech.play() throwing unresolved promise errors on Chrome
  • update url-toolkit to version 2.1.3
  • Add jsDelivr link
  • Update karma reconnect configuration to match video.js
    • Increase karma's browserDisconnectTolerance to 3
  • Add nvmrc and update travis' chrome reference
    • Update karma-chrome-launcher to version 2.2.0
    • Update karma to version 1.7.1 and remove firefox from travis configuration
    • enable node_modules caching on travis
    • Update videojs-contrib-quality-levels to version 2.0.4
    • Fix test for event handler cleanup on dispose by calling event handling methods

6 Nov 2017


  • Remove unused expected manifest JavaScript files
  • Remove extraneous methods from PlaylistLoader
    • Move isLowestEnabledRendition to Playlist module
  • Update contrib-media-sources to 4.6.2
    • Update mux.js to 4.3.2
      • Flush pes packets when there is enough data

24 Oct 2017


  • Update contrib-media-sources to 4.6.1
    • Update mux.js to 4.3.1
      • Set active data channel per-field instead of globally for CEA-608
      • Fixed an issue with captions being placed in the wrong CC

19 Oct 2017


  • Use lastSegmentDuration + 2 * targetDuration for safe live point instead of 3 segments
    • Do not let back buffer trimming remove within target duration of current time
    • Increase threshold for stuck playlist checking
  • Fix video corruption on rendition switches in IE11 Win 8.1+ and Edge
    • segment-time-mapping event
    • Update contrib-media-sources to 4.6.0
  • Prioritize user enabled playlists over blacklist
    • Never allow playlist selector to select a playlist that has been permanently blacklisted due to incompatible configuration
    • When filtering playlists within the playlist selectors, if there are no enabled playlists (i.e. not blacklisted internally AND not disabled by the user) available, then fall back to using the list of playlists not disabled by the user regardless of blacklist state.
    • Make sure playlists blacklisted from an illegal media switch is permanently blacklisted, as there is no reason to try it again at a later time.
    • The representation api will return a list that filters out just incompatible playlists instead of both incompatible playlists and temporary blacklisted playlists.

11 Oct 2017


  • update videojs-contrib-media-sources to 4.5.3
    • update mux.js to 4.2.2
      • Use the first audio and video tracks in the PMT
  • fix InvalidStateError for live playback in IE11

20 Sep 2017


  • Update videojs-contrib-media-sources to 4.5.2
    • Let video.js remoteTextTrack auto cleanup take care of text track cleanup
  • Blacklist incompatible playlists on probe if codec information not in master manifest
  • Seek to seekable start when seeking before the seekable window
  • MediaGroups: various bug fixes and refactor
    • Removes the Firefox 48 check for for supporting a change in audio info
    • Fix delayed switching between audio tracks and intermittent desync

28 Aug 2017


  • Fixed: FLV metadata tags now appended when audio info changes

22 Aug 2017


  • Implemented CEA608: support for cc2-cc4, special/extended characters, formatting
    • All four CC tracks are now available
    • If CLOSED-CAPTIONS are specified in the master manifest, the corresponding CC text tracks will be labled appropriately, otherwise will be labled CC1 - CC4
    • Underline and italics will now be rendered
    • Special thanks to @squarebracket

16 Aug 2017


  • Added option to select lowest bitrate video rendition available on startup
  • Always activate loading in segment loaders after a seek
  • Wait for canplay event from tech before PlaybackWatcher begins monitoring
    • Fixed InvalidStateError in Win10 IE11
  • Blacklisted playlist for 2 minutes on early abort to prevent cache loop
    • Prevented rendition switch loop due to inconsistent network/caching
    • Don't fire bandwidthupdate when aborting early
  • Made sure text tracks added by HLS are properly disposed
  • Fixed Backward Seeking in IE11 Win8.1

7 Aug 2017


  • Fixed double caption issue
  • Now attach attributes property to playlist objects in cases the m3u8-parser does not
    • Added warning log when missing attribute for stream-inf

12 Jul 2017


  • Fixed processing of segments when mediaSource is closed

12 Jul 2017


  • Fixed: Audio only playlists with videojs-contrib-media-sources v4.4.7

6 Jul 2017


  • ABR Improvements
    • Use a starting bandwidth value of 0.0625 MB/s on Android devices
    • Do not allow an up-switch in quality until a certain amount of forward buffer has been filled, BUFFER_LOW_WATER_LINE
    • Dynamically increase the BUFFER_LOW_WATER_LINE and GOAL_BUFFER_LENGTH from 0 - > 30 and 30 -> 60 respectively during the first 30 seconds of playback
    • Abort segment requests before completion if bandwidth reported by the XHR progress event shows that network conditions are not fast enough to complete the request without causing rebuffering

27 Jun 2017


  • Update mux.js to 4.1.5 and videojs-contrib-media-sources to 4.4.6
    • Only flush PES packets from TS parsing front end when they are complete
      • Complete is defined as any time PES_packet_length matches the data’s length OR is a video packets
      • Works around an issue with incomplete packets getting sent down the pipeline when the source has audio PES packets split between segments
  • Add HLS usage tracking events
    • Usage tracking events are fired when we detect a certain HLS feature, encoding setting, or API is used. Note that although these usage events are listed in the README, they may change at any time without a major version change.
  • Fix endOfStream for demuxed audio and video

20 Jun 2017


  • Do not reset segmentloaders when switching media groups
    • Set loader state to ready on aborts even when loader is paused
  • Prevents crash when segment metadata cues can't be created
  • Allow overrideNative to be set as a player-level option
  • Create a moving-average playlist selector
    • Define a variant of the standard playlist selector that calculates a moving average of bandwidth and uses that to select a playlist.
  • Trigger bandwidthupdate events on the tech

16 May 2017


  • Updated mux.js to 4.1.4 and videojs-contrib-media-sources to 4.4.5
    • ts probe searches packets for first it can successfully parse
    • Fixed an issue that could cause updateend events to fire more than once per append or remove under very specific conditions on Firefox
  • Trigger error events when received empty response

10 May 2017


  • Fixed playback stalls when everything appears okay
    • Add playback watcher check for unknown player waiting
    • Do not do unknownwaiting check when the tech fires a native waiting event
    • Don't track current time waiting when at the end of the buffer
    • Call techWaiting_ when we detect a stall at the end of buffer

4 May 2017


  • Use specified mediasequence for VOD expired sync instead of assuming 0
    1. Used synccontroller for expired
  • Fixed: CODEC to mime-type conversion now takes into account all possible scenarios

25 Apr 2017


  • Update mux.js to 4.1.3 and media-sources to 4.4.4
  • Trigger an event when a playlist is blacklisted or retried
  • Triggers blacklistplaylist when a playlist is blacklisted
  • Triggers retryplaylist when retrying to load an errored playlist
  • Added option to modify blacklist duration

10 Apr 2017


  • Updated contrib-media-sources to 4.4.3
  • Fixed: Exceptions from calling endOfStream when the media source isn't ready
  • Fixed: Segment time mapping for fmp4 playback
  • If beforeRequest is set, reuse it on source changes
    • Allow changing global xhr beforeRequest at runtime
    • Always use latest beforeRequest instead of setting it when creating hls object

3 Apr 2017


  • Added support for in-manifest WebVTT
  • Fixed: Minor SegmentLoader Fixed: es
  • Fixed: Enable fast quality change for alternate audio
  • Added feature: Blacklist live playlists that have stopped being updated
    • Never blacklist final available final rendition
  • Refactored all the XHR handling code and related state out of SegmentLoader and into a single mediaSegmentRequest function
  • Added a segment-metadata TextTrack that contains cues for the segments currently in the buffer
  • Added support for description audio tracks in HLS
    • Added support for description audio tracks (marked with characteristics of public.accessibility.describes-video)
    • Added test for correctly setting alternative audio kinds

3 Mar 2017


  • Updated videojs-contrib-media-sources to v4.4.2 and mux.js to 4.1.1
    • Fixed silence insertion to not insert extra frames when audio is offset
    • Fixed metadata cue mapping so that it considers group cues with the same startTime and remaps them collectively to the same endTime
    • Added fudge factor to Flash tag trim target
    • Feature Video.js 6 compatibilbity
    • Fixed Flash tag trimming for misaligned audio and video
    • Reverted "Revert flash transmuxing in a web worker"
  • Fixed do not timeout segment requests for non-master playlist source

22 Feb 2017


  • Fixed a bug with the combination of seek-to-live and resync-on-a-poor-guess behaviors

22 Feb 2017


  • Updated locking url-toolkit to 1.0.9 to support relative URLs
  • Resynced on poor initial segment choice
  • Fixed resuming live playback after long pauses

16 Feb 2017


  • Reset segment loaders on all Flash seeks
    • Updated mux.js to 4.1.0
    • Updated videojs-contrib-media-sources to 4.4.0
  • Reorganized the functions in SegmentLoader to better follow the flow of execution from top-down
  • Removed ad-hoc logging in favor of a config-enabled logging like playback-watcher
  • isLowestEnabledRendition worked with redundant streams
  • Renamed Worker to DecrypterWorker

9 Feb 2017


  • Support for Akamai-style Redundant HLS
    • Stable sorting and always pick primary first
  • Fixed routing of decrypter messages intended for audio segment loader

8 Feb 2017


  • Updated dependencies for 4.3.0 mediasources
  • Removed HLS object events from README

3 Feb 2017


  • Introduced Video.js 6 forward compatibility while maintaining backward compatibilty
    • Swap to use getTech and null-check Flash tech
    • Only registerComponent HLS in older Video.js
    • Use registerPlugin if it exists
    • addTrack cross compatibility
  • Added events for underflow and live resync
    • For QoS measurement purposes, it may be useful to know how often the playback watcher is activating. Add new events for when the player falls off the back of the live window or stalls due to a video buffer gap.

31 Jan 2017


  • Updated videojs-contrib-media-sources to v4.2.0
    • Added support for inserting silence when appending a new segment will introduce a gap in the audio SourceBuffer
  • Remove hls-audio-track.js as this file was no longer being used
  • Stop blacklisting audio codecs as there is now wide support for switching between audio codecs on-the-fly among all modern browsers
  • Fix qualityLevels setup for videos with a source element
  • Error early for misconfigured overrideNative

25 Jan 2017


  • Updated issue template to use unpkg for latest versions
  • Used a snapshot of the issue template JSBin to protect from changes by owner
  • Fixed any possible fillBuffer_ race conditions by debouncing all fillBuffers_
    • Converted all calls to fillBuffer_ to calls to monitorBuffer_
    • Renamed monitorBuffer_ to monitorBufferTick_ which becomes the 500ms buffer check timer loop
    • Made monitorBuffer_ schedule an immediate timer for monitorBufferTick_
  • Made it possible for processing segment reachable even after playlist update removes it
    • Changed processing segment reference on playlist refresh
    • Tested for correct segment references on pending segments
    • Fixed unreachable segment tests after rebase on async monitor buffer change
    • Updated media index on playlist refreshes for all requests (including syncs)
  • Made progress events bubble
    • If the segment request triggers progress events (that is, XHR2 is supported), bubble those up to the tech. This makes it clearer that buffering is happening even on very slow connections.
  • Running decryption in a webworker no longer supported for IE10
  • Fixed mediaIndex tracking so that it is consistent when the playlist updates during a live stream
    • Fixed mediaIndex tracking so that it is consistent when the playlist updates during a live stream
    • Removed any code in SegmentLoader#handleUpdateEnd_ that changed the mediaIndex
    • Reordered SegmentLoader#playlist to make it easier to follow
    • All changes to both mediaIndexes (SegmentLoader's and segmentInfo's) now happen in SegmentLoader#playlist
    • Added tests for proper mediaIndex tracking with live playlists

20 Jan 2017


  • Fixed the m3u8-parser to support ES3

13 Jan 2017


23 Dec 2016


  • Fix a segment hop in live
  • Map legacy AVC codecs to their modern equivalents when excluding incompatible playlists
  • Update video.js to 5.15.1

29 Nov 2016


  • Fixed excessive segment loads on seeks
    • Fixed a few cases where seeking caused the player to load too many segments

23 Nov 2016


  • Reverted Upgrade aes-decrypter to use webcrypto for HLSe decryption where available
    • WebCrypto's subtle-crypto was failing to decrypt segments that worked previously with the JavaScript-only implementation

21 Nov 2016


  • Simplified the algorithm at the heart of SegmentLoader as much as possible
  • Updated videojs-contrib-media-sources to 4.1.2
    • Started using remote TextTracks because they can be properly removed
    • Handled remove cues from track properly if cues is null
  • Updated mux.js to 3.0.3
    • Stopped applying the compositionTimestamp of the first frame to the baseMediaDecodeTime for the fragment
    • Fixed coalesce stream to account for missing audio data in pending tracks

17 Nov 2016


  • Added the concept of systemBandwidth - a measure of the bandwidth (in mb/s) of the entire system from download through transmuxing and appending data to a flash or native media source
    • Adaptive bitrate selection is now based on the performance of the entire system

14 Nov 2016


  • Changed resolveUrl to use JavaScript only

11 Nov 2016


  • Updated the reloadSourceOnErrors plugin: Don't try to set the source if getSource returns undefined or null
  • resolve-url.js now uses an iframe to contain the base and anchor elements used to resolve relative urls

10 Nov 2016


  • Updated the reloadSourceOnErrors plugin
    • Option to pass a getSource function that can be used to provide a new source to load on error
    • Added the ability to override the default minimum time between errors in seconds
    • Plugin now cleans up event bindings when initialized multiple times
  • Fixed trimBuffer to compare correct segments and correctly trim in the live case

9 Nov 2016


  • Added a plugin that can be used to automatically reload a source if an error occurs
  • Fixed an error when checking if the lowest quality level is currently in use

9 Nov 2016


  • Enhanced gap skipper to seek back into the live window if playback slips out of it; renamed GapSkipper to PlaybackWatcher

3 Nov 2016


  • Updated videojs-contrib-media-sources to 4.0.5
    • Fixed an issue with ID3 and 608 cue translation

21 Oct 2016


  • Use setTimeout in gap skipper instead of relying on timeupdate events
  • Updated videojs-contrib-media-sources to 4.0.4
    • Append init segment to video buffer for every segment

18 Oct 2016


  • Fix 'ended' event not firing after replay
  • Updated videojs-contrib-media-sources to 4.0.2
    • Only trim FLV tags when seeking to prevent triming I frames
    • Updated Mux.js to 3.0.2
      • Set h264Frame to null after we finish the frame

18 Oct 2016


  • Update videojs-contrib-media-sources to 4.0.1
    • Fix flash fallback

17 Oct 2016


  • Update videojs-contrib-media-sources to 4.0.0
    • Append init segment data on audio track changes
    • Normalize ID3 behavior to follow Safari's implementation

14 Oct 2016


  • Allow for initial bandwidth option of 0
  • Added support for MAAT in Firefox 49
  • Corrected deprecation warning for player.hls

27 Sep 2016


  • Updated Mux.js to 2.5.0
    • Added support for generating version 1 TFDT boxes
    • Added TS inspector
  • Added bundle-collapser to create smaller dist files
  • Added fMP4 support
  • Fixed a bug that resulted in us loading the first segment on a live stream

24 Aug 2016


  • Updated videojs-contrib-mediasources to 3.1.5
    • Updated Mux.js to 2.4.2
      • Fixed caption-packet sorting to be stable on Chromium

17 Aug 2016


  • Changes to the underflow-detection in the gap-skipper to remove restrictions on the size of the gaps it is able to skip

16 Aug 2016


  • Fixes an issue where playback can stall when going in/out of fullscreen

15 Aug 2016


  • Updated support for #ext-x-cue-out, #ext-x-cue-in, and #ext-x-cue-out-cont to create a single cue spanning the range of time covered by the ad break
  • Updated to videojs-media-sources 3.1.4 to increase the values of the FlashConstants to push more data into flash per chunk-interval

29 Jul 2016


  • Added support for #ext-x-cue-out, #ext-x-cue-in, and #ext-x-cue-out-cont via a special TextTrack
  • Added the ability to skip gaps caused by video underflow behavior in Chrome

25 Jul 2016


  • No longer timeout segment requests if there is only one playlist left or if we are on the lowest rendition available
  • Fixed a bug where sometimes the first segment was not fetched when it should have been

15 Jul 2016


  • Added an algorithm to seek over gaps in the video element's buffer when they are created because of missing video or audio frames
  • Moved the AES decryption logic to it's own project

9 Jun 2016


  • Added manual rendition selection API via the representations() function on each instance of the HlsHandler class
  • Pulled out and moved m3u8 parsing functionality into it's own project at https://github.com/videojs/m3u8-parser

2 Jun 2016


  • Fixed a bug where the adaptive bitrate selection algorithm would not switch to media playlists that had already been fetched from the server previously

31 May 2016


  • Added support for multiple alternate audio tracks
  • New class SegmentLoader contains all buffer maintenence and segment fetching logic
  • New class SourceUpdater tracks the state of asynchronous operations on a SourceBuffer and queues operations for future execution if the SoureBuffer is busy
  • New class MasterPlaylistController now encapsulates operations on the master playlist and coordinates media playlists and segment loaders
  • Bug fixes related to fetching and buffer maintenance

11 Mar 2016


  • First release of the ES6 version of the SourceHandler
  • All new lint/build/test setup via the generator-videojs-plugin project

4 Mar 2016


  • Converted from a Tech to a SourceHandler for Video.js 5.x compatibility
  • Implemented a Media Source Extensions-based playback engine with a Flash-based fallback
  • Rewrote the Transmuxer and moved it into it's own project mux.js
  • Added support for 608/708 captions

29 Jul 2015


  • autoplay at the live point. fix live id3 cue insertion. (view)

14 Jul 2015


  • do not assume media sequence starts at zero (view)
  • fix error with audio- or video-only streams (view)

12 Jul 2015


  • Fix seeks between segments. Improve duration calculation. (view)

29 Jun 2015


  • Improved video duration calculation. (view)
  • Clamp seeks to the seekable range (view)
  • Use getComputedStyle for player dimensions when filtering variants (view)
  • Add a functional test that runs in SauceLabs (view)

15 Jun 2015


  • Fix seeking in live streams (view)

8 Jun 2015


  • Do not preload live videos (view)

5 Jun 2015


  • Implement seekable for live streams. Fix in-band metadata timing for live streams. (view)

29 May 2015


  • Do not unnecessarily reset to the live point when refreshing playlists. Clean up playlist loader timeouts. (view)
  • Ensure segments without an initial IDR are not displayed in 4:3 initially (view)
  • Wait for an SPS to inject metadata tags. (view)
  • Trim whitespace in playlist. (view)
  • Allow playback of TS files with NITs. Don't warn about PCR PIDs. (view)
  • Quicker quality switches when bandwidth changes. (view)
  • Fix temporary warped display after seeking. (view)


  • support preload=none


  • expose all ID3 frames and handle tags larger than 188 bytes


  • performance improvements for HLSe


  • Improved audio/video synchronization
  • Fixes for live, HLSe, and discontinuities
  • Rename internal methods to clarify their intended visibility


  • support for custom IVs with AES-128 encryption


  • embedded ID3 tags are exposed as an in-band metadata track


  • optimistic initial bitrate selection


  • support segment level AES-128 encryption


  • support for EXT-X-DISCONTINUITY


  • convert the HLS plugin to a tech


  • Refactor playlist loading
  • Add testing via karma


  • cookie-based content protection support (see withCredentials)


  • Live stream support


  • Performance fixes for high-bitrate streams


  • Basic playback and adaptive bitrate selection


  • Initial release