Permalink
Browse files

Adding a different way of adding screenfull to this library.

  • Loading branch information...
1 parent 9924252 commit 106089d0c490d63bfce6f624651a5fbbe49410b6 @travist committed Dec 5, 2013
View
14 bin/minplayer.compressed.js
@@ -13,16 +13,18 @@ minplayer.plugin.prototype.ubind=function(a,b,c){this.unbind(a);return this.bind
minplayer.plugin.prototype.unbind=function(a){this.lock&&setTimeout(function(b){return function(){b.unbind(a)}}(this),10);this.lock=!0;a?this.queue.hasOwnProperty(a)&&0<this.queue[a].length&&(this.queue[a].length=0):this.queue={};this.lock=!1;return this};minplayer.addQueue=function(a,b,c,d,e){minplayer.lock?setTimeout(function(){minplayer.addQueue(a,c,b,d,e)},10):minplayer.queue.push({context:a,id:c,event:b,plugin:d,callback:e,addedto:{}})};
minplayer.bind=function(a,b,c,d,e){if(!d)return!1;var f=minplayer.plugins,g=null,h=null,k=[],l=function(a,b){if(f.hasOwnProperty(a)&&f[a].hasOwnProperty(b))for(var c=f[a][b].length;c--;)k.push(f[a][b][c])};if(b&&c)l(b,c);else if(!b&&c)for(h in f)l(h,c);else if(b&&!c&&f[b])for(g in f[b])l(b,g);else if(!b&&!c)for(h in f)for(g in f[h])l(h,g);for(g=k.length;g--;)k[g].bind(a,function(a){return function(b){d.call(a,b.target)}}(this));e||minplayer.addQueue(this,a,b,c,d);return 0<k.length};
minplayer.get=function(a,b,c){var d=typeof b,e=typeof c;"function"===typeof a?(c=a,b=a=null):"function"===d?(c=b,b=a,a=null):"undefined"===d&&"undefined"===e&&(b=a,c=a=null);if(c="function"===typeof c?c:null)minplayer.bind.call(this,"ready",a,b,c);else if(d=minplayer.plugins,e=null,a||b||c)if(!a||b||c){if(a&&b&&!c)return d[a][b];if(!a&&b&&!c){a=[];for(e in d)if(d.hasOwnProperty(e)&&d[e].hasOwnProperty(b))for(c=d[e][b].length;c--;)a.push(d[e][b][c]);return a}}else return d[a];else return d};
-minplayer=minplayer||{};minplayer.display=function(a,b,c,d){minplayer.plugin.call(this,a,b,c,d)};minplayer.display.prototype=new minplayer.plugin;minplayer.display.prototype.constructor=minplayer.display;minplayer.display.prototype.getDisplay=function(a,b){return a};minplayer.display.prototype.initialize=function(){this.display||(this.display=this.getDisplay(this.context,this.options));this.display&&(this.options.pluginName="display",this.elements=this.getElements(),minplayer.plugin.prototype.initialize.call(this))};
+minplayer=minplayer||{};
+(function(a){!function(a,c){var d="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,e=function(){var a,b,d=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),
+"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")],e=0;b=d.length;for(var f={};b>e;e++)if(a=d[e],a&&a[1]in c){e=0;for(b=a.length;b>e;e++)f[d[0][e]]=a[e];return f}return!1}(),f={request:function(a){var b=e.requestFullscreen;a=a||c.documentElement;/5\.1[\.\d]* Safari/.test(navigator.userAgent)?a[b]():a[b](d&&Element.ALLOW_KEYBOARD_INPUT)},exit:function(){c[e.exitFullscreen]()},toggle:function(a){this.isFullscreen?this.exit():
+this.request(a)},onchange:function(){},onerror:function(){},raw:e};return e?(Object.defineProperties(f,{isFullscreen:{get:function(){return!!c[e.fullscreenElement]}},element:{enumerable:!0,get:function(){return c[e.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return!!c[e.fullscreenEnabled]}}}),c.addEventListener(e.fullscreenchange,function(a){f.onchange.call(f,a)}),c.addEventListener(e.fullscreenerror,function(a){f.onerror.call(f,a)}),a.screenfull=f,void 0):(a.screenfull=!1,void 0)}(window,
+document);a.screenfull=screenfull})(minplayer);minplayer.display=function(a,b,c,d){minplayer.plugin.call(this,a,b,c,d)};minplayer.display.prototype=new minplayer.plugin;minplayer.display.prototype.constructor=minplayer.display;minplayer.display.prototype.getDisplay=function(a,b){return a};minplayer.display.prototype.initialize=function(){this.display||(this.display=this.getDisplay(this.context,this.options));this.display&&(this.options.pluginName="display",this.elements=this.getElements(),minplayer.plugin.prototype.initialize.call(this))};
minplayer.display.prototype.construct=function(){minplayer.plugin.prototype.construct.call(this);this.autoHide=!1;if(this.onResize){var a=0;jQuery(window).resize(function(b){return function(){clearTimeout(a);a=setTimeout(function(){b.onResize()},200)}}(this))}};minplayer.display.prototype.onResize=!1;minplayer.display.prototype.hide=function(a){if(a=a||this.display)a.forceHide=!0,a.unbind().hide()};minplayer.display.prototype.fullScreenElement=function(){return this.display};
minplayer.click=function(a,b){var c=!1;a=jQuery(a);a.bind("touchstart click",function(a){c||(c=!0,setTimeout(function(){c=!1},100),b.call(this,a))});return a};minplayer.display.prototype.onFocus=function(a){this.hasFocus=this.focus=a;this.autoHide&&this.showThenHide(this.autoHide.element,this.autoHide.timeout,this.autoHide.cb)};
minplayer.display.prototype.showThenHide=function(a,b,c){var d=typeof a;"undefined"===d?(c=null,a=this.display):"number"===d?(c=b,b=a,a=this.display):"function"===d&&(c=a,a=this.display);a&&(b=b||5E3,this.autoHide={element:a,timeout:b,cb:c},a.forceHide||("undefined"!==typeof a.showMe?a.showMe&&a.showMe(c):(a.show(),c&&c(!0))),a.hoverState||(jQuery(a).bind("mouseenter",function(){a.hoverState=!0}),jQuery(a).bind("mouseleave",function(){a.hoverState=!1})),clearTimeout(this.showTimer),this.showTimer=
setTimeout(function(d){return function g(){a.hoverState?d.showTimer=setTimeout(g,b):"undefined"!==typeof a.hideMe?a.hideMe&&a.hideMe(c):a.hide("slow",function(){c&&c(!1)})}}(this),b))};
-minplayer.display.prototype.fullscreen=function(a){var b=this.isFullScreen(),c=this.fullScreenElement();b&&!a?(c.removeClass("fullscreen"),screenfull&&screenfull.exit(),this.trigger("fullscreen",!1)):!b&&a&&(c.addClass("fullscreen"),screenfull&&(screenfull.request(c[0]),screenfull.onchange=function(a){return function(b){screenfull.isFullscreen||a.fullscreen(!1)}}(this)),this.trigger("fullscreen",!0))};minplayer.display.prototype.toggleFullScreen=function(){this.fullscreen(!this.isFullScreen())};
-minplayer.display.prototype.isFullScreen=function(){return this.fullScreenElement().hasClass("fullscreen")};minplayer.display.prototype.getScaledRect=function(a,b){var c={};c.x=b.x?b.x:0;c.y=b.y?b.y:0;c.width=b.width?b.width:0;c.height=b.height?b.height:0;a&&(b.width/b.height>a?(c.height=b.height,c.width=Math.floor(b.height*a)):(c.height=Math.floor(b.width/a),c.width=b.width),c.x=Math.floor((b.width-c.width)/2),c.y=Math.floor((b.height-c.height)/2));return c};
-minplayer.display.prototype.getElements=function(){return{}};
-(function(a,b){var c=function(){for(var a=[["requestFullscreen","exitFullscreen","fullscreenchange","fullscreen","fullscreenElement"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitfullscreenchange","webkitIsFullScreen","webkitCurrentFullScreenElement"],["mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozFullScreen","mozFullScreenElement"]],c=0,d=a.length;c<d;c++)if(a.hasOwnProperty(c)){var e=a[c];if(e[1]in b)return e}}();if(!c)return a.screenfull=!1,a.screenfull;var d=
-"ALLOW_KEYBOARD_INPUT"in Element,e={init:function(){b.addEventListener(c[2],function(a){e.isFullscreen=b[c[3]];e.element=b[c[4]];e.onchange(a)});return this},isFullscreen:b[c[3]],element:b[c[4]],request:function(a){a=a||b.documentElement;a[c[0]](d&&Element.ALLOW_KEYBOARD_INPUT);if(!b.isFullscreen)a[c[0]]()},exit:function(){b[c[1]]()},toggle:function(a){this.isFullscreen?this.exit():this.request(a)},onchange:function(){}};a.screenfull=e.init()})(window,document);
+minplayer.display.prototype.fullscreen=function(a){var b=this.isFullScreen(),c=this.fullScreenElement();b&&!a?(c.removeClass("fullscreen"),minplayer.screenfull&&minplayer.screenfull.exit(),this.trigger("fullscreen",!1)):!b&&a&&(c.addClass("fullscreen"),minplayer.screenfull&&(minplayer.screenfull.request(c[0]),minplayer.screenfull.onchange=function(a){return function(b){minplayer.screenfull.isFullscreen||a.fullscreen(!1)}}(this)),this.trigger("fullscreen",!0))};
+minplayer.display.prototype.toggleFullScreen=function(){this.fullscreen(!this.isFullScreen())};minplayer.display.prototype.isFullScreen=function(){return this.fullScreenElement().hasClass("fullscreen")};
+minplayer.display.prototype.getScaledRect=function(a,b){var c={};c.x=b.x?b.x:0;c.y=b.y?b.y:0;c.width=b.width?b.width:0;c.height=b.height?b.height:0;a&&(b.width/b.height>a?(c.height=b.height,c.width=Math.floor(b.height*a)):(c.height=Math.floor(b.width/a),c.width=b.width),c.x=Math.floor((b.width-c.width)/2),c.y=Math.floor((b.height-c.height)/2));return c};minplayer.display.prototype.getElements=function(){return{}};
jQuery.fn.minplayer||(jQuery.fn.minplayer=function(a){return jQuery(this).each(function(){a=a||{};a.id=a.id||jQuery(this).attr("id")||Math.random();minplayer.plugins[a.id]||(a.template=a.template||"default",minplayer[a.template]?new minplayer[a.template](jQuery(this),a):new minplayer(jQuery(this),a))})});minplayer=jQuery.extend(function(a,b){minplayer.display.call(this,"player",a,b)},minplayer);minplayer.prototype=new minplayer.display;minplayer.prototype.constructor=minplayer;
minplayer.prototype.defaultOptions=function(a){a.id="player";a.build=!1;a.wmode="transparent";a.preload=!0;a.autoplay=!1;a.autoload=!0;a.loop=!1;a.width="100%";a.height="350px";a.debug=!1;a.volume=80;a.files=null;a.file="";a.preview="";a.attributes={};a.plugins={};a.logo="";a.link="";a.duration=0;jQuery.each(this.context[0].attributes,function(b,c){a[c.name]=c.value});minplayer.display.prototype.defaultOptions.call(this,a)};
minplayer.prototype.construct=function(){minplayer.display.prototype.construct.call(this);var a=null,b;for(b in this.options.plugins)a=this.options.plugins[b],minplayer[a]&&(a=minplayer[a],a[this.options.template]&&a[this.options.template].init?a[this.options.template].init(this):a.init&&a.init(this));this.options.pluginName="player";this.controller=this.create("controller");this.playLoader=this.create("playLoader");this.options.logo&&this.elements.logo&&(a="",this.options.link&&(a+='<a target="_blank" href="'+
View
106 bin/minplayer.js
@@ -989,9 +989,16 @@ minplayer.get = function(id, plugin, callback) {
return plugin_types;
}
};
-/** The minplayer namespace. */
minplayer = minplayer || {};
-
+(function(exports) {
+/*!
+* screenfull
+* v1.1.1 - 2013-11-20
+* https://github.com/sindresorhus/screenfull.js
+* (c) Sindre Sorhus; MIT License
+*/
+!function(a,b){"use strict";var c="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,d=function(){for(var a,c,d=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],e=0,f=d.length,g={};f>e;e++)if(a=d[e],a&&a[1]in b){for(e=0,c=a.length;c>e;e++)g[d[0][e]]=a[e];return g}return!1}(),e={request:function(a){var e=d.requestFullscreen;a=a||b.documentElement,/5\.1[\.\d]* Safari/.test(navigator.userAgent)?a[e]():a[e](c&&Element.ALLOW_KEYBOARD_INPUT)},exit:function(){b[d.exitFullscreen]()},toggle:function(a){this.isFullscreen?this.exit():this.request(a)},onchange:function(){},onerror:function(){},raw:d};return d?(Object.defineProperties(e,{isFullscreen:{get:function(){return!!b[d.fullscreenElement]}},element:{enumerable:!0,get:function(){return b[d.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return!!b[d.fullscreenEnabled]}}}),b.addEventListener(d.fullscreenchange,function(a){e.onchange.call(e,a)}),b.addEventListener(d.fullscreenerror,function(a){e.onerror.call(e,a)}),a.screenfull=e,void 0):(a.screenfull=!1,void 0)}(window,document);exports.screenfull = screenfull;
+})(minplayer);
/**
* @constructor
* @extends minplayer.plugin
@@ -1258,18 +1265,18 @@ minplayer.display.prototype.fullscreen = function(full) {
var element = this.fullScreenElement();
if (isFull && !full) {
element.removeClass('fullscreen');
- if (screenfull) {
- screenfull.exit();
+ if (minplayer.screenfull) {
+ minplayer.screenfull.exit();
}
this.trigger('fullscreen', false);
}
else if (!isFull && full) {
element.addClass('fullscreen');
- if (screenfull) {
- screenfull.request(element[0]);
- screenfull.onchange = (function(display) {
+ if (minplayer.screenfull) {
+ minplayer.screenfull.request(element[0]);
+ minplayer.screenfull.onchange = (function(display) {
return function(e) {
- if (!screenfull.isFullscreen) {
+ if (!minplayer.screenfull.isFullscreen) {
display.fullscreen(false);
}
};
@@ -1332,89 +1339,6 @@ minplayer.display.prototype.getScaledRect = function(ratio, rect) {
minplayer.display.prototype.getElements = function() {
return {};
};
-
-/**
- * From https://github.com/sindresorhus/screenfull.js
- */
-/*global Element:true*/
-(function(window, document) {
- 'use strict';
- var methods = (function() {
- var methodMap = [
- [
- 'requestFullscreen',
- 'exitFullscreen',
- 'fullscreenchange',
- 'fullscreen',
- 'fullscreenElement'
- ],
- [
- 'webkitRequestFullScreen',
- 'webkitCancelFullScreen',
- 'webkitfullscreenchange',
- 'webkitIsFullScreen',
- 'webkitCurrentFullScreenElement'
- ],
- [
- 'mozRequestFullScreen',
- 'mozCancelFullScreen',
- 'mozfullscreenchange',
- 'mozFullScreen',
- 'mozFullScreenElement'
- ]
- ];
- for (var i = 0, l = methodMap.length; i < l; i++) {
- if (methodMap.hasOwnProperty(i)) {
- var val = methodMap[i];
- if (val[1] in document) {
- return val;
- }
- }
- }
- })();
-
- if (!methods) {
- window.screenfull = false;
- return window.screenfull;
- }
-
- var keyboardAllowed = 'ALLOW_KEYBOARD_INPUT' in Element;
-
- var screenfull = {
- init: function() {
- document.addEventListener(methods[2], function(e) {
- screenfull.isFullscreen = document[methods[3]];
- screenfull.element = document[methods[4]];
- screenfull.onchange(e);
- });
- return this;
- },
- isFullscreen: document[methods[3]],
- element: document[methods[4]],
- request: function(elem) {
- elem = elem || document.documentElement;
- elem[methods[0]](keyboardAllowed && Element.ALLOW_KEYBOARD_INPUT);
- // Work around Safari 5.1 bug: reports support for keyboard in fullscreen
- // even though it doesn't.
- if (!document.isFullscreen) {
- elem[methods[0]]();
- }
- },
- exit: function() {
- document[methods[1]]();
- },
- toggle: function(elem) {
- if (this.isFullscreen) {
- this.exit();
- } else {
- this.request(elem);
- }
- },
- onchange: function() {}
- };
-
- window.screenfull = screenfull.init();
-})(window, document);
// Add a way to instanciate using jQuery prototype.
if (!jQuery.fn.minplayer) {
View
2 doc/files.html
@@ -460,7 +460,7 @@ <h1 class="classTitle">File Index</h1>
</div>
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:08 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/index.html
@@ -347,7 +347,7 @@ <h1 class="classTitle">Class Index</h1>
</div>
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:08 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
37 doc/symbols/_global_.html
@@ -268,6 +268,16 @@ <h1 class="classTitle">
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">
+ <b><a href="../symbols/_global_.html#d">d</a></b>
+ </div>
+ <div class="description"></div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="attributes">&nbsp;</td>
+ <td class="nameDescription">
+ <div class="fixedFont">
<b><a href="../symbols/_global_.html#minplayer">minplayer</a></b>
</div>
<div class="description">The minplayer namespace.</div>
@@ -322,6 +332,31 @@ <h1 class="classTitle">
Field Detail
</div>
+ <a name="d"> </a>
+ <div class="fixedFont">
+
+
+ <b>d</b>
+
+ </div>
+ <div class="description">
+
+
+ <br />
+ <i>Defined in: </i> <a href="../symbols/src/src_minplayer.display.js.html">minplayer.display.js</a>.
+
+
+ </div>
+
+
+
+
+
+
+
+
+ <hr />
+
<a name="minplayer"> </a>
<div class="fixedFont">
@@ -412,7 +447,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:06 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/jQuery.fn.minplayer.html
@@ -345,7 +345,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:06 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.async.html
@@ -529,7 +529,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:06 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.compatibility.html
@@ -604,7 +604,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:06 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.display.html
@@ -1026,7 +1026,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.file.html
@@ -611,7 +611,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.flags.html
@@ -550,7 +550,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.image.html
@@ -677,7 +677,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.players.base.html
@@ -2374,7 +2374,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.players.dailymotion.html
@@ -1385,7 +1385,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.players.flash.html
@@ -697,7 +697,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.players.html5.html
@@ -1146,7 +1146,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.players.kaltura.html
@@ -1218,7 +1218,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.players.limelight.html
@@ -1026,7 +1026,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.players.minplayer.html
@@ -904,7 +904,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.players.vimeo.html
@@ -1381,7 +1381,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:07 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.players.youtube.html
@@ -1475,7 +1475,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:08 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
2 doc/symbols/minplayer.plugin.html
@@ -1513,7 +1513,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Thu Nov 07 2013 17:18:08 GMT-0600 (CST)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Dec 04 2013 21:55:07 GMT-0600 (CST)
</div>
</body>
</html>
View
756 doc/symbols/src/src_minplayer.display.js.html
340 additions, 416 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
11 makefile
@@ -41,6 +41,17 @@ jslint: ${files}
# Create an aggregated js file and a compressed js file.
js: ${files}
+ @curl https://raw.github.com/sindresorhus/screenfull.js/v1.1.1/dist/screenfull.min.js > bin/screenfull.min.js
+ @echo "Creating minplayer.display.js"
+ @mv src/minplayer.display.js src/minplayer.display.tmp.js
+ @echo "minplayer = minplayer || {};" > src/minplayer.display.js
+ @echo "(function(exports) {" >> src/minplayer.display.js
+ @cat bin/screenfull.min.js >> src/minplayer.display.js
+ @echo "exports.screenfull = screenfull;" >> src/minplayer.display.js
+ @echo "})(minplayer);" >> src/minplayer.display.js
+ @cat src/minplayer.display.tmp.js >> src/minplayer.display.js
+ @rm src/minplayer.display.tmp.js
+ @rm bin/screenfull.min.js
@echo "Generating aggregated bin/minplayer.js file"
@cat > bin/minplayer.js $^
@echo "Generating compressed bin/minplayer.compressed file"
View
106 src/minplayer.display.js
@@ -1,6 +1,13 @@
-/** The minplayer namespace. */
minplayer = minplayer || {};
-
+(function(exports) {
+/*!
+* screenfull
+* v1.1.1 - 2013-11-20
+* https://github.com/sindresorhus/screenfull.js
+* (c) Sindre Sorhus; MIT License
+*/
+!function(a,b){"use strict";var c="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,d=function(){for(var a,c,d=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],e=0,f=d.length,g={};f>e;e++)if(a=d[e],a&&a[1]in b){for(e=0,c=a.length;c>e;e++)g[d[0][e]]=a[e];return g}return!1}(),e={request:function(a){var e=d.requestFullscreen;a=a||b.documentElement,/5\.1[\.\d]* Safari/.test(navigator.userAgent)?a[e]():a[e](c&&Element.ALLOW_KEYBOARD_INPUT)},exit:function(){b[d.exitFullscreen]()},toggle:function(a){this.isFullscreen?this.exit():this.request(a)},onchange:function(){},onerror:function(){},raw:d};return d?(Object.defineProperties(e,{isFullscreen:{get:function(){return!!b[d.fullscreenElement]}},element:{enumerable:!0,get:function(){return b[d.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return!!b[d.fullscreenEnabled]}}}),b.addEventListener(d.fullscreenchange,function(a){e.onchange.call(e,a)}),b.addEventListener(d.fullscreenerror,function(a){e.onerror.call(e,a)}),a.screenfull=e,void 0):(a.screenfull=!1,void 0)}(window,document);exports.screenfull = screenfull;
+})(minplayer);
/**
* @constructor
* @extends minplayer.plugin
@@ -267,18 +274,18 @@ minplayer.display.prototype.fullscreen = function(full) {
var element = this.fullScreenElement();
if (isFull && !full) {
element.removeClass('fullscreen');
- if (screenfull) {
- screenfull.exit();
+ if (minplayer.screenfull) {
+ minplayer.screenfull.exit();
}
this.trigger('fullscreen', false);
}
else if (!isFull && full) {
element.addClass('fullscreen');
- if (screenfull) {
- screenfull.request(element[0]);
- screenfull.onchange = (function(display) {
+ if (minplayer.screenfull) {
+ minplayer.screenfull.request(element[0]);
+ minplayer.screenfull.onchange = (function(display) {
return function(e) {
- if (!screenfull.isFullscreen) {
+ if (!minplayer.screenfull.isFullscreen) {
display.fullscreen(false);
}
};
@@ -341,86 +348,3 @@ minplayer.display.prototype.getScaledRect = function(ratio, rect) {
minplayer.display.prototype.getElements = function() {
return {};
};
-
-/**
- * From https://github.com/sindresorhus/screenfull.js
- */
-/*global Element:true*/
-(function(window, document) {
- 'use strict';
- var methods = (function() {
- var methodMap = [
- [
- 'requestFullscreen',
- 'exitFullscreen',
- 'fullscreenchange',
- 'fullscreen',
- 'fullscreenElement'
- ],
- [
- 'webkitRequestFullScreen',
- 'webkitCancelFullScreen',
- 'webkitfullscreenchange',
- 'webkitIsFullScreen',
- 'webkitCurrentFullScreenElement'
- ],
- [
- 'mozRequestFullScreen',
- 'mozCancelFullScreen',
- 'mozfullscreenchange',
- 'mozFullScreen',
- 'mozFullScreenElement'
- ]
- ];
- for (var i = 0, l = methodMap.length; i < l; i++) {
- if (methodMap.hasOwnProperty(i)) {
- var val = methodMap[i];
- if (val[1] in document) {
- return val;
- }
- }
- }
- })();
-
- if (!methods) {
- window.screenfull = false;
- return window.screenfull;
- }
-
- var keyboardAllowed = 'ALLOW_KEYBOARD_INPUT' in Element;
-
- var screenfull = {
- init: function() {
- document.addEventListener(methods[2], function(e) {
- screenfull.isFullscreen = document[methods[3]];
- screenfull.element = document[methods[4]];
- screenfull.onchange(e);
- });
- return this;
- },
- isFullscreen: document[methods[3]],
- element: document[methods[4]],
- request: function(elem) {
- elem = elem || document.documentElement;
- elem[methods[0]](keyboardAllowed && Element.ALLOW_KEYBOARD_INPUT);
- // Work around Safari 5.1 bug: reports support for keyboard in fullscreen
- // even though it doesn't.
- if (!document.isFullscreen) {
- elem[methods[0]]();
- }
- },
- exit: function() {
- document[methods[1]]();
- },
- toggle: function(elem) {
- if (this.isFullscreen) {
- this.exit();
- } else {
- this.request(elem);
- }
- },
- onchange: function() {}
- };
-
- window.screenfull = screenfull.init();
-})(window, document);

0 comments on commit 106089d

Please sign in to comment.