Video.js - HTML5 Video Player

Video.js Blog

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(-)
Gary Katsevman2016-07-22

Video.js 5.11.0 Prelease

Today sees the prerelease of version 5.11.0. I wanted to take a moment to talk about some of the changes, additions, and known issues.

This is a pre-release only. It's available on npm under the next tag and also available on the CDN under the fully qualified version number: //vjs.zencdn.net/5.11.0/video.js. It'll stay in pre-release state for around a week or more to make sure that there aren't any glaring bugs, so, please give it a shot and open issues if you find anything.

Notable Changes

  • In version 5.0, we wanted to deprecate videojs.players property in favor of of the videojs.getPlayers() getter. However, it's proved to be very useful and it is now being un-deprecated so it will no longer print deprecations in the console.
  • If the player is created without a source set and a user hits play, video.js will now wait for the a source to be provided before starting playback. This eliminates an error that happens when we try to play an empty source.
  • Our custom captions settings dialog was updated to be more accessible by using more aria attributes and better option names in drop downs.

Known Issues

  • In video.js 5.10, to be able to better respond to the source of the video element changing directly without going through video.js, we disposed SourceHandlers on subsequent loadstarts and cleared out the current source. However, this causes an issue with videojs-contrib-dash. A contributor investigated and found out that the two PRs mentioned before cause the issue. If a video is created with an MPEG-DASH source element, we end up seeing a loadstart event because of the source element and then when Dash.js kicks in and starts playback using MSE, we get another loadstart event. Since we see the second loadstat event we dispose of the SourceHandler, that is, videojs-contrib-dash and Dash.js, and the video doesn't play. A work around, while we figure out a correct solution, would be not to use source elements with DASH sources and only use the video.js API in the meantime.

Raw Changelog

  • @BrandonOCasey Document audio/video track usage (view)
  • @hartman Correct documentation to refer to nativeTextTracks option (view)
  • @nickygerritsen Also pass tech options to canHandleSource (view)
  • @misteroneill Un-deprecate the videojs.players property (view)
  • @nickygerritsen Add title to all clickable components (view)
  • @nickygerritsen Update Dutch language file (view)
  • @hartman Add descriptions and audio button to adaptive classes (view)
  • @MattiasBuelens Retain details from tech error (view)
  • @nickygerritsen Fix test for tooltips in IE8 (view)
  • @mboles added loadstart event to jsdoc (view)
  • @hartman added default print styling (view)
  • @ldayananda updated videojs to not do anything if no src is set (view)
  • @nickygerritsen removed unused tracks when changing sources. Fixes ##3000 (view)
  • @vit-koumar updated Flash tech to return Infinity from duration instead of -1 (view)
  • @alex-phillips added ontextdata to Flash tech (view)
  • @MattiasBuelens updated components to use durationchange only (view)
  • @misteroneill improved Logging for IE < 11 (view)
  • @vdeshpande updated control text of modal dialog (view)
  • @ldayananda fixed mouse handling on menus by using mouseleave over mouseout (view)
  • @mister-ben updated language to inherit correctly and respect the attribute on the player (view)
  • @sashyro fixed nativeControlsForTouch option (view)
  • @tbasse fixed techCall null check against tech (view)
  • @rbran100 checked src and currentSrc in handleTechReady to work around mixed content issues in chrome (view)
  • @OwenEdwards fixed caption settings dialog labels for accessibility (view)
  • @OwenEdwards removed spurious head tags in the simple-embed example (view)
  • @ntadej added a null check to errorDisplay usage (view)
  • @misteroneill fixed logging issues on IE by separating fn.apply and stringify checks (view)
  • @misteroneill fixed npm test from running coveralls locally (view)
  • @gkatsev added es6-shim to tests. Fixes Flash duration test (view)
  • @misteroneill corrects test assertions for older IEs in the log module (view)
  • @gkatsev fixed setting lang by looping through loop element variable and not constant tag (view)

Git diffstats

These are deltas between 5.11.0 and 5.10.7

CHANGELOG.md                                       |    33 +
build/grunt.js                                     |     3 +-
component.json                                     |     2 +-
docs/examples/simple-embed/index.html              |     3 -
docs/guides/audio-tracks.md                        |    69 +
docs/guides/languages.md                           |    12 +-
docs/guides/text-tracks.md                         |   184 +
docs/guides/tracks.md                              |   186 +-
docs/guides/video-tracks.md                        |    70 +
docs/index.md                                      |     2 +-
lang/en.json                                       |     1 +
lang/nl.json                                       |    19 +-
package.json                                       |     7 +-
src/css/_print.scss                                |     5 +
src/css/components/_adaptive.scss                  |     9 +-
src/css/components/_captions-settings.scss         |    26 +-
src/css/video-js.scss                              |     2 +
src/js/clickable-component.js                      |    12 +-
.../control-bar/time-controls/duration-display.js  |     8 +-
.../time-controls/remaining-time-display.js        |     1 +
src/js/menu/menu-button.js                         |     4 +-
src/js/modal-dialog.js                             |     2 +-
src/js/player.js                                   |    68 +-
src/js/tech/flash-rtmp.js                          |     3 +-
src/js/tech/flash.js                               |    21 +-
src/js/tech/html5.js                               |    73 +-
src/js/tech/tech.js                                |    16 +-
src/js/tracks/text-track-settings.js               |   176 +-
src/js/utils/browser.js                            |     3 +
src/js/utils/create-deprecation-proxy.js           |    50 -
src/js/utils/log.js                                |   124 +-
src/js/video.js                                    |    16 +-
test/globals-shim.js                               |     1 +
test/unit/button.test.js                           |     5 +-
test/unit/player.test.js                           |    22 +-
test/unit/plugins.test.js                          |    20 +-
test/unit/tech/flash.test.js                       |    51 +-
test/unit/tech/html5.test.js                       |    16 +-
test/unit/tech/tech.test.js                        |    17 +-
test/unit/tracks/text-track-settings.test.js       |    51 +-
test/unit/tracks/text-track.test.js                |    13 +-
test/unit/utils/create-deprecation-proxy.test.js   |    45 -
test/unit/utils/log.test.js                        |   104 +-
103 files changed, 971 insertions(+), 55554 deletions(-)