Video.js Blog

Steve Heffernan2013-09-06

Video.js 4.2.0 released! RTMP, CSS designer, and stability

Happy September! The 4.2.0 release of Video.js has a few interesting updates, and a bunch of stability and polish.

RTMP Support

First of all, thanks to an impressive collaboration of community members, we now have RTMP support (in beta). Check out the example.

Its still pretty basic support for RTMP, but we think it will cover a lot of the general use cases. The feature support includes:

  • Single stream (no client-side adaptive support)
  • Flash only, HTML5 video doesnt support RTMP (but HLS is supported on iOS devices)
  • On-demand only. We havent updated the UI to support live yet.

To load an RTMP stream in a Video.js player, youll use a source tag in the same way you would other source types:

<source
  src="rtmp://your.streaming.provider.net/cfx/st/&amp;mp4:path/to/video.mp4"
  type="rtmp/mp4"
/>

The connection and stream parts are determined by splitting the URL on the first ampersand (&) or the last slash (/).

[http://myurl.com/streaming&amp;/is/fun](http://myurl.com/streaming&amp;/is/fun) --&gt;
  connection: [http://myurl.com/streaming](http://myurl.com/streaming)
  stream: /is/fun

-or-

[http://myurl.com/streaming/is/fun](http://myurl.com/streaming/is/fun) --&gt;
  connection: [http://myurl.com/streaming/is](http://myurl.com/streaming/is)
  stream: fun

The available source types include rtmp/mp4 or rtmp/flv.

RTMP has been a much requested feature over the years and its great to finally have it in the player. Thanks to everyone involved in that work.

Player Skin Designer

If you missed the previous blog post, be sure to check out the new interface for designing the player skin. It really shows off the customizability of the video.js controls, which are built completely in HTML and CSS.

With the 4.2 release the styles in the designer have been brought up-to-date with the latest player styles.

Control Bar Updates

Also in a previous post, I described a number of updates that were made to the control bar to fix cross browser/device issues and improve the overall functionality. As of 4.2.0 all of those updates have made it into the stable release.

Other Updates

Along with previous updates theres been a number of patches and enhancements along the way. Heres a full list:

  • Added LESS as a CSS preprocessor for the default skin (view)
  • Exported MenuButtons for use in the API (view)
  • Fixed ability to remove listeners added with one() (view)
  • Updated buffered() to account for multiple loaded ranges (view)
  • Exported createItems() for custom menus (view)
  • Preventing media events from bubbling up the DOM (view)
  • Major reworking of the control bar and many issues fixed (view)
  • Fixed an issue with minifiying the code on Windows systems (view)
  • Added support for RTMP streaming through Flash (view)
  • Made tech.features available to external techs (view)
  • Minor code improvements (view)
  • Updated time formatting to support NaN and Infinity (view)
  • Fixed an undefined error in cases where no tech is loaded (view)
  • Exported addClass and removeClass for player components (view)
  • Made the fallback message customizable (view)
  • Fixed an issue with the loading spinner placement and rotation (view)
  • Fixed an issue with fonts being flaky in IE8

The latest version can be found on videojs.com through the download link or the CDN hosted version.

Cheers,

-heff