From 3cf6ec700e7df9e27c575f52b41ea7fd6a0f1931 Mon Sep 17 00:00:00 2001 From: Matthew McClure Date: Mon, 12 Jan 2015 15:24:22 -0800 Subject: [PATCH 1/4] added VERSION key that returns the full version of the current player --- Gruntfile.js | 1 + src/js/core.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Gruntfile.js b/Gruntfile.js index 2fa11565e3..f62503d8f0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -446,6 +446,7 @@ module.exports = function(grunt) { }); // Replace CDN version ref in js. Use major/minor version. combined = combined.replace(/GENERATED_CDN_VSN/g, version.majorMinor); + combined = combined.replace(/GENERATED_FULL_VSN/g, version.full); grunt.file.write('build/files/combined.video.js', combined); diff --git a/src/js/core.js b/src/js/core.js index 51e17ab1ad..5888ee9b2c 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -76,6 +76,12 @@ var videojs = window['videojs'] = vjs; vjs.CDN_VERSION = 'GENERATED_CDN_VSN'; vjs.ACCESS_PROTOCOL = ('https:' == document.location.protocol ? 'https://' : 'http://'); +/** +* Player version +* @return {number} The version of Video.js +*/ +vjs.VERSION = 'GENERATED_FULL_VSN'; + /** * Global Player instance options, surfaced from vjs.Player.prototype.options_ * vjs.options = vjs.Player.prototype.options_ From 496333dd89afa64ee2313df16b704558a825fcb6 Mon Sep 17 00:00:00 2001 From: Matthew McClure Date: Mon, 12 Jan 2015 15:29:05 -0800 Subject: [PATCH 2/4] use @type instead of @return --- src/js/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/core.js b/src/js/core.js index 5888ee9b2c..e739a7bf99 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -77,8 +77,8 @@ vjs.CDN_VERSION = 'GENERATED_CDN_VSN'; vjs.ACCESS_PROTOCOL = ('https:' == document.location.protocol ? 'https://' : 'http://'); /** -* Player version -* @return {number} The version of Video.js +* Full player version +* @type {number} */ vjs.VERSION = 'GENERATED_FULL_VSN'; From a413a3a85053df292946445a5d22b0dc85cd8da8 Mon Sep 17 00:00:00 2001 From: Matthew McClure Date: Mon, 12 Jan 2015 16:09:00 -0800 Subject: [PATCH 3/4] it's a string --- src/js/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/core.js b/src/js/core.js index e739a7bf99..db99c84220 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -78,7 +78,7 @@ vjs.ACCESS_PROTOCOL = ('https:' == document.location.protocol ? 'https://' : 'ht /** * Full player version -* @type {number} +* @type {string} */ vjs.VERSION = 'GENERATED_FULL_VSN'; From 019f4a607a5eee6b65558f9a49431a284b870dff Mon Sep 17 00:00:00 2001 From: Matthew McClure Date: Fri, 16 Jan 2015 13:22:15 -0800 Subject: [PATCH 4/4] use a string key to avoid minification --- src/js/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/core.js b/src/js/core.js index db99c84220..76e0f53ed6 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -80,7 +80,7 @@ vjs.ACCESS_PROTOCOL = ('https:' == document.location.protocol ? 'https://' : 'ht * Full player version * @type {string} */ -vjs.VERSION = 'GENERATED_FULL_VSN'; +vjs['VERSION'] = 'GENERATED_FULL_VSN'; /** * Global Player instance options, surfaced from vjs.Player.prototype.options_