From af50b8ee293b2ca46d13558bfe55d19bec3d0627 Mon Sep 17 00:00:00 2001 From: Steve Heffernan Date: Thu, 27 Mar 2014 14:25:58 -0700 Subject: [PATCH] Fixed canPlaySource export that got lost in last release --- src/js/exports.js | 1 + test/unit/api.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js/exports.js b/src/js/exports.js index 7b6eedf1a4..9ad955c628 100644 --- a/src/js/exports.js +++ b/src/js/exports.js @@ -120,6 +120,7 @@ goog.exportProperty(vjs.MediaTechController.prototype, 'setPoster', vjs.MediaTec goog.exportSymbol('videojs.Html5', vjs.Html5); goog.exportProperty(vjs.Html5, 'Events', vjs.Html5.Events); goog.exportProperty(vjs.Html5, 'isSupported', vjs.Html5.isSupported); +goog.exportProperty(vjs.Html5, 'canPlaySource', vjs.Html5.canPlaySource); goog.exportProperty(vjs.Html5, 'patchCanPlayType', vjs.Html5.patchCanPlayType); goog.exportProperty(vjs.Html5, 'unpatchCanPlayType', vjs.Html5.unpatchCanPlayType); diff --git a/test/unit/api.js b/test/unit/api.js index c48fe212af..6e4a7b5d8c 100644 --- a/test/unit/api.js +++ b/test/unit/api.js @@ -92,8 +92,11 @@ test('should be able to access expected MediaTech API methods', function() { ok(html5Proto.setPoster, 'setPoster should exist on the HTML5 tech'); ok(flashProto.setPoster, 'setPoster should exist on the Flash tech'); - ok(videojs.Html5.patchCanPlayType, 'patchCanPlayType is available'); - ok(videojs.Html5.unpatchCanPlayType, 'unpatchCanPlayType is available'); + ok(videojs.Html5.patchCanPlayType, 'patchCanPlayType should exist for HTML5'); + ok(videojs.Html5.unpatchCanPlayType, 'unpatchCanPlayType should exist for HTML5'); + + ok(videojs.Html5.canPlaySource, 'canPlaySource should exist for HTML5'); + ok(videojs.Flash.canPlaySource, 'canPlaySource should exist for Flash'); }); test('should export ready api call to public', function() {