diff options
Diffstat (limited to 'www/lib/videogular-buffering')
| -rw-r--r-- | www/lib/videogular-buffering/.bower.json | 19 | ||||
| -rw-r--r-- | www/lib/videogular-buffering/.gitignore | 3 | ||||
| -rw-r--r-- | www/lib/videogular-buffering/Gruntfile.js | 35 | ||||
| -rw-r--r-- | www/lib/videogular-buffering/LICENSE | 20 | ||||
| -rw-r--r-- | www/lib/videogular-buffering/README.md | 59 | ||||
| -rw-r--r-- | www/lib/videogular-buffering/bower.json | 8 | ||||
| -rw-r--r-- | www/lib/videogular-buffering/index.js | 4 | ||||
| -rw-r--r-- | www/lib/videogular-buffering/package.json | 15 | ||||
| -rw-r--r-- | www/lib/videogular-buffering/vg-buffering.js | 116 | ||||
| -rw-r--r-- | www/lib/videogular-buffering/vg-buffering.min.js | 1 |
10 files changed, 280 insertions, 0 deletions
diff --git a/www/lib/videogular-buffering/.bower.json b/www/lib/videogular-buffering/.bower.json new file mode 100644 index 00000000..63aa7569 --- /dev/null +++ b/www/lib/videogular-buffering/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "videogular-buffering", + "version": "1.4.4", + "main": "./vg-buffering.js", + "dependencies": { + "videogular": "~1.4.4" + }, + "homepage": "https://github.com/2fdevs/bower-videogular-buffering", + "_release": "1.4.4", + "_resolution": { + "type": "version", + "tag": "v1.4.4", + "commit": "84fa91b8b28631336e3bb9a8108d3a04e76508d3" + }, + "_source": "https://github.com/2fdevs/bower-videogular-buffering.git", + "_target": "1.4.4", + "_originalSource": "videogular-buffering", + "_direct": true +}
\ No newline at end of file diff --git a/www/lib/videogular-buffering/.gitignore b/www/lib/videogular-buffering/.gitignore new file mode 100644 index 00000000..ac2c9712 --- /dev/null +++ b/www/lib/videogular-buffering/.gitignore @@ -0,0 +1,3 @@ +/node_modules/ +/bower_components/ +.idea
\ No newline at end of file diff --git a/www/lib/videogular-buffering/Gruntfile.js b/www/lib/videogular-buffering/Gruntfile.js new file mode 100644 index 00000000..e5b2f2f7 --- /dev/null +++ b/www/lib/videogular-buffering/Gruntfile.js @@ -0,0 +1,35 @@ +module.exports = function(grunt) { + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + release: { + options: { + //bump: false, //default: true + //file: 'bower.json', //default: package.json + //add: false, //default: true + //commit: false, //default: true + //tag: false, //default: true + //push: false, //default: true + //pushTags: false, //default: true + //npmtag: true, //default: no tag + //folder: 'folder/to/publish/to/npm', //default project root + //commitMessage: 'check out my release <%= version %>', //default: 'release <%= version %>' + //tagMessage: 'tagging version <%= version %>', //default: 'Version <%= version %>', + //tagName: 'v<%= version %>', //default: '<%= version %>' + + file: 'bower.json', //default: package.json + add: false, //default: true + commit: false, //default: true + tag: false, //default: true + push: false, //default: true + pushTags: false, //default: true + npm: false + } + } + }); + + grunt.loadNpmTasks('grunt-release'); + + grunt.registerTask('major', ['release:major']); + grunt.registerTask('minor', ['release:minor']); + grunt.registerTask('patch', ['release:patch']); +}; diff --git a/www/lib/videogular-buffering/LICENSE b/www/lib/videogular-buffering/LICENSE new file mode 100644 index 00000000..2a6b69f7 --- /dev/null +++ b/www/lib/videogular-buffering/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 2fdevs + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/www/lib/videogular-buffering/README.md b/www/lib/videogular-buffering/README.md new file mode 100644 index 00000000..d2c9e258 --- /dev/null +++ b/www/lib/videogular-buffering/README.md @@ -0,0 +1,59 @@ +bower-videogular-buffering +========================== + +Videogular `buffering` plugin repository for distribution on `bower`. + +## Install + +Install [Videogular](http://www.videogular.com/) `buffering` plugin with Bower: + +`bower install videogular-buffering` + +### Install Videogular + +Install [Videogular](http://www.videogular.com/) with Bower: + +`bower install videogular` + +### Install themes + +Install [Videogular](http://www.videogular.com/) themes with Bower: + +`bower install videogular-themes-default` + +### Install plugins + +Install [Videogular](http://www.videogular.com/) plugins with Bower: + +`bower install videogular-controls` + +`bower install videogular-overlay-play` + +`bower install videogular-poster` + +## Documentation + +It's available on [Videogular's project Wiki](https://github.com/2fdevs/videogular/wiki). + +## License + +The MIT License (MIT) + +Copyright (c) 2013 2fdevs + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/www/lib/videogular-buffering/bower.json b/www/lib/videogular-buffering/bower.json new file mode 100644 index 00000000..37cd93f2 --- /dev/null +++ b/www/lib/videogular-buffering/bower.json @@ -0,0 +1,8 @@ +{ + "name": "videogular-buffering", + "version": "1.4.4", + "main": "./vg-buffering.js", + "dependencies": { + "videogular": "~1.4.4" + } +} diff --git a/www/lib/videogular-buffering/index.js b/www/lib/videogular-buffering/index.js new file mode 100644 index 00000000..7e031e16 --- /dev/null +++ b/www/lib/videogular-buffering/index.js @@ -0,0 +1,4 @@ +require('videogular'); +require('./vg-buffering'); + +module.exports = 'com.2fdevs.videogular.plugins.buffering'; diff --git a/www/lib/videogular-buffering/package.json b/www/lib/videogular-buffering/package.json new file mode 100644 index 00000000..99c01209 --- /dev/null +++ b/www/lib/videogular-buffering/package.json @@ -0,0 +1,15 @@ +{ + "name": "videogular-buffering", + "version": "1.4.4", + "main": "index.js", + "dependencies": { + "videogular": "~1.4.4" + }, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-release": "~0.7.0" + }, + "engines": { + "node": ">=0.8.0" + } +} diff --git a/www/lib/videogular-buffering/vg-buffering.js b/www/lib/videogular-buffering/vg-buffering.js new file mode 100644 index 00000000..4691fce1 --- /dev/null +++ b/www/lib/videogular-buffering/vg-buffering.js @@ -0,0 +1,116 @@ +/** + * @license videogular v1.4.4 http://videogular.com + * Two Fucking Developers http://twofuckingdevelopers.com + * License: MIT + */ +/** + * @ngdoc directive + * @name com.2fdevs.videogular.plugins.buffering.directive:vgBuffering + * @restrict E + * @description + * Shows a spinner when Videogular is buffering or preparing the video player. + * + * <pre> + * <videogular vg-theme="config.theme.url" vg-autoplay="config.autoPlay"> + * <vg-media vg-src="sources"></vg-media> + * + * <vg-buffering></vg-buffering> + * </videogular> + * </pre> + * + */ +"use strict"; +angular.module("com.2fdevs.videogular.plugins.buffering", []) + .run( + ["$templateCache", function ($templateCache) { + $templateCache.put("vg-templates/vg-buffering", + '<div class="bufferingContainer">\ + <div ng-class="spinnerClass" class="loadingSpinner"></div>\ + </div>'); + }] +) + .directive( + "vgBuffering", + ["VG_STATES", "VG_UTILS", function (VG_STATES, VG_UTILS) { + return { + restrict: "E", + require: "^videogular", + templateUrl: function (elem, attrs) { + return attrs.vgTemplate || 'vg-templates/vg-buffering'; + }, + link: function (scope, elem, attr, API) { + scope.showSpinner = function showSpinner() { + scope.spinnerClass = {stop: API.isBuffering}; + elem.css("display", "block"); + }; + + scope.hideSpinner = function hideSpinner() { + scope.spinnerClass = {stop: API.isBuffering}; + elem.css("display", "none"); + }; + + scope.setState = function setState(isBuffering) { + if (isBuffering) { + scope.showSpinner(); + } + else { + scope.hideSpinner(); + } + }; + + scope.onStateChange = function onStateChange(state) { + if (state == VG_STATES.STOP) { + scope.hideSpinner(); + } + }; + + scope.onPlayerReady = function onPlayerReady(isReady) { + if (isReady) { + scope.hideSpinner(); + } + }; + + scope.showSpinner(); + + // Workaround for issue #16: https://github.com/2fdevs/videogular/issues/16 + if (VG_UTILS.isMobileDevice()) { + scope.hideSpinner(); + } + else { + scope.$watch( + function () { + return API.isReady; + }, + function (newVal, oldVal) { + if (API.isReady == true || newVal != oldVal) { + scope.onPlayerReady(newVal); + } + } + ); + } + + scope.$watch( + function () { + return API.currentState; + }, + function (newVal, oldVal) { + if (newVal != oldVal) { + scope.onStateChange(newVal); + } + } + ); + + scope.$watch( + function () { + return API.isBuffering; + }, + function (newVal, oldVal) { + if (newVal != oldVal) { + scope.setState(newVal); + } + } + ); + } + } + } + ]); diff --git a/www/lib/videogular-buffering/vg-buffering.min.js b/www/lib/videogular-buffering/vg-buffering.min.js new file mode 100644 index 00000000..b0bb1ff8 --- /dev/null +++ b/www/lib/videogular-buffering/vg-buffering.min.js @@ -0,0 +1 @@ +"use strict";angular.module("com.2fdevs.videogular.plugins.buffering",[]).run(["$templateCache",function(a){a.put("vg-templates/vg-buffering",'<div class="bufferingContainer"> <div ng-class="spinnerClass" class="loadingSpinner"></div> </div>')}]).directive("vgBuffering",["VG_STATES","VG_UTILS",function(a,b){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-buffering"},link:function(c,d,e,f){c.showSpinner=function(){c.spinnerClass={stop:f.isBuffering},d.css("display","block")},c.hideSpinner=function(){c.spinnerClass={stop:f.isBuffering},d.css("display","none")},c.setState=function(a){a?c.showSpinner():c.hideSpinner()},c.onStateChange=function(b){b==a.STOP&&c.hideSpinner()},c.onPlayerReady=function(a){a&&c.hideSpinner()},c.showSpinner(),b.isMobileDevice()?c.hideSpinner():c.$watch(function(){return f.isReady},function(a,b){(1==f.isReady||a!=b)&&c.onPlayerReady(a)}),c.$watch(function(){return f.currentState},function(a,b){a!=b&&c.onStateChange(a)}),c.$watch(function(){return f.isBuffering},function(a,b){a!=b&&c.setState(a)})}}}]);
\ No newline at end of file |
