Video.js - HTML5 Video Player

Video.js Blog

Gary Katsevman2018-03-09

Video.js 7 Roadmap

Today, I’m excited to announce the roadmap to Video.js 7! While this is a major version update, there is very little that is actually breaking. The two main changes are the addition of videojs-http-streaming, VHS for short, and the removal of support for older versions of Internet Explorer.

VJS 7
VJS 7

Video.js HTTP Streaming

VHS used to be videojs-contrib-hls, but as MPEG-DASH became more popular, we realized that we wanted to support it as well and that we can share a lot of the code between HLS and DASH implementations. Look for more details in an announcement post for VHS soon! VHS will ship with Video.js by default because one of the guiding principles of Video.js is to make it easy for users to just put it on the page and have a player that works across browsers. With HLS and DASH becoming so popular, we thought it was about time for a plug and playable Video.js for the most common streaming formats. In addition to having it be included by default, we’ll make sure to provide builds that exclude VHS for those that don’t need it or are using another playback engine like HLS.js.

Old IE

IE8
IE8

Video.js has a long history of making best effort to support IE, starting with the Flash fallback originally created for IE8. When Video.js 5 was released, we had a lot of code in place to support IE8 and when Video.js 6 came around, with Flash on its way out, we moved Flash support to a separate project, videojs-flash. Now, based on usage data, we are planning to remove support for IE8, IE9, and IE10. According to the data we’ve gathered, IE in total has a share of about 4%. Of those 4%, IE8, IE9, and IE10 combined make up barely 5%, and IE11 has around 91% usage. This means that combined IE8, IE9, and IE10 are barely 0.002% of the total usage of Video.js. Based on this incredibly small footprint, we believe it isn't worth the substantial effort required to maintain support for these browsers. The good news is, for those concerned, Video.js 6 isn’t going away anytime soon and will be available for your old IE support needs. In addition to the statistics, our tests currently take between 5 and 10 minutes to run on IE8. Removing this will allow us to greatly decrease the duration of our test suite. Even worse, sometimes the tests timeout and retry for up to 40 minutes but when they restart they pass on the first try. Not having to deal with these types of issues will allow us to increase our testing infrastructure and provide a better product.

Thanks Browserstack for sponsoring browser-based testing for Video.js!

Video.js 5.x

When Video.js 7 is released it’ll be the end-of-life for Video.js 5.x from a support perspective. Of course, we are not going to unpublish this version from npm or remove the files from the CDN, so you are free to continue using it. However, we urge you to update at your earliest convenience as we will no longer be accepting fixes.

Google Analytics

Thanks Fastly for sponsoring vjs.zencdn.net

Video.js provides CDN hosted files for Video.js, sponsored by Fastly -- thanks Fastly! These files currently have a stripped down pixel tracking for Google Analytics (GA) that sends limited information to a GA account we own. We did a terrible job communicating that this is happening and how users can opt out -- set window.HELP_IMPROVE_VIDEOJS to false before loading in Video.js -- or use another CDN like unpkg or CDNJS. Recently we made a change that makes this tracking pixel honor the Do Not Track flag set by users in the browser, however, this isn’t going to affect previously released versions of Video.js

In addition, starting with Video.js 7.0 (and probably back ported to newer versions of 6.x) we will no longer include this tracking pixel in our CDN builds. Instead, we are investigating our options for using the CDN logs via Fastly. We expect to share more details as we get closer to the Video.js 7 release date and have a better idea of what we will be doing.

Build Tools

Currently, Video.js uses rollup to combine all the Video.js files into two files for different build systems. One that excludes dependencies, for use in bundlers, and another that includes dependencies for a UMD file that can be used on a page as a <script>. We are looking to transition our build and test tooling from rollup and browserify to Webpack 4.0 to provide more flexibility in our builds and to do a better job at being able to build with VHS (as many people remember the infamous issue 600 on the contrib-hls repo). In addition, we’ll be looking into allowing custom builds when bundling Video.js. For example, if one doesn’t want VHS or doesn’t want visible controls, a surprisingly large part of the player, they can set VJS_VHS=false VJS_CONTROLS=false when they’re bundling their application to keep these pieces out of the build.

Timeline

We are still working on a lot of what was mentioned above but our hope is to have the first pre-release of 7.0 before the end of March.

We’re pretty excited about this not-so-major update and hope you will be too!

Gary Katsevman2016-08-25

Video.js 5.12.0 and 5.11.5 releases

Today, there are two releases of video.js. The first, is a patch release for the 5.11 branch. With this release, we're also updating 5.11 to stable and publishing it to the CDN.

The 5.12 release is a pre-release. It's a pretty big milestone too. Video.js finally outputs non-pre-built files so bundlers like webpack can decide what to do with them.

Notable Changes

This release is mostly a maintenance and build-change release.

  • Lint the entire codebase with our linter and run the linter as a pre-push git hook.
  • Fix CSS issues in IE8.
  • Updated dependencies using Greenkeeper.io
  • Make video.js provide ES5 source files for bundlers like webpack and browserify to use. This also makes video.js requirable in node.
    • Video.js still provides a pre-build dist files for the CSS and JavaScript for those that aren't using bundlers.
  • We've added a grunt task called check-translations that will output a list of translations missing from language files based on the en.json file which serves as a template. If you know another lanugage, this would be an easy and quick way to get started contriburing to video.js!

Known Issues

No new known issues but we have started looking into the known issues from the last release.

Looking forward

Going forward, we're looking into switching to standard-version. This will allow us to accept PRs more easily and have the changelog generated for us. Also, this will make it easier for other core contributors to accept PRs. We've previously been using the contrib tool for accepting PRs and have the CHANGELOG generated automatically at that time but getting new people started with it for merging PRs was not the easiest experience.

Raw Changelog

  • @misteroneill, @BrandonOCasey, and @pagarwal123 updates all the code to pass the linter (view)
  • @misteroneill added ghooks to run linter on git push (view)
  • @BrandonOCasey removed unused base-styles.js file (view)
  • @erikyuzwa, @gkatsev updated CSS build to inlcude the IE8-specific CSS from a separate file instead of it being inside of sass (view) (view2)
  • @gkatsev added null checks around navigator.userAgent (view)
  • greenkeeper updated karma dependencies (view)
  • @BrandonOCasey updated language docs to link to IANA language registry (view)
  • @gkatsev removed unused dependencies (view)
  • @misteroneill enabled and updated videojs-standard and fixed an issue with linting (view)
  • @misteroneill updated tests to qunit 2.0 (view)
  • @gkatsev added slack badge to README (view)
  • @gkatsev reverted back to qunitjs 1.x to unbreak IE8. Added es5-shim to tests (view)
  • @gkatsev updated build system to open es5 folder for bundles and dist folder other users (view)
  • greenkeeper updated uglify (view)
  • greenkeeper updated grunt-concurrent (view)
  • greenkeeper updated karma-chrome-launcher (view)
  • @gkatsev added tests for webpack and browserify bundling and node.js requiring (view)
  • @rlchung fixed tests that weren't disposing players when they finished (view)

Git diffstats

These are deltas between 5.11.5 and 5.12.0 with the dist folder ignored.

 .babelrc                                           |   4 -
 .gitignore                                         |   1 -
 .jshintrc                                          |  49 ++
 .npmignore                                         |   1 -
 .travis.yml                                        |   2 +-
 CHANGELOG.md                                       |  26 -
 Gruntfile.js                                       |   2 +-
 README.md                                          |   2 -
 build/grunt.js                                     | 131 ++-
 build/tasks/cdn-links.js                           |   2 +-
 build/tasks/languages.js                           |  35 -
 build/tasks/saucelabs.js                           |  24 +
 component.json                                     |   2 +-
 docs/guides/languages.md                           | 164 +++-
 docs/translations-needed.md                        | 363 --------
 lang/de.json                                       |   8 +-
 lang/en.json                                       |   2 -
 lang/fr.json                                       |  19 +-
 package.json                                       |  80 +-
 src/css/_utilities.scss                            |   2 +-
 src/css/components/_control-bar.scss               |  16 +
 src/css/components/_fullscreen.scss                |   2 +
 src/css/components/_play-pause.scss                |   2 +
 src/css/components/_progress.scss                  |   2 +-
 src/css/components/menu/_menu.scss                 |   3 +-
 src/css/ie8.css                                    |  30 -
 src/js/base-styles.js                              |  18 +
 src/js/button.js                                   |  28 +-
 src/js/clickable-component.js                      |  29 +-
 src/js/component.js                                |  79 +-
 .../audio-track-controls/audio-track-button.js     |  11 +-
 .../audio-track-controls/audio-track-menu-item.js  |  18 +-
 src/js/control-bar/control-bar.js                  |  39 +-
 src/js/control-bar/fullscreen-toggle.js            |   2 +-
 src/js/control-bar/live-display.js                 |   2 +-
 src/js/control-bar/mute-toggle.js                  |  20 +-
 src/js/control-bar/play-toggle.js                  |   8 +-
 .../playback-rate-menu-button.js                   |  27 +-
 .../playback-rate-menu/playback-rate-menu-item.js  |  10 +-
 .../progress-control/load-progress-bar.js          |  22 +-
 .../progress-control/mouse-time-display.js         |  22 +-
 .../progress-control/play-progress-bar.js          |   6 +-
 .../progress-control/progress-control.js           |   5 +-
 src/js/control-bar/progress-control/seek-bar.js    |  41 +-
 .../progress-control/tooltip-progress-bar.js       |  10 +-
 .../spacer-controls/custom-control-spacer.js       |   4 +-
 .../caption-settings-menu-item.js                  |  18 +-
 .../text-track-controls/captions-button.js         |  13 +-
 .../text-track-controls/chapters-button.js         |  57 +-
 .../chapters-track-menu-item.js                    |  18 +-
 .../text-track-controls/descriptions-button.js     |  15 +-
 .../off-text-track-menu-item.js                    |  25 +-
 .../text-track-controls/subtitles-button.js        |   4 +-
 .../text-track-controls/text-track-button.js       |  17 +-
 .../text-track-controls/text-track-menu-item.js    |  36 +-
 .../time-controls/current-time-display.js          |  13 +-
 .../control-bar/time-controls/duration-display.js  |  15 +-
 .../time-controls/remaining-time-display.js        |   7 +-
 src/js/control-bar/track-button.js                 |   7 +-
 src/js/control-bar/volume-control/volume-bar.js    |  12 +-
 .../control-bar/volume-control/volume-control.js   |  10 +-
 src/js/control-bar/volume-menu-button.js           |  19 +-
 src/js/error-display.js                            |   5 +-
 src/js/event-target.js                             |  17 +-
 src/js/extend.js                                   |   7 +-
 src/js/fullscreen-api.js                           |   6 +-
 src/js/media-error.js                              |  57 +-
 src/js/menu/menu-button.js                         |  31 +-
 src/js/menu/menu-item.js                           |  10 +-
 src/js/menu/menu.js                                |  63 +-
 src/js/modal-dialog.js                             |  20 +-
 src/js/player.js                                   | 383 ++++-----
 src/js/plugins.js                                  |   2 +-
 src/js/popup/popup-button.js                       |  10 +-
 src/js/popup/popup.js                              |  11 +-
 src/js/poster-image.js                             |   7 +-
 src/js/setup.js                                    |  40 +-
 src/js/slider/slider.js                            |  34 +-
 src/js/tech/flash-rtmp.js                          |  25 +-
 src/js/tech/flash.js                               | 157 ++--
 src/js/tech/html5.js                               | 347 +++-----
 src/js/tech/loader.js                              |  20 +-
 src/js/tech/tech.js                                | 210 +++--
 src/js/tracks/audio-track-list.js                  |   5 +-
 src/js/tracks/audio-track.js                       |  10 +-
 src/js/tracks/html-track-element-list.js           |   4 +-
 src/js/tracks/html-track-element.js                |   8 +-
 src/js/tracks/text-track-cue-list.js               |  12 +-
 src/js/tracks/text-track-display.js                | 144 ++--
 src/js/tracks/text-track-list-converter.js         |  28 +-
 src/js/tracks/text-track-list.js                   |   6 +-
 src/js/tracks/text-track-settings.js               | 347 ++++----
 src/js/tracks/text-track.js                        |  51 +-
 src/js/tracks/track-enums.js                       |  29 +-
 src/js/tracks/track-list.js                        |  12 +-
 src/js/tracks/track.js                             |  13 +-
 src/js/tracks/video-track-list.js                  |   4 +-
 src/js/tracks/video-track.js                       |  10 +-
 src/js/utils/browser.js                            |  32 +-
 src/js/utils/buffer.js                             |   9 +-
 src/js/utils/dom.js                                |  95 +--
 src/js/utils/events.js                             | 429 +++++-----
 src/js/utils/fn.js                                 |   6 +-
 src/js/utils/format-time.js                        |   2 +-
 src/js/utils/guid.js                               |   2 +-
 src/js/utils/log.js                                |  14 +-
 src/js/utils/merge-options.js                      |  14 +-
 src/js/utils/stylesheet.js                         |   7 +-
 src/js/utils/time-ranges.js                        |  68 +-
 src/js/utils/to-title-case.js                      |   2 +-
 src/js/utils/url.js                                |  29 +-
 src/js/video.js                                    |  53 +-
 test/api/api.js                                    | 421 +++++-----
 test/globals-shim.js                               |   2 -
 test/index.html                                    |   2 -
 test/karma.conf.js                                 |  17 +-
 test/require/browserify.js                         |   8 -
 test/require/node.js                               |   9 -
 test/require/webpack.js                            |   8 -
 test/unit/button.test.js                           |  32 +-
 test/unit/clickable-component.test.js              |  31 +-
 test/unit/close-button.test.js                     |  22 +-
 test/unit/component.test.js                        | 639 +++++++--------
 test/unit/controls.test.js                         | 101 ++-
 test/unit/events.test.js                           | 240 +++---
 test/unit/extend.test.js                           |  20 +-
 test/unit/media-error.test.js                      |  69 --
 test/unit/menu.test.js                             |  54 +-
 test/unit/modal-dialog.test.js                     | 138 ++--
 test/unit/player.test.js                           | 912 ++++++++++-----------
 test/unit/plugins.test.js                          | 196 +++--
 test/unit/poster.test.js                           |  68 +-
 test/unit/setup.test.js                            |  20 +-
 test/unit/tech/flash-rtmp.test.js                  |  68 +-
 test/unit/tech/flash.test.js                       | 203 ++---
 test/unit/tech/html5.test.js                       | 491 +++++------
 test/unit/tech/tech-faker.js                       |  86 +-
 test/unit/tech/tech.test.js                        | 438 +++++-----
 test/unit/test-helpers.js                          |  71 +-
 test/unit/tracks/audio-track-list.test.js          | 108 ++-
 test/unit/tracks/audio-track.test.js               |  88 +-
 test/unit/tracks/audio-tracks.test.js              |  70 +-
 test/unit/tracks/html-track-element-list.test.js   |  50 +-
 test/unit/tracks/html-track-element.test.js        |  68 +-
 test/unit/tracks/text-track-controls.test.js       | 202 ++---
 test/unit/tracks/text-track-cue-list.test.js       |  79 +-
 test/unit/tracks/text-track-list-converter.test.js |  67 +-
 test/unit/tracks/text-track-list.test.js           |  23 +-
 test/unit/tracks/text-track-settings.test.js       | 178 ++--
 test/unit/tracks/text-track.test.js                | 203 +++--
 test/unit/tracks/text-tracks.test.js               | 401 +++++----
 test/unit/tracks/track-baseline.js                 |  37 +-
 test/unit/tracks/track-list.test.js                | 104 ++-
 test/unit/tracks/track.test.js                     |  16 +-
 test/unit/tracks/video-track-list.test.js          | 111 ++-
 test/unit/tracks/video-track.test.js               |  87 +-
 test/unit/tracks/video-tracks.test.js              |  71 +-
 test/unit/utils/dom.test.js                        | 426 ++++------
 test/unit/utils/fn.test.js                         |  13 +-
 test/unit/utils/format-time.test.js                |  48 +-
 test/unit/utils/log.test.js                        |  26 +-
 test/unit/utils/merge-options.test.js              |  16 +-
 test/unit/utils/time-ranges.test.js                |  49 +-
 test/unit/utils/to-title-case.test.js              |  10 +-
 test/unit/utils/url.test.js                        | 103 ++-
 test/unit/video.test.js                            | 186 ++---
 166 files changed, 5233 insertions(+), 6541 deletions(-)