From 15fab6df819307b02ae5e6c00fd3ca0d6bdbd758 Mon Sep 17 00:00:00 2001 From: Dominic Date: Tue, 30 Jul 2013 10:43:11 -0700 Subject: [PATCH] Close GH-654: Export createItems call to enable plugins to hook into process. Fixes #648 --- src/js/exports.js | 3 +++ src/js/menu.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/exports.js b/src/js/exports.js index d7f922aecb..33c2958737 100644 --- a/src/js/exports.js +++ b/src/js/exports.js @@ -92,6 +92,9 @@ goog.exportSymbol('videojs.PosterImage', vjs.PosterImage); goog.exportSymbol('videojs.Menu', vjs.Menu); goog.exportSymbol('videojs.MenuItem', vjs.MenuItem); goog.exportSymbol('videojs.MenuButton', vjs.MenuButton); +goog.exportProperty(vjs.MenuButton.prototype, 'createItems', vjs.MenuButton.prototype.createItems); +goog.exportProperty(vjs.TextTrackButton.prototype, 'createItems', vjs.TextTrackButton.prototype.createItems); +goog.exportProperty(vjs.ChaptersButton.prototype, 'createItems', vjs.ChaptersButton.prototype.createItems); goog.exportSymbol('videojs.SubtitlesButton', vjs.SubtitlesButton); goog.exportSymbol('videojs.CaptionsButton', vjs.CaptionsButton); diff --git a/src/js/menu.js b/src/js/menu.js index 76cdb23f80..99b6df9e48 100644 --- a/src/js/menu.js +++ b/src/js/menu.js @@ -128,7 +128,7 @@ vjs.MenuButton.prototype.createMenu = function(){ })); } - this.items = this.createItems(); + this.items = this['createItems'](); if (this.items) { // Add menu items to the menu