summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-06-26 18:08:07 -0400
committerPliable Pixels <pliablepixels@gmail.com>2016-06-26 18:08:07 -0400
commita1f3994a1849dbd1b5157adf8c16e6e72ca5736e (patch)
treeeac5c64796a12a0dc9ee8bc495eb6805e345064c
parent4c63b323d7fa20f9ed8494c627235c5f2892ff85 (diff)
updated videogular to 1.4.4
Former-commit-id: 7348ef0ae60746ce86cd4e813cf10e8b53e723d7
-rw-r--r--www/lib/videogular-buffering/.bower.json14
-rw-r--r--www/lib/videogular-buffering/bower.json4
-rw-r--r--www/lib/videogular-buffering/index.js1
-rw-r--r--www/lib/videogular-buffering/package.json5
-rw-r--r--www/lib/videogular-buffering/vg-buffering.js2
-rw-r--r--www/lib/videogular-controls/.bower.json14
-rw-r--r--www/lib/videogular-controls/bower.json4
-rw-r--r--www/lib/videogular-controls/index.js1
-rw-r--r--www/lib/videogular-controls/package.json5
-rw-r--r--www/lib/videogular-controls/vg-controls.js741
-rw-r--r--www/lib/videogular-controls/vg-controls.min.js2
-rw-r--r--www/lib/videogular-overlay-play/.bower.json14
-rw-r--r--www/lib/videogular-overlay-play/bower.json4
-rw-r--r--www/lib/videogular-overlay-play/index.js1
-rw-r--r--www/lib/videogular-overlay-play/package.json5
-rw-r--r--www/lib/videogular-overlay-play/vg-overlay-play.js89
-rw-r--r--www/lib/videogular-overlay-play/vg-overlay-play.min.js2
-rw-r--r--www/lib/videogular-themes-default/.bower.json20
-rw-r--r--www/lib/videogular-themes-default/bower.json10
-rw-r--r--www/lib/videogular-themes-default/package.json5
-rw-r--r--www/lib/videogular-themes-default/videogular.css49
-rw-r--r--www/lib/videogular-themes-default/videogular.css.map2
-rw-r--r--www/lib/videogular-themes-default/videogular.min.css2
-rw-r--r--www/lib/videogular/.bower.json15
-rw-r--r--www/lib/videogular/bower.json2
-rw-r--r--www/lib/videogular/index.js2
-rw-r--r--www/lib/videogular/package.json6
-rw-r--r--www/lib/videogular/videogular.js242
-rw-r--r--www/lib/videogular/videogular.min.js2
29 files changed, 887 insertions, 378 deletions
diff --git a/www/lib/videogular-buffering/.bower.json b/www/lib/videogular-buffering/.bower.json
index 2bfe6f72..63aa7569 100644
--- a/www/lib/videogular-buffering/.bower.json
+++ b/www/lib/videogular-buffering/.bower.json
@@ -1,19 +1,19 @@
{
"name": "videogular-buffering",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "./vg-buffering.js",
"dependencies": {
- "videogular": "~1.3.2"
+ "videogular": "~1.4.4"
},
"homepage": "https://github.com/2fdevs/bower-videogular-buffering",
- "_release": "1.3.2",
+ "_release": "1.4.4",
"_resolution": {
"type": "version",
- "tag": "v1.3.2",
- "commit": "c46fd7f63d446b048e9ffe5d5a3656f180478e16"
+ "tag": "v1.4.4",
+ "commit": "84fa91b8b28631336e3bb9a8108d3a04e76508d3"
},
- "_source": "git://github.com/2fdevs/bower-videogular-buffering.git",
- "_target": "~1.3.2",
+ "_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/bower.json b/www/lib/videogular-buffering/bower.json
index f445c8b0..37cd93f2 100644
--- a/www/lib/videogular-buffering/bower.json
+++ b/www/lib/videogular-buffering/bower.json
@@ -1,8 +1,8 @@
{
"name": "videogular-buffering",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "./vg-buffering.js",
"dependencies": {
- "videogular": "~1.3.2"
+ "videogular": "~1.4.4"
}
}
diff --git a/www/lib/videogular-buffering/index.js b/www/lib/videogular-buffering/index.js
index 1ee16a8e..7e031e16 100644
--- a/www/lib/videogular-buffering/index.js
+++ b/www/lib/videogular-buffering/index.js
@@ -1,3 +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
index 7d92b0d7..99c01209 100644
--- a/www/lib/videogular-buffering/package.json
+++ b/www/lib/videogular-buffering/package.json
@@ -1,7 +1,10 @@
{
"name": "videogular-buffering",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "index.js",
+ "dependencies": {
+ "videogular": "~1.4.4"
+ },
"devDependencies": {
"grunt": "~0.4.1",
"grunt-release": "~0.7.0"
diff --git a/www/lib/videogular-buffering/vg-buffering.js b/www/lib/videogular-buffering/vg-buffering.js
index fde9e839..4691fce1 100644
--- a/www/lib/videogular-buffering/vg-buffering.js
+++ b/www/lib/videogular-buffering/vg-buffering.js
@@ -1,5 +1,5 @@
/**
- * @license videogular v1.3.2 http://videogular.com
+ * @license videogular v1.4.4 http://videogular.com
* Two Fucking Developers http://twofuckingdevelopers.com
* License: MIT
*/
diff --git a/www/lib/videogular-controls/.bower.json b/www/lib/videogular-controls/.bower.json
index 363047f2..133d2a58 100644
--- a/www/lib/videogular-controls/.bower.json
+++ b/www/lib/videogular-controls/.bower.json
@@ -1,19 +1,19 @@
{
"name": "videogular-controls",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "./vg-controls.js",
"dependencies": {
- "videogular": "~1.3.2"
+ "videogular": "~1.4.4"
},
"homepage": "https://github.com/2fdevs/bower-videogular-controls",
- "_release": "1.3.2",
+ "_release": "1.4.4",
"_resolution": {
"type": "version",
- "tag": "v1.3.2",
- "commit": "6fa5a2cb079b995cca749573576eed82bddc3eb6"
+ "tag": "v1.4.4",
+ "commit": "07a9b7f3f4066016dcb5959da36232874d180358"
},
- "_source": "git://github.com/2fdevs/bower-videogular-controls.git",
- "_target": "~1.3.2",
+ "_source": "https://github.com/2fdevs/bower-videogular-controls.git",
+ "_target": "1.4.4",
"_originalSource": "videogular-controls",
"_direct": true
} \ No newline at end of file
diff --git a/www/lib/videogular-controls/bower.json b/www/lib/videogular-controls/bower.json
index 4cd2b307..91990ff5 100644
--- a/www/lib/videogular-controls/bower.json
+++ b/www/lib/videogular-controls/bower.json
@@ -1,8 +1,8 @@
{
"name": "videogular-controls",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "./vg-controls.js",
"dependencies": {
- "videogular": "~1.3.2"
+ "videogular": "~1.4.4"
}
}
diff --git a/www/lib/videogular-controls/index.js b/www/lib/videogular-controls/index.js
index 346eb418..7c75799a 100644
--- a/www/lib/videogular-controls/index.js
+++ b/www/lib/videogular-controls/index.js
@@ -1,3 +1,4 @@
+require('videogular');
require('./vg-controls');
module.exports = 'com.2fdevs.videogular.plugins.controls';
diff --git a/www/lib/videogular-controls/package.json b/www/lib/videogular-controls/package.json
index 195fa399..a5cc0b7a 100644
--- a/www/lib/videogular-controls/package.json
+++ b/www/lib/videogular-controls/package.json
@@ -1,7 +1,10 @@
{
"name": "videogular-controls",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "index.js",
+ "dependencies": {
+ "videogular": "~1.4.4"
+ },
"devDependencies": {
"grunt": "~0.4.1",
"grunt-release": "~0.7.0"
diff --git a/www/lib/videogular-controls/vg-controls.js b/www/lib/videogular-controls/vg-controls.js
index ef0efd9a..2c79e4bb 100644
--- a/www/lib/videogular-controls/vg-controls.js
+++ b/www/lib/videogular-controls/vg-controls.js
@@ -1,5 +1,5 @@
/**
- * @license videogular v1.3.2 http://videogular.com
+ * @license videogular v1.4.4 http://videogular.com
* Two Fucking Developers http://twofuckingdevelopers.com
* License: MIT
*/
@@ -108,7 +108,14 @@ angular.module("com.2fdevs.videogular.plugins.controls", [])
}
}
-
+ scope.$watch(
+ function () {
+ return API.currentState;
+ },
+ function (newVal, oldVal) {
+ if (scope.vgAutohide) scope.showControls();
+ }
+ );
}
}
}]
@@ -251,12 +258,13 @@ angular.module("com.2fdevs.videogular.plugins.controls")
* @description
* Directive to display a playback buttom to control the playback rate.
*
+ * @param {array} vgSpeeds Bindable array with a list of speed options as strings. Default ['0.5', '1', '1.5', '2']
* <pre>
* <videogular vg-theme="config.theme.url">
* <vg-media vg-src="sources"></vg-media>
*
* <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'>
- * <vg-playback-button></vg-playback-button>
+ * <vg-playback-button vg-speeds='config.playbackSpeeds'></vg-playback-button>
* </vg-controls>
* </videogular>
* </pre>
@@ -277,6 +285,9 @@ angular.module("com.2fdevs.videogular.plugins.controls")
templateUrl: function (elem, attrs) {
return attrs.vgTemplate || 'vg-templates/vg-playback-button';
},
+ scope: {
+ vgSpeeds: '=?'
+ },
link: function (scope, elem, attr, API) {
scope.playback = '1';
@@ -286,7 +297,7 @@ angular.module("com.2fdevs.videogular.plugins.controls")
};
scope.onClickPlayback = function onClickPlayback() {
- var playbackOptions = ['0.5', '1', '1.5', '2'];
+ var playbackOptions = scope.vgSpeeds || ['0.5', '1', '1.5', '2'];
var nextPlaybackRate = playbackOptions.indexOf(scope.playback.toString()) + 1;
if (nextPlaybackRate >= playbackOptions.length) {
@@ -313,6 +324,7 @@ angular.module("com.2fdevs.videogular.plugins.controls")
}
}]
);
+
/**
* @ngdoc directive
* @name com.2fdevs.videogular.plugins.controls.directive:vgScrubBarBuffer
@@ -385,67 +397,67 @@ angular.module("com.2fdevs.videogular.plugins.controls")
*
*/
angular.module("com.2fdevs.videogular.plugins.controls")
- .run(
- ["$templateCache", function ($templateCache) {
- $templateCache.put("vg-templates/vg-scrub-bar-cue-points",
- '<div class="cue-point-timeline" ng-style="timelineWidth">' +
- '<div ng-repeat="cuePoint in vgCuePoints" class="cue-point" ng-style="cuePoint.$$style"></div>' +
- '</div>');
- }]
-)
- .directive("vgScrubBarCuePoints",
- [function () {
- return {
- restrict: "E",
- require: "^videogular",
- templateUrl: function (elem, attrs) {
- return attrs.vgTemplate || 'vg-templates/vg-scrub-bar-cue-points';
- },
- scope: {
- "vgCuePoints": "="
- },
- link: function (scope, elem, attr, API) {
- scope.onPlayerReady = function onPlayerReady() {
- scope.updateCuePoints(scope.vgCuePoints);
- };
-
- scope.updateCuePoints = function onUpdateCuePoints(cuePoints) {
- var totalWidth;
-
- if (cuePoints) {
- totalWidth = parseInt(elem[0].clientWidth);
-
- for (var i = 0, l = cuePoints.length; i < l; i++) {
- var cuePointDuration = (cuePoints[i].timeLapse.end - cuePoints[i].timeLapse.start) * 1000;
- var position = (cuePoints[i].timeLapse.start * 100 / API.totalTime * 1000) + "%";
- var percentWidth = 0;
-
- if (typeof cuePointDuration === 'number' && API.totalTime) {
- percentWidth = ((cuePointDuration * 100) / API.totalTime) + "%";
+ .run(["$templateCache",
+ function ($templateCache) {
+ $templateCache.put("vg-templates/vg-scrub-bar-cue-points",
+ '<div class="cue-point-timeline">' +
+ '<div ng-repeat="cuePoint in vgCuePoints" class="cue-point" ng-style="cuePoint.$$style"></div>' +
+ '</div>');
+ }
+ ])
+ .directive("vgScrubBarCuePoints", [
+ function () {
+ return {
+ restrict: "E",
+ require: "^videogular",
+ templateUrl: function (elem, attrs) {
+ return attrs.vgTemplate || 'vg-templates/vg-scrub-bar-cue-points';
+ },
+ scope: {
+ "vgCuePoints": "="
+ },
+ link: function (scope, elem, attr, API) {
+ scope.onPlayerReady = function onPlayerReady() {
+ scope.updateCuePoints(scope.vgCuePoints);
+ };
+ scope.updateCuePoints = function onUpdateCuePoints(cuePoints) {
+ var totalWidth;
+
+ if (cuePoints) {
+ totalWidth = parseInt(elem[0].clientWidth);
+
+ for (var i = 0, l = cuePoints.length; i < l; i++) {
+ var end = (cuePoints[i].timeLapse.end >= 0) ? cuePoints[i].timeLapse.end : cuePoints[i].timeLapse.start + 1;
+ var cuePointDuration = (end - cuePoints[i].timeLapse.start) * 1000;
+ var position = (cuePoints[i].timeLapse.start * 100 / (Math.round(API.totalTime / 1000))) + "%";
+ var percentWidth = 0;
+
+ if (typeof cuePointDuration === 'number' && API.totalTime) {
+ percentWidth = ((cuePointDuration * 100) / API.totalTime) + "%";
+ }
+
+ cuePoints[i].$$style = {
+ width: percentWidth,
+ left: position
+ };
}
-
- cuePoints[i].$$style = {
- width: percentWidth,
- left: position
- };
}
- }
- };
+ };
- scope.$watch("vgCuePoints", scope.updateCuePoints);
+ scope.$watch("vgCuePoints", scope.updateCuePoints);
- scope.$watch(
- function () {
- return API.totalTime;
- },
- function (newVal, oldVal) {
- if (newVal > 0) scope.onPlayerReady();
- }
- );
+ scope.$watch(
+ function () {
+ return API.totalTime;
+ },
+ function (newVal, oldVal) {
+ if (newVal > 0) scope.onPlayerReady();
+ }
+ );
+ }
}
}
- }]
-);
+ ]);
/**
* @ngdoc directive
@@ -500,6 +512,240 @@ angular.module("com.2fdevs.videogular.plugins.controls")
/**
* @ngdoc directive
+ * @name com.2fdevs.videogular.plugins.controls.directive:vgScrubBarThumbnails
+ * @restrict E
+ * @description
+ * Layer inside vg-scrub-bar to display thumbnails.
+ *
+ * Param thumbnails could be a string url pointing to a strip of thumbnails or an array of objects with the same
+ * format that you can find in cue points.
+ *
+ * **Strip of thumbnails**
+ * Must be an image with exactly 100 thumbnails. Recommended size per each thumbnail 107x60
+ * Example of param value: "assets/images/strip-of-thumbnails.jpg"
+ *
+ * To create a strip of thumbnails you can use ffmpeg:
+ * ffmpeg -loglevel panic -y -i app/assets/videos/videogular.mp4 -frames 1 -q:v 1 -vf
+ * "select=not(mod(n\,29)),scale=-1:60,tile=100x1" app/assets/thumbnails/thumbnail.jpg
+ *
+ * **List of thumbnails**
+ * Array with a list of cue points as images. You can specify start or a lapse with start and end.
+ * Example of param value:
+ *
+ * [
+ * {
+ * "timeLapse": {
+ * "start": 5
+ * },
+ * params: {
+ * "thumbnail": "assets/thumbnails/thumbnail-shown-at-second-5.jpg"
+ * }
+ * },
+ * {
+ * "timeLapse": {
+ * "start": 49,
+ * "end": 60
+ * },
+ * "params": {
+ * "thumbnail": "assets/thumbnails/thumbnail-shown-between-seconds-49-and-60.jpg"
+ * }
+ * }
+ * ]
+ *
+ * <pre>
+ * <videogular vg-theme="config.theme.url">
+ * <vg-media vg-src="sources"></vg-media>
+ *
+ * <vg-controls>
+ * <vg-scrub-bar>
+ * <vg-scrub-bar-thumbnails vg-thumbnails='config.thumbnails'></vg-scrub-bar-thumbnails>
+ * </vg-scrub-bar>
+ * </vg-controls>
+ * </videogular>
+ * </pre>
+ *
+ */
+angular.module("com.2fdevs.videogular.plugins.controls")
+ .run(["$templateCache",
+ function ($templateCache) {
+ $templateCache.put("vg-templates/vg-scrub-bar-thumbnails",
+ '<div class="vg-thumbnails" ng-show="thumbnails" ng-style="thumbnailContainer">' +
+ '<div class="image-thumbnail" ng-style="thumbnails"></div>' +
+ '</div>' +
+ '<div class="background"></div>'
+ );
+ }
+ ])
+ .directive("vgScrubBarThumbnails", ["VG_UTILS",
+ function (VG_UTILS) {
+ return {
+ restrict: "E",
+ require: "^videogular",
+ templateUrl: function (elem, attrs) {
+ return attrs.vgTemplate || 'vg-templates/vg-scrub-bar-thumbnails';
+ },
+ scope: {
+ "vgThumbnails": "="
+ },
+ link: function (scope, elem, attr, API) {
+ var thumbnailsWidth = 0;
+ var thumbWidth = 0;
+ var slider = elem[0].querySelector(".background");
+ var isStrip = (typeof scope.vgThumbnails === "string");
+
+ scope.thumbnails = false;
+ scope.thumbnailContainer = {};
+
+ scope.getOffset = function getOffset(event) {
+ var el = event.target,
+ x = 0;
+
+ while (el && !isNaN(el.offsetLeft)) {
+ x += el.offsetLeft - el.scrollLeft;
+ el = el.offsetParent;
+ }
+
+ return event.clientX - x;
+ };
+
+ scope.onLoadThumbnails = function(event) {
+ thumbnailsWidth = event.currentTarget.naturalWidth;
+ thumbWidth = thumbnailsWidth / 100;
+ };
+
+ scope.onLoadThumbnail = function(event) {
+ thumbWidth = event.currentTarget.naturalWidth;
+ };
+
+ scope.updateThumbnails = function(second) {
+ var percentage = Math.round(second * 100 / (API.totalTime / 1000));
+ var thPos = (slider.scrollWidth * percentage / 100) - (thumbWidth / 2);
+
+ if (isStrip) {
+ var bgPos = Math.round(thumbnailsWidth * percentage / 100);
+
+ scope.thumbnailContainer = {
+ "width": thumbWidth + "px",
+ "left": thPos + "px"
+ };
+
+ scope.thumbnails = {
+ "background-image": 'url("' + scope.vgThumbnails + '")',
+ "background-position": -bgPos + "px 0px"
+ };
+ }
+ else {
+ var secondsByPixel = API.totalTime / slider.scrollWidth / 1000;
+ var lapse = {
+ start: Math.floor(second - (secondsByPixel / 2)),
+ end: Math.ceil(second)
+ };
+
+ if (lapse.start < 0) lapse.start = 0;
+ if (lapse.end > API.totalTime) lapse.end = API.totalTime;
+
+ scope.thumbnailContainer = {
+ "left": thPos + "px"
+ };
+
+ scope.thumbnails = {
+ "background-image": 'none'
+ };
+
+ if (scope.vgThumbnails) {
+ for (var i=0, l=scope.vgThumbnails.length; i<l; i++) {
+ var th = scope.vgThumbnails[i];
+
+ if (th.timeLapse.end >= 0) {
+ if (lapse.start >= th.timeLapse.start && (lapse.end <= th.timeLapse.end || lapse.end <= th.timeLapse.start)) {
+ scope.thumbnails = {
+ "background-image": 'url("' + th.params.thumbnail + '")'
+ };
+ break;
+ }
+ }
+ else {
+ if (th.timeLapse.start >= lapse.start && th.timeLapse.start <= lapse.end) {
+ scope.thumbnails = {
+ "background-image": 'url("' + th.params.thumbnail + '")'
+ };
+ break;
+ }
+ }
+ }
+ }
+ }
+ };
+
+ scope.onMouseMove = function($event) {
+ var second = Math.round($event.offsetX * API.mediaElement[0].duration / slider.scrollWidth);
+
+ scope.updateThumbnails(second);
+
+ scope.$digest();
+ };
+
+ scope.onTouchMove = function($event) {
+ var touches = $event.touches;
+ var touchX = scope.getOffset(touches[0]);
+ var second = Math.round(touchX * API.mediaElement[0].duration / slider.scrollWidth);
+
+ scope.updateThumbnails(second);
+
+ scope.$digest();
+ };
+
+ scope.onMouseLeave = function(event) {
+ scope.thumbnails = false;
+
+ scope.$digest();
+ };
+
+ scope.onTouchLeave = function(event) {
+ scope.thumbnails = false;
+
+ scope.$digest();
+ };
+
+ scope.onDestroy = function() {
+ elem.unbind("touchmove", scope.onTouchMove);
+ elem.unbind("touchleave", scope.onTouchLeave);
+ elem.unbind("touchend", scope.onTouchLeave);
+ elem.unbind("mousemove", scope.onMouseMove);
+ elem.unbind("mouseleave", scope.onMouseLeave);
+ };
+
+ var thLoader;
+ if (isStrip) {
+ thLoader = new Image();
+ thLoader.onload = scope.onLoadThumbnails.bind(scope);
+ thLoader.src = scope.vgThumbnails;
+ }
+ else {
+ thLoader = new Image();
+ thLoader.onload = scope.onLoadThumbnail.bind(scope);
+ thLoader.src = scope.vgThumbnails[0].params.thumbnail;
+ }
+
+ // Touch move is really buggy in Chrome for Android, maybe we could use mouse move that works ok
+ if (VG_UTILS.isMobileDevice()) {
+ elem.bind("touchmove", scope.onTouchMove);
+ elem.bind("touchleave", scope.onTouchLeave);
+ elem.bind("touchend", scope.onTouchLeave);
+ }
+ else {
+ elem.bind("mousemove", scope.onMouseMove);
+ elem.bind("mouseleave", scope.onMouseLeave);
+ }
+
+ scope.$on('destroy', scope.onDestroy.bind(scope));
+ }
+ }
+ }
+ ]);
+
+/**
+ * @ngdoc directive
* @name com.2fdevs.videogular.plugins.controls.directive:vgScrubBar
* @restrict E
* @description
@@ -518,187 +764,261 @@ angular.module("com.2fdevs.videogular.plugins.controls")
*
*/
angular.module("com.2fdevs.videogular.plugins.controls")
- .run(
- ["$templateCache", function ($templateCache) {
- $templateCache.put("vg-templates/vg-scrub-bar",
- '<div role="slider" aria-valuemax="{{ariaTime(API.totalTime)}}" aria-valuenow="{{ariaTime(API.currentTime)}}" aria-valuemin="0" aria-label="Time scrub bar" tabindex="0" ng-transclude ng-keydown="onScrubBarKeyDown($event)"></div>');
- }]
-)
- .directive("vgScrubBar",
- ["VG_STATES", "VG_UTILS", function (VG_STATES, VG_UTILS) {
- return {
- restrict: "E",
- require: "^videogular",
- transclude: true,
- templateUrl: function (elem, attrs) {
- return attrs.vgTemplate || 'vg-templates/vg-scrub-bar';
- },
- link: function (scope, elem, attr, API) {
- var isSeeking = false;
- var isPlaying = false;
- var isPlayingWhenSeeking = false;
- var LEFT = 37;
- var RIGHT = 39;
- var NUM_PERCENT = 5;
+ .run(["$templateCache",
+ function ($templateCache) {
+ $templateCache.put("vg-templates/vg-scrub-bar",
+ '<div role="slider" ' +
+ 'aria-valuemax="{{ariaTime(API.totalTime)}}" ' +
+ 'aria-valuenow="{{ariaTime(API.currentTime)}}" ' +
+ 'aria-valuemin="0" ' +
+ 'aria-label="Time scrub bar" ' +
+ 'tabindex="0" ' +
+ 'ng-keydown="onScrubBarKeyDown($event)">' +
+ '</div>' +
+ '<div class="container" ng-transclude></div>'
+ );
+ }]
+ )
+ .directive("vgScrubBar", ["VG_STATES", "VG_UTILS",
+ function (VG_STATES, VG_UTILS) {
+ return {
+ restrict: "E",
+ require: "^videogular",
+ transclude: true,
+ templateUrl: function (elem, attrs) {
+ return attrs.vgTemplate || 'vg-templates/vg-scrub-bar';
+ },
+ scope: {
+ vgThumbnails: "="
+ },
+ link: function (scope, elem, attr, API) {
+ var isSeeking = false;
+ var isPlaying = false;
+ var isPlayingWhenSeeking = false;
+ var LEFT = 37;
+ var RIGHT = 39;
+ var NUM_PERCENT = 5;
+ var thumbnailsWidth = 0;
+ var thumbWidth = 0;
+ var slider = elem[0].querySelector("div[role=slider]");
+
+ scope.thumbnails = false;
+ scope.thumbnailContainer = {};
+
+ scope.API = API;
+
+ scope.onLoadThumbnails = function(event) {
+ thumbnailsWidth = event.path[0].naturalWidth;
+ thumbWidth = thumbnailsWidth / 100;
+ };
+
+ scope.ariaTime = function (time) {
+ return Math.round(time / 1000);
+ };
+
+ scope.getOffset = function getOffset(event) {
+ var el = event.target,
+ x = 0;
+
+ while (el && !isNaN(el.offsetLeft)) {
+ x += el.offsetLeft - el.scrollLeft;
+ el = el.offsetParent;
+ }
- scope.API = API;
- scope.ariaTime = function (time) {
- return Math.round(time / 1000);
- };
+ return event.clientX - x;
+ };
- scope.getOffset = function getOffset(event) {
- var el = event.target,
- x = 0;
+ scope.onScrubBarTouchStart = function onScrubBarTouchStart($event) {
+ var event = $event.originalEvent || $event;
+ var touches = event.touches;
+ var touchX = scope.getOffset(touches[0]);
- while (el && !isNaN(el.offsetLeft)) {
- x += el.offsetLeft - el.scrollLeft;
- el = el.offsetParent;
- }
+ isSeeking = true;
+ if (isPlaying) isPlayingWhenSeeking = true;
+ API.pause();
+ API.seekTime(touchX * API.mediaElement[0].duration / slider.scrollWidth);
- return event.clientX - x;
- };
+ scope.$digest();
+ };
- scope.onScrubBarTouchStart = function onScrubBarTouchStart($event) {
- var event = $event.originalEvent || $event;
- var touches = event.touches;
- var touchX = scope.getOffset(touches[0]);
+ scope.onScrubBarTouchEnd = function onScrubBarTouchEnd($event) {
+ var event = $event.originalEvent || $event;
+ if (isPlayingWhenSeeking) {
+ isPlayingWhenSeeking = false;
+ API.play();
+ }
+ isSeeking = false;
- isSeeking = true;
- if (isPlaying) isPlayingWhenSeeking = true;
- API.pause();
- API.seekTime(touchX * API.mediaElement[0].duration / elem[0].scrollWidth);
+ scope.$digest();
+ };
- scope.$apply();
- };
+ scope.onScrubBarTouchMove = function onScrubBarTouchMove($event) {
+ var event = $event.originalEvent || $event;
+ var touches = event.touches;
+ var touchX = scope.getOffset(touches[0]);
- scope.onScrubBarTouchEnd = function onScrubBarTouchEnd($event) {
- var event = $event.originalEvent || $event;
- if (isPlayingWhenSeeking) {
- isPlayingWhenSeeking = false;
- API.play();
- }
- isSeeking = false;
+ if (scope.vgThumbnails && scope.vgThumbnails.length) {
+ var second = Math.round(touchX * API.mediaElement[0].duration / slider.scrollWidth);
+ var percentage = Math.round(second * 100 / (API.totalTime / 1000));
- scope.$apply();
- };
+ scope.updateThumbnails(percentage);
+ }
- scope.onScrubBarTouchMove = function onScrubBarTouchMove($event) {
- var event = $event.originalEvent || $event;
- var touches = event.touches;
- var touchX = scope.getOffset(touches[0]);
+ if (isSeeking) {
+ API.seekTime(touchX * API.mediaElement[0].duration / slider.scrollWidth);
+ }
- if (isSeeking) {
- API.seekTime(touchX * API.mediaElement[0].duration / elem[0].scrollWidth);
- }
+ scope.$digest();
+ };
- scope.$apply();
- };
+ scope.onScrubBarTouchLeave = function onScrubBarTouchLeave(event) {
+ isSeeking = false;
+ scope.thumbnails = false;
- scope.onScrubBarTouchLeave = function onScrubBarTouchLeave(event) {
- isSeeking = false;
+ scope.$digest();
+ };
- scope.$apply();
- };
+ scope.onScrubBarMouseDown = function onScrubBarMouseDown(event) {
+ event = VG_UTILS.fixEventOffset(event);
- scope.onScrubBarMouseDown = function onScrubBarMouseDown(event) {
- event = VG_UTILS.fixEventOffset(event);
+ isSeeking = true;
+ if (isPlaying) isPlayingWhenSeeking = true;
+ API.pause();
- isSeeking = true;
- if (isPlaying) isPlayingWhenSeeking = true;
- API.pause();
+ API.seekTime(event.offsetX * API.mediaElement[0].duration / slider.scrollWidth);
- API.seekTime(event.offsetX * API.mediaElement[0].duration / elem[0].scrollWidth);
+ scope.$digest();
+ };
- scope.$apply();
- };
+ scope.onScrubBarMouseUp = function onScrubBarMouseUp(event) {
+ //event = VG_UTILS.fixEventOffset(event);
- scope.onScrubBarMouseUp = function onScrubBarMouseUp(event) {
- //event = VG_UTILS.fixEventOffset(event);
+ if (isPlayingWhenSeeking) {
+ isPlayingWhenSeeking = false;
+ API.play();
+ }
+ isSeeking = false;
+ //API.seekTime(event.offsetX * API.mediaElement[0].duration / slider.scrollWidth);
- if (isPlayingWhenSeeking) {
- isPlayingWhenSeeking = false;
- API.play();
- }
- isSeeking = false;
- //API.seekTime(event.offsetX * API.mediaElement[0].duration / elem[0].scrollWidth);
+ scope.$digest();
+ };
- scope.$apply();
- };
+ scope.onScrubBarMouseMove = function onScrubBarMouseMove(event) {
+ if (scope.vgThumbnails && scope.vgThumbnails.length) {
+ var second = Math.round(event.offsetX * API.mediaElement[0].duration / slider.scrollWidth);
+ var percentage = Math.round(second * 100 / (API.totalTime / 1000));
- scope.onScrubBarMouseMove = function onScrubBarMouseMove(event) {
- if (isSeeking) {
- event = VG_UTILS.fixEventOffset(event);
- API.seekTime(event.offsetX * API.mediaElement[0].duration / elem[0].scrollWidth);
- }
+ scope.updateThumbnails(percentage);
+ }
- scope.$apply();
- };
+ if (isSeeking) {
+ event = VG_UTILS.fixEventOffset(event);
+ API.seekTime(event.offsetX * API.mediaElement[0].duration / slider.scrollWidth);
+ }
- scope.onScrubBarMouseLeave = function onScrubBarMouseLeave(event) {
- isSeeking = false;
+ scope.$digest();
+ };
- scope.$apply();
- };
+ scope.onScrubBarMouseLeave = function onScrubBarMouseLeave(event) {
+ isSeeking = false;
+ scope.thumbnails = false;
- scope.onScrubBarKeyDown = function onScrubBarKeyDown(event) {
- var currentPercent = (API.currentTime / API.totalTime) * 100;
+ scope.$digest();
+ };
- if (event.which === LEFT || event.keyCode === LEFT) {
- API.seekTime(currentPercent - NUM_PERCENT, true);
- event.preventDefault();
- }
- else if (event.which === RIGHT || event.keyCode === RIGHT) {
- API.seekTime(currentPercent + NUM_PERCENT, true);
- event.preventDefault();
- }
- };
+ scope.onScrubBarKeyDown = function onScrubBarKeyDown(event) {
+ var currentPercent = (API.currentTime / API.totalTime) * 100;
- scope.setState = function setState(newState) {
- if (!isSeeking) {
- switch (newState) {
- case VG_STATES.PLAY:
- isPlaying = true;
- break;
-
- case VG_STATES.PAUSE:
- isPlaying = false;
- break;
-
- case VG_STATES.STOP:
- isPlaying = false;
- break;
+ if (event.which === LEFT || event.keyCode === LEFT) {
+ API.seekTime(currentPercent - NUM_PERCENT, true);
+ event.preventDefault();
+ }
+ else if (event.which === RIGHT || event.keyCode === RIGHT) {
+ API.seekTime(currentPercent + NUM_PERCENT, true);
+ event.preventDefault();
+ }
+ };
+
+ scope.updateThumbnails = function updateThumbnails(percentage) {
+ var bgPos = Math.round(thumbnailsWidth * percentage / 100);
+ var thPos = (slider.scrollWidth * percentage / 100) - (thumbWidth / 2);
+
+ scope.thumbnailContainer = {
+ "width": thumbWidth + "px",
+ "left": thPos + "px"
+ };
+
+ scope.thumbnails = {
+ "background-image": 'url("' + scope.vgThumbnails + '")',
+ "background-position": -bgPos + "px 0px"
+ };
+ };
+
+ scope.setState = function setState(newState) {
+ if (!isSeeking) {
+ switch (newState) {
+ case VG_STATES.PLAY:
+ isPlaying = true;
+ break;
+
+ case VG_STATES.PAUSE:
+ isPlaying = false;
+ break;
+
+ case VG_STATES.STOP:
+ isPlaying = false;
+ break;
+ }
+ }
+ };
+
+ scope.onDestroy = function() {
+ elem.unbind("touchstart", scope.onScrubBarTouchStart);
+ elem.unbind("touchend", scope.onScrubBarTouchEnd);
+ elem.unbind("touchmove", scope.onScrubBarTouchMove);
+ elem.unbind("touchleave", scope.onScrubBarTouchLeave);
+ elem.unbind("mousedown", scope.onScrubBarMouseDown);
+ elem.unbind("mouseup", scope.onScrubBarMouseUp);
+ elem.unbind("mousemove", scope.onScrubBarMouseMove);
+ elem.unbind("mouseleave", scope.onScrubBarMouseLeave);
+ };
+
+ scope.$watch(
+ function () {
+ return API.currentState;
+ },
+ function (newVal, oldVal) {
+ if (newVal != oldVal) {
+ scope.setState(newVal);
+ }
}
+ );
+
+ if (scope.vgThumbnails) {
+ var thLoader = new Image();
+ thLoader.onload = scope.onLoadThumbnails.bind(scope);
+ thLoader.src = scope.vgThumbnails;
}
- };
- scope.$watch(
- function () {
- return API.currentState;
- },
- function (newVal, oldVal) {
- if (newVal != oldVal) {
- scope.setState(newVal);
- }
+ // Touch move is really buggy in Chrome for Android, maybe we could use mouse move that works ok
+ if (VG_UTILS.isMobileDevice()) {
+ elem.bind("touchstart", scope.onScrubBarTouchStart);
+ elem.bind("touchend", scope.onScrubBarTouchEnd);
+ elem.bind("touchmove", scope.onScrubBarTouchMove);
+ elem.bind("touchleave", scope.onScrubBarTouchLeave);
+ }
+ else {
+ elem.bind("mousedown", scope.onScrubBarMouseDown);
+ elem.bind("mouseup", scope.onScrubBarMouseUp);
+ elem.bind("mousemove", scope.onScrubBarMouseMove);
+ elem.bind("mouseleave", scope.onScrubBarMouseLeave);
}
- );
- // Touch move is really buggy in Chrome for Android, maybe we could use mouse move that works ok
- if (VG_UTILS.isMobileDevice()) {
- elem.bind("touchstart", scope.onScrubBarTouchStart);
- elem.bind("touchend", scope.onScrubBarTouchEnd);
- elem.bind("touchmove", scope.onScrubBarTouchMove);
- elem.bind("touchleave", scope.onScrubBarTouchLeave);
- }
- else {
- elem.bind("mousedown", scope.onScrubBarMouseDown);
- elem.bind("mouseup", scope.onScrubBarMouseUp);
- elem.bind("mousemove", scope.onScrubBarMouseMove);
- elem.bind("mouseleave", scope.onScrubBarMouseLeave);
+ scope.$on('destroy', scope.onDestroy.bind(scope));
}
}
}
- }]
-);
+ ]);
/**
* @ngdoc directive
@@ -799,7 +1119,7 @@ angular.module("com.2fdevs.videogular.plugins.controls")
.run(
["$templateCache", function ($templateCache) {
$templateCache.put("vg-templates/vg-mute-button",
- '<button type="button" class="iconButton" ng-class="muteIcon" ng-click="onClickMute()" ng-focus="onMuteButtonFocus()" ng-blur="onMuteButtonLoseFocus()" ng-keydown="onMuteButtonKeyDown($event)" aria-label="Mute"></button>');
+ '<button type="button" class="iconButton" ng-class="muteIcon" ng-click="onClickMute()" ng-focus="onMuteButtonFocus()" ng-blur="onMuteButtonLoseFocus()" ng-mouseleave="onMuteButtonLeave()" ng-keydown="onMuteButtonKeyDown($event)" aria-label="Mute"></button>');
}]
)
.directive("vgMuteButton",
@@ -838,6 +1158,10 @@ angular.module("com.2fdevs.videogular.plugins.controls")
scope.volumeVisibility = "hidden";
};
+ scope.onMuteButtonLeave = function onMuteButtonLeave() {
+ document.activeElement.blur();
+ };
+
scope.onMuteButtonKeyDown = function onMuteButtonKeyDown(event) {
var currentVolume = (API.volume != null) ? API.volume : 1;
var newVolume;
@@ -1061,6 +1385,11 @@ angular.module("com.2fdevs.videogular.plugins.controls")
});
};
+ scope.onDestroy = function() {
+ elem.unbind("mouseover", scope.onScrubBarTouchStart);
+ elem.unbind("mouseleave", scope.onScrubBarTouchEnd);
+ };
+
// We hide volume controls on mobile devices
if (VG_UTILS.isMobileDevice()) {
elem.css("display", "none");
@@ -1071,6 +1400,8 @@ angular.module("com.2fdevs.videogular.plugins.controls")
elem.bind("mouseover", scope.onMouseOverVolume);
elem.bind("mouseleave", scope.onMouseLeaveVolume);
}
+
+ scope.$on('destroy', scope.onDestroy.bind(scope));
}
}
}]
diff --git a/www/lib/videogular-controls/vg-controls.min.js b/www/lib/videogular-controls/vg-controls.min.js
index 07fa4c65..27d47e4a 100644
--- a/www/lib/videogular-controls/vg-controls.min.js
+++ b/www/lib/videogular-controls/vg-controls.min.js
@@ -1 +1 @@
-"use strict";angular.module("com.2fdevs.videogular.plugins.controls",[]).run(["$templateCache",function(a){a.put("vg-templates/vg-controls",'<div class="controls-container" ng-mousemove="onMouseMove()" ng-class="animationClass" ng-transclude></div>')}]).directive("vgControls",["$timeout","VG_STATES",function(a,b){return{restrict:"E",require:"^videogular",transclude:!0,templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-controls"},scope:{vgAutohide:"=?",vgAutohideTime:"=?"},link:function(c,d,e,f){var g,h=2e3;c.API=f,c.onMouseMove=function(){c.vgAutohide&&c.showControls()},c.setAutohide=function(d){d&&f.currentState==b.PLAY?g=a(c.hideControls,h):(c.animationClass="",a.cancel(g),c.showControls())},c.setAutohideTime=function(a){h=a},c.hideControls=function(){c.animationClass="hide-animation"},c.showControls=function(){c.animationClass="show-animation",a.cancel(g),c.vgAutohide&&f.currentState==b.PLAY&&(g=a(c.hideControls,h))},f.isConfig?c.$watch("API.config",function(){if(c.API.config){var a=c.API.config.plugins.controls.autohide||!1,b=c.API.config.plugins.controls.autohideTime||2e3;c.vgAutohide=a,c.vgAutohideTime=b,c.setAutohideTime(b),c.setAutohide(a)}}):(void 0!=c.vgAutohide&&c.$watch("vgAutohide",c.setAutohide),void 0!=c.vgAutohideTime&&c.$watch("vgAutohideTime",c.setAutohideTime))}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-fullscreen-button",'<button class="iconButton" ng-click="onClickFullScreen()" ng-class="fullscreenIcon" aria-label="Toggle full screen" type="button"> </button>')}]).directive("vgFullscreenButton",[function(){return{restrict:"E",require:"^videogular",scope:{},templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-fullscreen-button"},link:function(a,b,c,d){a.onChangeFullScreen=function(b){a.fullscreenIcon={enter:!b,exit:b}},a.onClickFullScreen=function(){d.toggleFullScreen()},a.fullscreenIcon={enter:!0},a.$watch(function(){return d.isFullScreen},function(b,c){b!=c&&a.onChangeFullScreen(b)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-play-pause-button",'<button class="iconButton" ng-click="onClickPlayPause()" ng-class="playPauseIcon" aria-label="Play/Pause" type="button"></button>')}]).directive("vgPlayPauseButton",["VG_STATES",function(a){return{restrict:"E",require:"^videogular",scope:{},templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-play-pause-button"},link:function(b,c,d,e){b.setState=function(c){switch(c){case a.PLAY:b.playPauseIcon={pause:!0};break;case a.PAUSE:b.playPauseIcon={play:!0};break;case a.STOP:b.playPauseIcon={play:!0}}},b.onClickPlayPause=function(){e.playPause()},b.playPauseIcon={play:!0},b.$watch(function(){return e.currentState},function(a,c){b.setState(a)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-playback-button",'<button class="playbackValue iconButton" ng-click="onClickPlayback()">{{playback}}x</button>')}]).directive("vgPlaybackButton",[function(){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-playback-button"},link:function(a,b,c,d){a.playback="1",a.setPlayback=function(b){a.playback=b,d.setPlayback(parseFloat(b))},a.onClickPlayback=function(){var b=["0.5","1","1.5","2"],c=b.indexOf(a.playback.toString())+1;c>=b.length?a.playback=b[0]:a.playback=b[c],a.setPlayback(a.playback)},a.$watch(function(){return d.playback},function(b,c){b!=c&&a.setPlayback(b)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").directive("vgScrubBarBuffer",[function(){return{restrict:"E",require:"^videogular",link:function(a,b,c,d){var e=0;a.onUpdateBuffer=function(a){"number"==typeof a&&d.totalTime?(e=100*(a/d.totalTime),b.css("width",e+"%")):b.css("width",0)},a.$watch(function(){return d.bufferEnd},function(b,c){a.onUpdateBuffer(b)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-scrub-bar-cue-points",'<div class="cue-point-timeline" ng-style="timelineWidth"><div ng-repeat="cuePoint in vgCuePoints" class="cue-point" ng-style="cuePoint.$$style"></div></div>')}]).directive("vgScrubBarCuePoints",[function(){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-scrub-bar-cue-points"},scope:{vgCuePoints:"="},link:function(a,b,c,d){a.onPlayerReady=function(){a.updateCuePoints(a.vgCuePoints)},a.updateCuePoints=function(a){var c;if(a){c=parseInt(b[0].clientWidth);for(var e=0,f=a.length;f>e;e++){var g=1e3*(a[e].timeLapse.end-a[e].timeLapse.start),h=100*a[e].timeLapse.start/d.totalTime*1e3+"%",i=0;"number"==typeof g&&d.totalTime&&(i=100*g/d.totalTime+"%"),a[e].$$style={width:i,left:h}}}},a.$watch("vgCuePoints",a.updateCuePoints),a.$watch(function(){return d.totalTime},function(b,c){b>0&&a.onPlayerReady()})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").directive("vgScrubBarCurrentTime",[function(){return{restrict:"E",require:"^videogular",link:function(a,b,c,d){var e=0;a.onUpdateTime=function(a){"number"==typeof a&&d.totalTime?(e=100*(a/d.totalTime),b.css("width",e+"%")):b.css("width",0)},a.$watch(function(){return d.currentTime},function(b,c){a.onUpdateTime(b)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-scrub-bar",'<div role="slider" aria-valuemax="{{ariaTime(API.totalTime)}}" aria-valuenow="{{ariaTime(API.currentTime)}}" aria-valuemin="0" aria-label="Time scrub bar" tabindex="0" ng-transclude ng-keydown="onScrubBarKeyDown($event)"></div>')}]).directive("vgScrubBar",["VG_STATES","VG_UTILS",function(a,b){return{restrict:"E",require:"^videogular",transclude:!0,templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-scrub-bar"},link:function(c,d,e,f){var g=!1,h=!1,i=!1,j=37,k=39,l=5;c.API=f,c.ariaTime=function(a){return Math.round(a/1e3)},c.getOffset=function(a){for(var b=a.target,c=0;b&&!isNaN(b.offsetLeft);)c+=b.offsetLeft-b.scrollLeft,b=b.offsetParent;return a.clientX-c},c.onScrubBarTouchStart=function(a){var b=a.originalEvent||a,e=b.touches,j=c.getOffset(e[0]);g=!0,h&&(i=!0),f.pause(),f.seekTime(j*f.mediaElement[0].duration/d[0].scrollWidth),c.$apply()},c.onScrubBarTouchEnd=function(a){a.originalEvent||a;i&&(i=!1,f.play()),g=!1,c.$apply()},c.onScrubBarTouchMove=function(a){var b=a.originalEvent||a,e=b.touches,h=c.getOffset(e[0]);g&&f.seekTime(h*f.mediaElement[0].duration/d[0].scrollWidth),c.$apply()},c.onScrubBarTouchLeave=function(a){g=!1,c.$apply()},c.onScrubBarMouseDown=function(a){a=b.fixEventOffset(a),g=!0,h&&(i=!0),f.pause(),f.seekTime(a.offsetX*f.mediaElement[0].duration/d[0].scrollWidth),c.$apply()},c.onScrubBarMouseUp=function(a){i&&(i=!1,f.play()),g=!1,c.$apply()},c.onScrubBarMouseMove=function(a){g&&(a=b.fixEventOffset(a),f.seekTime(a.offsetX*f.mediaElement[0].duration/d[0].scrollWidth)),c.$apply()},c.onScrubBarMouseLeave=function(a){g=!1,c.$apply()},c.onScrubBarKeyDown=function(a){var b=f.currentTime/f.totalTime*100;a.which===j||a.keyCode===j?(f.seekTime(b-l,!0),a.preventDefault()):(a.which===k||a.keyCode===k)&&(f.seekTime(b+l,!0),a.preventDefault())},c.setState=function(b){if(!g)switch(b){case a.PLAY:h=!0;break;case a.PAUSE:h=!1;break;case a.STOP:h=!1}},c.$watch(function(){return f.currentState},function(a,b){a!=b&&c.setState(a)}),b.isMobileDevice()?(d.bind("touchstart",c.onScrubBarTouchStart),d.bind("touchend",c.onScrubBarTouchEnd),d.bind("touchmove",c.onScrubBarTouchMove),d.bind("touchleave",c.onScrubBarTouchLeave)):(d.bind("mousedown",c.onScrubBarMouseDown),d.bind("mouseup",c.onScrubBarMouseUp),d.bind("mousemove",c.onScrubBarMouseMove),d.bind("mouseleave",c.onScrubBarMouseLeave))}}}]),angular.module("com.2fdevs.videogular.plugins.controls").directive("vgTimeDisplay",[function(){return{require:"^videogular",restrict:"E",link:function(a,b,c,d){a.currentTime=d.currentTime,a.timeLeft=d.timeLeft,a.totalTime=d.totalTime,a.isLive=d.isLive,a.$watch(function(){return d.currentTime},function(b,c){a.currentTime=b}),a.$watch(function(){return d.timeLeft},function(b,c){a.timeLeft=b}),a.$watch(function(){return d.totalTime},function(b,c){a.totalTime=b}),a.$watch(function(){return d.isLive},function(b,c){a.isLive=b})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-mute-button",'<button type="button" class="iconButton" ng-class="muteIcon" ng-click="onClickMute()" ng-focus="onMuteButtonFocus()" ng-blur="onMuteButtonLoseFocus()" ng-keydown="onMuteButtonKeyDown($event)" aria-label="Mute"></button>')}]).directive("vgMuteButton",[function(){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-mute-button"},link:function(a,b,c,d){var e=!1,f=38,g=40,h=.05;a.onClickMute=function(){e?a.currentVolume=a.defaultVolume:(a.currentVolume=0,a.muteIcon={mute:!0}),e=!e,d.setVolume(a.currentVolume)},a.onMuteButtonFocus=function(){a.volumeVisibility="visible"},a.onMuteButtonLoseFocus=function(){a.volumeVisibility="hidden"},a.onMuteButtonKeyDown=function(a){var b,c=null!=d.volume?d.volume:1;a.which===f||a.keyCode===f?(b=c+h,b>1&&(b=1),d.setVolume(b),a.preventDefault()):(a.which===g||a.keyCode===g)&&(b=c-h,0>b&&(b=0),d.setVolume(b),a.preventDefault())},a.onSetVolume=function(b){a.currentVolume=b,e=0===a.currentVolume,e?b>0&&(a.defaultVolume=b):a.defaultVolume=b;var c=Math.round(100*b);0==c?a.muteIcon={mute:!0}:c>0&&25>c?a.muteIcon={level0:!0}:c>=25&&50>c?a.muteIcon={level1:!0}:c>=50&&75>c?a.muteIcon={level2:!0}:c>=75&&(a.muteIcon={level3:!0})},a.defaultVolume=1,a.currentVolume=a.defaultVolume,a.muteIcon={level3:!0},a.onSetVolume(d.volume),a.$watch(function(){return d.volume},function(b,c){b!=c&&a.onSetVolume(b)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-volume-bar",'<div class="verticalVolumeBar"> <div class="volumeBackground" ng-click="onClickVolume($event)" ng-mousedown="onMouseDownVolume()" ng-mouseup="onMouseUpVolume()" ng-mousemove="onMouseMoveVolume($event)" ng-mouseleave="onMouseLeaveVolume()"> <div class="volumeValue"></div> <div class="volumeClickArea"></div> </div> </div>')}]).directive("vgVolumeBar",["VG_UTILS",function(a){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-volume-bar"},link:function(b,c,d,e){var f=!1,g=angular.element(c[0].getElementsByClassName("volumeBackground")),h=angular.element(c[0].getElementsByClassName("volumeValue"));b.onClickVolume=function(b){b=a.fixEventOffset(b);var c=parseInt(g.prop("offsetHeight")),d=100*b.offsetY/c,f=1-d/100;e.setVolume(f)},b.onMouseDownVolume=function(){f=!0},b.onMouseUpVolume=function(){f=!1},b.onMouseLeaveVolume=function(){f=!1},b.onMouseMoveVolume=function(b){if(f){b=a.fixEventOffset(b);var c=parseInt(g.prop("offsetHeight")),d=100*b.offsetY/c,h=1-d/100;e.setVolume(h)}},b.updateVolumeView=function(a){a=100*a,h.css("height",a+"%"),h.css("top",100-a+"%")},b.onChangeVisibility=function(a){c.css("visibility",a)},c.css("visibility",b.volumeVisibility),b.$watch("volumeVisibility",b.onChangeVisibility),b.updateVolumeView(e.volume),b.$watch(function(){return e.volume},function(a,c){a!=c&&b.updateVolumeView(a)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").directive("vgVolume",["VG_UTILS",function(a){return{restrict:"E",link:function(b,c,d){b.onMouseOverVolume=function(){b.$evalAsync(function(){b.volumeVisibility="visible"})},b.onMouseLeaveVolume=function(){b.$evalAsync(function(){b.volumeVisibility="hidden"})},a.isMobileDevice()?c.css("display","none"):(b.volumeVisibility="hidden",c.bind("mouseover",b.onMouseOverVolume),c.bind("mouseleave",b.onMouseLeaveVolume))}}}]); \ No newline at end of file
+"use strict";angular.module("com.2fdevs.videogular.plugins.controls",[]).run(["$templateCache",function(a){a.put("vg-templates/vg-controls",'<div class="controls-container" ng-mousemove="onMouseMove()" ng-class="animationClass" ng-transclude></div>')}]).directive("vgControls",["$timeout","VG_STATES",function(a,b){return{restrict:"E",require:"^videogular",transclude:!0,templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-controls"},scope:{vgAutohide:"=?",vgAutohideTime:"=?"},link:function(c,d,e,f){var g,h=2e3;c.API=f,c.onMouseMove=function(){c.vgAutohide&&c.showControls()},c.setAutohide=function(d){d&&f.currentState==b.PLAY?g=a(c.hideControls,h):(c.animationClass="",a.cancel(g),c.showControls())},c.setAutohideTime=function(a){h=a},c.hideControls=function(){c.animationClass="hide-animation"},c.showControls=function(){c.animationClass="show-animation",a.cancel(g),c.vgAutohide&&f.currentState==b.PLAY&&(g=a(c.hideControls,h))},f.isConfig?c.$watch("API.config",function(){if(c.API.config){var a=c.API.config.plugins.controls.autohide||!1,b=c.API.config.plugins.controls.autohideTime||2e3;c.vgAutohide=a,c.vgAutohideTime=b,c.setAutohideTime(b),c.setAutohide(a)}}):(void 0!=c.vgAutohide&&c.$watch("vgAutohide",c.setAutohide),void 0!=c.vgAutohideTime&&c.$watch("vgAutohideTime",c.setAutohideTime)),c.$watch(function(){return f.currentState},function(a,b){c.vgAutohide&&c.showControls()})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-fullscreen-button",'<button class="iconButton" ng-click="onClickFullScreen()" ng-class="fullscreenIcon" aria-label="Toggle full screen" type="button"> </button>')}]).directive("vgFullscreenButton",[function(){return{restrict:"E",require:"^videogular",scope:{},templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-fullscreen-button"},link:function(a,b,c,d){a.onChangeFullScreen=function(b){a.fullscreenIcon={enter:!b,exit:b}},a.onClickFullScreen=function(){d.toggleFullScreen()},a.fullscreenIcon={enter:!0},a.$watch(function(){return d.isFullScreen},function(b,c){b!=c&&a.onChangeFullScreen(b)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-play-pause-button",'<button class="iconButton" ng-click="onClickPlayPause()" ng-class="playPauseIcon" aria-label="Play/Pause" type="button"></button>')}]).directive("vgPlayPauseButton",["VG_STATES",function(a){return{restrict:"E",require:"^videogular",scope:{},templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-play-pause-button"},link:function(b,c,d,e){b.setState=function(c){switch(c){case a.PLAY:b.playPauseIcon={pause:!0};break;case a.PAUSE:b.playPauseIcon={play:!0};break;case a.STOP:b.playPauseIcon={play:!0}}},b.onClickPlayPause=function(){e.playPause()},b.playPauseIcon={play:!0},b.$watch(function(){return e.currentState},function(a,c){b.setState(a)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-playback-button",'<button class="playbackValue iconButton" ng-click="onClickPlayback()">{{playback}}x</button>')}]).directive("vgPlaybackButton",[function(){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-playback-button"},scope:{vgSpeeds:"=?"},link:function(a,b,c,d){a.playback="1",a.setPlayback=function(b){a.playback=b,d.setPlayback(parseFloat(b))},a.onClickPlayback=function(){var b=a.vgSpeeds||["0.5","1","1.5","2"],c=b.indexOf(a.playback.toString())+1;c>=b.length?a.playback=b[0]:a.playback=b[c],a.setPlayback(a.playback)},a.$watch(function(){return d.playback},function(b,c){b!=c&&a.setPlayback(b)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").directive("vgScrubBarBuffer",[function(){return{restrict:"E",require:"^videogular",link:function(a,b,c,d){var e=0;a.onUpdateBuffer=function(a){"number"==typeof a&&d.totalTime?(e=100*(a/d.totalTime),b.css("width",e+"%")):b.css("width",0)},a.$watch(function(){return d.bufferEnd},function(b,c){a.onUpdateBuffer(b)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-scrub-bar-cue-points",'<div class="cue-point-timeline"><div ng-repeat="cuePoint in vgCuePoints" class="cue-point" ng-style="cuePoint.$$style"></div></div>')}]).directive("vgScrubBarCuePoints",[function(){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-scrub-bar-cue-points"},scope:{vgCuePoints:"="},link:function(a,b,c,d){a.onPlayerReady=function(){a.updateCuePoints(a.vgCuePoints)},a.updateCuePoints=function(a){var c;if(a){c=parseInt(b[0].clientWidth);for(var e=0,f=a.length;f>e;e++){var g=a[e].timeLapse.end>=0?a[e].timeLapse.end:a[e].timeLapse.start+1,h=1e3*(g-a[e].timeLapse.start),i=100*a[e].timeLapse.start/Math.round(d.totalTime/1e3)+"%",j=0;"number"==typeof h&&d.totalTime&&(j=100*h/d.totalTime+"%"),a[e].$$style={width:j,left:i}}}},a.$watch("vgCuePoints",a.updateCuePoints),a.$watch(function(){return d.totalTime},function(b,c){b>0&&a.onPlayerReady()})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").directive("vgScrubBarCurrentTime",[function(){return{restrict:"E",require:"^videogular",link:function(a,b,c,d){var e=0;a.onUpdateTime=function(a){"number"==typeof a&&d.totalTime?(e=100*(a/d.totalTime),b.css("width",e+"%")):b.css("width",0)},a.$watch(function(){return d.currentTime},function(b,c){a.onUpdateTime(b)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-scrub-bar-thumbnails",'<div class="vg-thumbnails" ng-show="thumbnails" ng-style="thumbnailContainer"><div class="image-thumbnail" ng-style="thumbnails"></div></div><div class="background"></div>')}]).directive("vgScrubBarThumbnails",["VG_UTILS",function(a){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-scrub-bar-thumbnails"},scope:{vgThumbnails:"="},link:function(b,c,d,e){var f=0,g=0,h=c[0].querySelector(".background"),i="string"==typeof b.vgThumbnails;b.thumbnails=!1,b.thumbnailContainer={},b.getOffset=function(a){for(var b=a.target,c=0;b&&!isNaN(b.offsetLeft);)c+=b.offsetLeft-b.scrollLeft,b=b.offsetParent;return a.clientX-c},b.onLoadThumbnails=function(a){f=a.currentTarget.naturalWidth,g=f/100},b.onLoadThumbnail=function(a){g=a.currentTarget.naturalWidth},b.updateThumbnails=function(a){var c=Math.round(100*a/(e.totalTime/1e3)),d=h.scrollWidth*c/100-g/2;if(i){var j=Math.round(f*c/100);b.thumbnailContainer={width:g+"px",left:d+"px"},b.thumbnails={"background-image":'url("'+b.vgThumbnails+'")',"background-position":-j+"px 0px"}}else{var k=e.totalTime/h.scrollWidth/1e3,l={start:Math.floor(a-k/2),end:Math.ceil(a)};if(l.start<0&&(l.start=0),l.end>e.totalTime&&(l.end=e.totalTime),b.thumbnailContainer={left:d+"px"},b.thumbnails={"background-image":"none"},b.vgThumbnails)for(var m=0,n=b.vgThumbnails.length;n>m;m++){var o=b.vgThumbnails[m];if(o.timeLapse.end>=0){if(l.start>=o.timeLapse.start&&(l.end<=o.timeLapse.end||l.end<=o.timeLapse.start)){b.thumbnails={"background-image":'url("'+o.params.thumbnail+'")'};break}}else if(o.timeLapse.start>=l.start&&o.timeLapse.start<=l.end){b.thumbnails={"background-image":'url("'+o.params.thumbnail+'")'};break}}}},b.onMouseMove=function(a){var c=Math.round(a.offsetX*e.mediaElement[0].duration/h.scrollWidth);b.updateThumbnails(c),b.$digest()},b.onTouchMove=function(a){var c=a.touches,d=b.getOffset(c[0]),f=Math.round(d*e.mediaElement[0].duration/h.scrollWidth);b.updateThumbnails(f),b.$digest()},b.onMouseLeave=function(a){b.thumbnails=!1,b.$digest()},b.onTouchLeave=function(a){b.thumbnails=!1,b.$digest()},b.onDestroy=function(){c.unbind("touchmove",b.onTouchMove),c.unbind("touchleave",b.onTouchLeave),c.unbind("touchend",b.onTouchLeave),c.unbind("mousemove",b.onMouseMove),c.unbind("mouseleave",b.onMouseLeave)};var j;i?(j=new Image,j.onload=b.onLoadThumbnails.bind(b),j.src=b.vgThumbnails):(j=new Image,j.onload=b.onLoadThumbnail.bind(b),j.src=b.vgThumbnails[0].params.thumbnail),a.isMobileDevice()?(c.bind("touchmove",b.onTouchMove),c.bind("touchleave",b.onTouchLeave),c.bind("touchend",b.onTouchLeave)):(c.bind("mousemove",b.onMouseMove),c.bind("mouseleave",b.onMouseLeave)),b.$on("destroy",b.onDestroy.bind(b))}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-scrub-bar",'<div role="slider" aria-valuemax="{{ariaTime(API.totalTime)}}" aria-valuenow="{{ariaTime(API.currentTime)}}" aria-valuemin="0" aria-label="Time scrub bar" tabindex="0" ng-keydown="onScrubBarKeyDown($event)"></div><div class="container" ng-transclude></div>')}]).directive("vgScrubBar",["VG_STATES","VG_UTILS",function(a,b){return{restrict:"E",require:"^videogular",transclude:!0,templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-scrub-bar"},scope:{vgThumbnails:"="},link:function(c,d,e,f){var g=!1,h=!1,i=!1,j=37,k=39,l=5,m=0,n=0,o=d[0].querySelector("div[role=slider]");if(c.thumbnails=!1,c.thumbnailContainer={},c.API=f,c.onLoadThumbnails=function(a){m=a.path[0].naturalWidth,n=m/100},c.ariaTime=function(a){return Math.round(a/1e3)},c.getOffset=function(a){for(var b=a.target,c=0;b&&!isNaN(b.offsetLeft);)c+=b.offsetLeft-b.scrollLeft,b=b.offsetParent;return a.clientX-c},c.onScrubBarTouchStart=function(a){var b=a.originalEvent||a,d=b.touches,e=c.getOffset(d[0]);g=!0,h&&(i=!0),f.pause(),f.seekTime(e*f.mediaElement[0].duration/o.scrollWidth),c.$digest()},c.onScrubBarTouchEnd=function(a){a.originalEvent||a;i&&(i=!1,f.play()),g=!1,c.$digest()},c.onScrubBarTouchMove=function(a){var b=a.originalEvent||a,d=b.touches,e=c.getOffset(d[0]);if(c.vgThumbnails&&c.vgThumbnails.length){var h=Math.round(e*f.mediaElement[0].duration/o.scrollWidth),i=Math.round(100*h/(f.totalTime/1e3));c.updateThumbnails(i)}g&&f.seekTime(e*f.mediaElement[0].duration/o.scrollWidth),c.$digest()},c.onScrubBarTouchLeave=function(a){g=!1,c.thumbnails=!1,c.$digest()},c.onScrubBarMouseDown=function(a){a=b.fixEventOffset(a),g=!0,h&&(i=!0),f.pause(),f.seekTime(a.offsetX*f.mediaElement[0].duration/o.scrollWidth),c.$digest()},c.onScrubBarMouseUp=function(a){i&&(i=!1,f.play()),g=!1,c.$digest()},c.onScrubBarMouseMove=function(a){if(c.vgThumbnails&&c.vgThumbnails.length){var d=Math.round(a.offsetX*f.mediaElement[0].duration/o.scrollWidth),e=Math.round(100*d/(f.totalTime/1e3));c.updateThumbnails(e)}g&&(a=b.fixEventOffset(a),f.seekTime(a.offsetX*f.mediaElement[0].duration/o.scrollWidth)),c.$digest()},c.onScrubBarMouseLeave=function(a){g=!1,c.thumbnails=!1,c.$digest()},c.onScrubBarKeyDown=function(a){var b=f.currentTime/f.totalTime*100;a.which===j||a.keyCode===j?(f.seekTime(b-l,!0),a.preventDefault()):(a.which===k||a.keyCode===k)&&(f.seekTime(b+l,!0),a.preventDefault())},c.updateThumbnails=function(a){var b=Math.round(m*a/100),d=o.scrollWidth*a/100-n/2;c.thumbnailContainer={width:n+"px",left:d+"px"},c.thumbnails={"background-image":'url("'+c.vgThumbnails+'")',"background-position":-b+"px 0px"}},c.setState=function(b){if(!g)switch(b){case a.PLAY:h=!0;break;case a.PAUSE:h=!1;break;case a.STOP:h=!1}},c.onDestroy=function(){d.unbind("touchstart",c.onScrubBarTouchStart),d.unbind("touchend",c.onScrubBarTouchEnd),d.unbind("touchmove",c.onScrubBarTouchMove),d.unbind("touchleave",c.onScrubBarTouchLeave),d.unbind("mousedown",c.onScrubBarMouseDown),d.unbind("mouseup",c.onScrubBarMouseUp),d.unbind("mousemove",c.onScrubBarMouseMove),d.unbind("mouseleave",c.onScrubBarMouseLeave)},c.$watch(function(){return f.currentState},function(a,b){a!=b&&c.setState(a)}),c.vgThumbnails){var p=new Image;p.onload=c.onLoadThumbnails.bind(c),p.src=c.vgThumbnails}b.isMobileDevice()?(d.bind("touchstart",c.onScrubBarTouchStart),d.bind("touchend",c.onScrubBarTouchEnd),d.bind("touchmove",c.onScrubBarTouchMove),d.bind("touchleave",c.onScrubBarTouchLeave)):(d.bind("mousedown",c.onScrubBarMouseDown),d.bind("mouseup",c.onScrubBarMouseUp),d.bind("mousemove",c.onScrubBarMouseMove),d.bind("mouseleave",c.onScrubBarMouseLeave)),c.$on("destroy",c.onDestroy.bind(c))}}}]),angular.module("com.2fdevs.videogular.plugins.controls").directive("vgTimeDisplay",[function(){return{require:"^videogular",restrict:"E",link:function(a,b,c,d){a.currentTime=d.currentTime,a.timeLeft=d.timeLeft,a.totalTime=d.totalTime,a.isLive=d.isLive,a.$watch(function(){return d.currentTime},function(b,c){a.currentTime=b}),a.$watch(function(){return d.timeLeft},function(b,c){a.timeLeft=b}),a.$watch(function(){return d.totalTime},function(b,c){a.totalTime=b}),a.$watch(function(){return d.isLive},function(b,c){a.isLive=b})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-mute-button",'<button type="button" class="iconButton" ng-class="muteIcon" ng-click="onClickMute()" ng-focus="onMuteButtonFocus()" ng-blur="onMuteButtonLoseFocus()" ng-mouseleave="onMuteButtonLeave()" ng-keydown="onMuteButtonKeyDown($event)" aria-label="Mute"></button>')}]).directive("vgMuteButton",[function(){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-mute-button"},link:function(a,b,c,d){var e=!1,f=38,g=40,h=.05;a.onClickMute=function(){e?a.currentVolume=a.defaultVolume:(a.currentVolume=0,a.muteIcon={mute:!0}),e=!e,d.setVolume(a.currentVolume)},a.onMuteButtonFocus=function(){a.volumeVisibility="visible"},a.onMuteButtonLoseFocus=function(){a.volumeVisibility="hidden"},a.onMuteButtonLeave=function(){document.activeElement.blur()},a.onMuteButtonKeyDown=function(a){var b,c=null!=d.volume?d.volume:1;a.which===f||a.keyCode===f?(b=c+h,b>1&&(b=1),d.setVolume(b),a.preventDefault()):(a.which===g||a.keyCode===g)&&(b=c-h,0>b&&(b=0),d.setVolume(b),a.preventDefault())},a.onSetVolume=function(b){a.currentVolume=b,e=0===a.currentVolume,e?b>0&&(a.defaultVolume=b):a.defaultVolume=b;var c=Math.round(100*b);0==c?a.muteIcon={mute:!0}:c>0&&25>c?a.muteIcon={level0:!0}:c>=25&&50>c?a.muteIcon={level1:!0}:c>=50&&75>c?a.muteIcon={level2:!0}:c>=75&&(a.muteIcon={level3:!0})},a.defaultVolume=1,a.currentVolume=a.defaultVolume,a.muteIcon={level3:!0},a.onSetVolume(d.volume),a.$watch(function(){return d.volume},function(b,c){b!=c&&a.onSetVolume(b)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").run(["$templateCache",function(a){a.put("vg-templates/vg-volume-bar",'<div class="verticalVolumeBar"> <div class="volumeBackground" ng-click="onClickVolume($event)" ng-mousedown="onMouseDownVolume()" ng-mouseup="onMouseUpVolume()" ng-mousemove="onMouseMoveVolume($event)" ng-mouseleave="onMouseLeaveVolume()"> <div class="volumeValue"></div> <div class="volumeClickArea"></div> </div> </div>')}]).directive("vgVolumeBar",["VG_UTILS",function(a){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-volume-bar"},link:function(b,c,d,e){var f=!1,g=angular.element(c[0].getElementsByClassName("volumeBackground")),h=angular.element(c[0].getElementsByClassName("volumeValue"));b.onClickVolume=function(b){b=a.fixEventOffset(b);var c=parseInt(g.prop("offsetHeight")),d=100*b.offsetY/c,f=1-d/100;e.setVolume(f)},b.onMouseDownVolume=function(){f=!0},b.onMouseUpVolume=function(){f=!1},b.onMouseLeaveVolume=function(){f=!1},b.onMouseMoveVolume=function(b){if(f){b=a.fixEventOffset(b);var c=parseInt(g.prop("offsetHeight")),d=100*b.offsetY/c,h=1-d/100;e.setVolume(h)}},b.updateVolumeView=function(a){a=100*a,h.css("height",a+"%"),h.css("top",100-a+"%")},b.onChangeVisibility=function(a){c.css("visibility",a)},c.css("visibility",b.volumeVisibility),b.$watch("volumeVisibility",b.onChangeVisibility),b.updateVolumeView(e.volume),b.$watch(function(){return e.volume},function(a,c){a!=c&&b.updateVolumeView(a)})}}}]),angular.module("com.2fdevs.videogular.plugins.controls").directive("vgVolume",["VG_UTILS",function(a){return{restrict:"E",link:function(b,c,d){b.onMouseOverVolume=function(){b.$evalAsync(function(){b.volumeVisibility="visible"})},b.onMouseLeaveVolume=function(){b.$evalAsync(function(){b.volumeVisibility="hidden"})},b.onDestroy=function(){c.unbind("mouseover",b.onScrubBarTouchStart),c.unbind("mouseleave",b.onScrubBarTouchEnd)},a.isMobileDevice()?c.css("display","none"):(b.volumeVisibility="hidden",c.bind("mouseover",b.onMouseOverVolume),c.bind("mouseleave",b.onMouseLeaveVolume)),b.$on("destroy",b.onDestroy.bind(b))}}}]); \ No newline at end of file
diff --git a/www/lib/videogular-overlay-play/.bower.json b/www/lib/videogular-overlay-play/.bower.json
index 22c499fd..1da28605 100644
--- a/www/lib/videogular-overlay-play/.bower.json
+++ b/www/lib/videogular-overlay-play/.bower.json
@@ -1,19 +1,19 @@
{
"name": "videogular-overlay-play",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "./vg-overlay-play.js",
"dependencies": {
- "videogular": "~1.3.2"
+ "videogular": "~1.4.4"
},
"homepage": "https://github.com/2fdevs/bower-videogular-overlay-play",
- "_release": "1.3.2",
+ "_release": "1.4.4",
"_resolution": {
"type": "version",
- "tag": "v1.3.2",
- "commit": "8c68babdf2ad165be19983656a6dae4c4c0d9b21"
+ "tag": "v1.4.4",
+ "commit": "a1971c17fbd78b13b165411f007b640b9bb584db"
},
- "_source": "git://github.com/2fdevs/bower-videogular-overlay-play.git",
- "_target": "~1.3.2",
+ "_source": "https://github.com/2fdevs/bower-videogular-overlay-play.git",
+ "_target": "1.4.4",
"_originalSource": "videogular-overlay-play",
"_direct": true
} \ No newline at end of file
diff --git a/www/lib/videogular-overlay-play/bower.json b/www/lib/videogular-overlay-play/bower.json
index 32166c2f..dfc4493f 100644
--- a/www/lib/videogular-overlay-play/bower.json
+++ b/www/lib/videogular-overlay-play/bower.json
@@ -1,8 +1,8 @@
{
"name": "videogular-overlay-play",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "./vg-overlay-play.js",
"dependencies": {
- "videogular": "~1.3.2"
+ "videogular": "~1.4.4"
}
}
diff --git a/www/lib/videogular-overlay-play/index.js b/www/lib/videogular-overlay-play/index.js
index fe6e0b39..bbdb3c91 100644
--- a/www/lib/videogular-overlay-play/index.js
+++ b/www/lib/videogular-overlay-play/index.js
@@ -1,3 +1,4 @@
+require('videogular');
require('./vg-overlay-play');
module.exports = 'com.2fdevs.videogular.plugins.overlayplay';
diff --git a/www/lib/videogular-overlay-play/package.json b/www/lib/videogular-overlay-play/package.json
index 8a0202b5..01c55547 100644
--- a/www/lib/videogular-overlay-play/package.json
+++ b/www/lib/videogular-overlay-play/package.json
@@ -1,7 +1,10 @@
{
"name": "videogular-overlay-play",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "index.js",
+ "dependencies": {
+ "videogular": "~1.4.4"
+ },
"devDependencies": {
"grunt": "~0.4.1",
"grunt-release": "~0.7.0"
diff --git a/www/lib/videogular-overlay-play/vg-overlay-play.js b/www/lib/videogular-overlay-play/vg-overlay-play.js
index a5142f07..1cf2cc35 100644
--- a/www/lib/videogular-overlay-play/vg-overlay-play.js
+++ b/www/lib/videogular-overlay-play/vg-overlay-play.js
@@ -1,5 +1,5 @@
/**
- * @license videogular v1.3.2 http://videogular.com
+ * @license videogular v1.4.4 http://videogular.com
* Two Fucking Developers http://twofuckingdevelopers.com
* License: MIT
*/
@@ -22,56 +22,55 @@
"use strict";
angular.module("com.2fdevs.videogular.plugins.overlayplay", [])
.run(
- ["$templateCache", function ($templateCache) {
- $templateCache.put("vg-templates/vg-overlay-play",
- '<div class="overlayPlayContainer" ng-click="onClickOverlayPlay()">\
- <div class="iconButton" ng-class="overlayPlayIcon"></div>\
- </div>');
- }]
-)
- .directive(
- "vgOverlayPlay",
- ["VG_STATES", function (VG_STATES) {
- return {
- restrict: "E",
- require: "^videogular",
- scope: {},
- templateUrl: function (elem, attrs) {
- return attrs.vgTemplate || 'vg-templates/vg-overlay-play';
- },
- link: function (scope, elem, attr, API) {
- scope.onChangeState = function onChangeState(newState) {
- switch (newState) {
- case VG_STATES.PLAY:
- scope.overlayPlayIcon = {};
- break;
+ ["$templateCache", function ($templateCache) {
+ $templateCache.put("vg-templates/vg-overlay-play",
+ '<div class="overlayPlayContainer" ng-click="onClickOverlayPlay()">\
+ <div class="iconButton" ng-class="overlayPlayIcon"></div>\
+ </div>');
+ }]
+ )
+ .directive("vgOverlayPlay", ["VG_STATES",
+ function (VG_STATES) {
+ return {
+ restrict: "E",
+ require: "^videogular",
+ scope: {},
+ templateUrl: function (elem, attrs) {
+ return attrs.vgTemplate || 'vg-templates/vg-overlay-play';
+ },
+ link: function (scope, elem, attr, API) {
+ scope.onChangeState = function onChangeState(newState) {
+ switch (newState) {
+ case VG_STATES.PLAY:
+ scope.overlayPlayIcon = {};
+ break;
- case VG_STATES.PAUSE:
- scope.overlayPlayIcon = {play: true};
- break;
+ case VG_STATES.PAUSE:
+ scope.overlayPlayIcon = {play: true};
+ break;
- case VG_STATES.STOP:
- scope.overlayPlayIcon = {play: true};
- break;
- }
- };
+ case VG_STATES.STOP:
+ scope.overlayPlayIcon = {play: true};
+ break;
+ }
+ };
- scope.onClickOverlayPlay = function onClickOverlayPlay(event) {
- API.playPause();
- };
+ scope.onClickOverlayPlay = function onClickOverlayPlay(event) {
+ API.playPause();
+ };
- scope.overlayPlayIcon = {play: true};
+ scope.overlayPlayIcon = {play: true};
- scope.$watch(
- function () {
- return API.currentState;
- },
- function (newVal, oldVal) {
- scope.onChangeState(newVal);
- }
- );
+ scope.$watch(
+ function () {
+ return API.currentState;
+ },
+ function (newVal, oldVal) {
+ scope.onChangeState(newVal);
+ }
+ );
+ }
}
}
- }
]);
diff --git a/www/lib/videogular-overlay-play/vg-overlay-play.min.js b/www/lib/videogular-overlay-play/vg-overlay-play.min.js
index 31a59c8a..8683a621 100644
--- a/www/lib/videogular-overlay-play/vg-overlay-play.min.js
+++ b/www/lib/videogular-overlay-play/vg-overlay-play.min.js
@@ -1 +1 @@
-"use strict";angular.module("com.2fdevs.videogular.plugins.overlayplay",[]).run(["$templateCache",function(a){a.put("vg-templates/vg-overlay-play",'<div class="overlayPlayContainer" ng-click="onClickOverlayPlay()"> <div class="iconButton" ng-class="overlayPlayIcon"></div> </div>')}]).directive("vgOverlayPlay",["VG_STATES",function(a){return{restrict:"E",require:"^videogular",scope:{},templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-overlay-play"},link:function(b,c,d,e){b.onChangeState=function(c){switch(c){case a.PLAY:b.overlayPlayIcon={};break;case a.PAUSE:b.overlayPlayIcon={play:!0};break;case a.STOP:b.overlayPlayIcon={play:!0}}},b.onClickOverlayPlay=function(a){e.playPause()},b.overlayPlayIcon={play:!0},b.$watch(function(){return e.currentState},function(a,c){b.onChangeState(a)})}}}]); \ No newline at end of file
+"use strict";angular.module("com.2fdevs.videogular.plugins.overlayplay",[]).run(["$templateCache",function(a){a.put("vg-templates/vg-overlay-play",'<div class="overlayPlayContainer" ng-click="onClickOverlayPlay()"> <div class="iconButton" ng-class="overlayPlayIcon"></div> </div>')}]).directive("vgOverlayPlay",["VG_STATES",function(a){return{restrict:"E",require:"^videogular",scope:{},templateUrl:function(a,b){return b.vgTemplate||"vg-templates/vg-overlay-play"},link:function(b,c,d,e){b.onChangeState=function(c){switch(c){case a.PLAY:b.overlayPlayIcon={};break;case a.PAUSE:b.overlayPlayIcon={play:!0};break;case a.STOP:b.overlayPlayIcon={play:!0}}},b.onClickOverlayPlay=function(a){e.playPause()},b.overlayPlayIcon={play:!0},b.$watch(function(){return e.currentState},function(a,c){b.onChangeState(a)})}}}]); \ No newline at end of file
diff --git a/www/lib/videogular-themes-default/.bower.json b/www/lib/videogular-themes-default/.bower.json
index fe245097..38999430 100644
--- a/www/lib/videogular-themes-default/.bower.json
+++ b/www/lib/videogular-themes-default/.bower.json
@@ -1,22 +1,26 @@
{
"name": "videogular-themes-default",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": [
"./videogular.css",
- "./fonts/*"
+ "./fonts/videogular.woff",
+ "./fonts/videogular.ttf",
+ "./fonts/videogular.svg",
+ "./fonts/videogular.eot",
+ "./fonts/videogular.dev.svg"
],
"dependencies": {
- "videogular": "~1.3.2"
+ "videogular": "~1.4.4"
},
"homepage": "https://github.com/2fdevs/bower-videogular-themes-default",
- "_release": "1.3.2",
+ "_release": "1.4.4",
"_resolution": {
"type": "version",
- "tag": "v1.3.2",
- "commit": "08233954c31e0b45b9f918de6dce117e14d951f8"
+ "tag": "v1.4.4",
+ "commit": "22a686dd9ca7bbbc7e09239d71a14da50afaffc5"
},
- "_source": "git://github.com/2fdevs/bower-videogular-themes-default.git",
- "_target": "~1.3.2",
+ "_source": "https://github.com/2fdevs/bower-videogular-themes-default.git",
+ "_target": "1.4.4",
"_originalSource": "videogular-themes-default",
"_direct": true
} \ No newline at end of file
diff --git a/www/lib/videogular-themes-default/bower.json b/www/lib/videogular-themes-default/bower.json
index 38f5332c..b2b245ff 100644
--- a/www/lib/videogular-themes-default/bower.json
+++ b/www/lib/videogular-themes-default/bower.json
@@ -1,11 +1,15 @@
{
"name": "videogular-themes-default",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": [
"./videogular.css",
- "./fonts/*"
+ "./fonts/videogular.woff",
+ "./fonts/videogular.ttf",
+ "./fonts/videogular.svg",
+ "./fonts/videogular.eot",
+ "./fonts/videogular.dev.svg"
],
"dependencies": {
- "videogular": "~1.3.2"
+ "videogular": "~1.4.4"
}
}
diff --git a/www/lib/videogular-themes-default/package.json b/www/lib/videogular-themes-default/package.json
index b8bcec92..7af2cd8d 100644
--- a/www/lib/videogular-themes-default/package.json
+++ b/www/lib/videogular-themes-default/package.json
@@ -1,7 +1,10 @@
{
"name": "videogular-themes-default",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "videogular.css",
+ "dependencies": {
+ "videogular": "~1.4.4"
+ },
"devDependencies": {
"grunt": "~0.4.1",
"grunt-release": "~0.7.0"
diff --git a/www/lib/videogular-themes-default/videogular.css b/www/lib/videogular-themes-default/videogular.css
index de4a7acb..676974ad 100644
--- a/www/lib/videogular-themes-default/videogular.css
+++ b/www/lib/videogular-themes-default/videogular.css
@@ -1,5 +1,5 @@
/**
- * @license videogular v1.2.7 http://videogular.com
+ * @license videogular v1.4.3 http://videogular.com
* Two Fucking Developers http://twofuckingdevelopers.com
* License: MIT
*/
@@ -165,16 +165,24 @@ videogular, [videogular] {
width: auto;
display: table-cell;
cursor: pointer;
- vertical-align: middle; }
- videogular vg-scrub-bar [role=slider], [videogular] vg-scrub-bar [role=slider] {
- margin-top: 24px;
- margin-bottom: 24px;
- height: 2px;
- background-color: black;
+ vertical-align: middle;
position: relative; }
- videogular vg-scrub-bar :focus vg-scrub-bar-current-time, [videogular] vg-scrub-bar :focus vg-scrub-bar-current-time {
- border-right: 6px black groove; }
+ videogular vg-scrub-bar [role=slider], [videogular] vg-scrub-bar [role=slider] {
+ margin-top: 24px;
+ margin-bottom: 24px;
+ height: 2px;
+ background-color: black;
+ position: relative; }
+ videogular vg-scrub-bar .container, [videogular] vg-scrub-bar .container {
+ position: absolute;
+ width: 100%;
+ height: 2px;
+ top: 24px;
+ padding-left: 0; }
+ videogular vg-scrub-bar :focus vg-scrub-bar-current-time, [videogular] vg-scrub-bar :focus vg-scrub-bar-current-time {
+ border-right: 6px black groove; }
videogular vg-scrub-bar-current-time, [videogular] vg-scrub-bar-current-time {
+ position: absolute;
background-color: #FFFFFF;
width: 100%;
height: 100%;
@@ -194,7 +202,7 @@ videogular, [videogular] {
width: 100%;
height: 100%;
display: block;
- position: relative; }
+ position: absolute; }
videogular vg-scrub-bar-cue-points .cue-point-timeline, [videogular] vg-scrub-bar-cue-points .cue-point-timeline {
color: #FFFFFF;
padding-top: 3px; }
@@ -202,6 +210,27 @@ videogular, [videogular] {
position: absolute;
height: 3px;
background-color: #FFFFFF; }
+ videogular vg-scrub-bar-thumbnails, [videogular] vg-scrub-bar-thumbnails {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ display: block;
+ cursor: pointer;
+ bottom: 24px;
+ z-index: 1; }
+ videogular vg-scrub-bar-thumbnails .vg-thumbnails, [videogular] vg-scrub-bar-thumbnails .vg-thumbnails {
+ position: absolute;
+ top: -20px;
+ margin-top: -40px;
+ width: 80px;
+ height: 60px;
+ overflow: hidden; }
+ videogular vg-scrub-bar-thumbnails .vg-thumbnails .image-thumbnail, [videogular] vg-scrub-bar-thumbnails .vg-thumbnails .image-thumbnail {
+ height: 60px;
+ background-repeat: no-repeat; }
+ videogular vg-scrub-bar-thumbnails .background, [videogular] vg-scrub-bar-thumbnails .background {
+ width: 100%;
+ height: 50px; }
videogular vg-playback-button, [videogular] vg-playback-button {
display: table-cell;
width: 50px;
diff --git a/www/lib/videogular-themes-default/videogular.css.map b/www/lib/videogular-themes-default/videogular.css.map
index 139cd09c..86429cae 100644
--- a/www/lib/videogular-themes-default/videogular.css.map
+++ b/www/lib/videogular-themes-default/videogular.css.map
@@ -1,6 +1,6 @@
{
"version": 3,
-"mappings": ";;;;;AAKA,UASC;EARG,WAAW,EAAE,YAAY;EACzB,G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ACxC,iBAAiB,EAAE,wBAAwB;EAG/C,8FAAmC;IAC/B,4BAA4B,EAAE,MAAM;IACpC,yBAAyB,EAAE,MAAM;AAGrC,oBAOC;EANG,EAAG;IACC,cAAc,EAAE,YAAY;EAEhC,IAAK;IACD,cAAc,EAAE,cAAc;AAItC,uBAOC;EANG,EAAG;IACC,cAAc,EAAE,YAAY;EAEhC,IAAK;IACD,cAAc,EAAE,eAAe;AAIvC,uBAOC;EANG,EAAG;IACC,iBAAiB,EAAE,YAAY;EAEnC,IAAK;IACD,iBAAiB,EAAE,cAAc;AAIzC,0BAOC;EANG,EAAG;IACC,iBAAiB,EAAE,YAAY;EAEnC,IAAK;IACD,iBAAiB,EAAE,eAAe;EAO1C,8CAAW;IACP,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,CAAC;IACV,GAAG,EAAE,CAAC;IACN,OAAO,EAAE,IAAI",
"sources": ["videogular.scss"],
"names": [],
"file": "videogular.css"
diff --git a/www/lib/videogular-themes-default/videogular.min.css b/www/lib/videogular-themes-default/videogular.min.css
index 78465e69..6fd8fcfc 100644
--- a/www/lib/videogular-themes-default/videogular.min.css
+++ b/www/lib/videogular-themes-default/videogular.min.css
@@ -1 +1 @@
-@font-face{font-family:videogular;src:url(fonts/videogular.eot);src:url(fonts/videogular.eot?#iefix) format("embedded-opentype"),url(fonts/videogular.woff) format("woff"),url(fonts/videogular.ttf) format("truetype"),url(fonts/videogular.svg#videogular) format("svg");font-weight:400;font-style:normal}videogular,[videogular]{width:100%;height:100%;position:relative;background-color:#000;display:block;flex-direction:column;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:moz-none;-ms-user-select:none;user-select:none}videogular button,[videogular] button{cursor:pointer}videogular.fullscreen,[videogular].fullscreen{position:fixed;left:0;top:0}videogular vg-media,[videogular] vg-media{width:100%;height:100%;max-width:100%;max-height:100%;display:block}videogular vg-media video,[videogular] vg-media video{width:100%;height:100%;max-width:100%;max-height:100%}videogular .iconButton,[videogular] .iconButton{color:#FFF;font-family:videogular;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;background:0 0;padding:6px;border:0}videogular .iconButton:focus,[videogular] .iconButton:focus{border:1px solid #fff}videogular vg-poster,[videogular] vg-poster{width:100%;height:100%;max-width:100%;max-height:100%;position:absolute;display:block;z-index:1;top:0;pointer-events:none}videogular vg-poster img,[videogular] vg-poster img{width:auto;height:auto;max-width:100%;max-height:100%;top:0;bottom:0;right:0;left:0;margin:auto;position:absolute}videogular vg-poster img.pause,videogular vg-poster img.play,[videogular] vg-poster img.pause,[videogular] vg-poster img.play{display:none}videogular vg-poster img.stop,[videogular] vg-poster img.stop{display:block}videogular vg-overlay-play,[videogular] vg-overlay-play{width:100%;height:100%;max-width:100%;max-height:100%;position:absolute;z-index:2;top:0}videogular vg-overlay-play .play:before,[videogular] vg-overlay-play .play:before{content:"\e000"}videogular vg-overlay-play .overlayPlayContainer,[videogular] vg-overlay-play .overlayPlayContainer{font-size:100px;width:100%;height:100%;max-width:100%;max-height:100%;position:absolute;display:table;cursor:pointer;zoom:1;filter:alpha(opacity=60);opacity:.6}videogular vg-overlay-play .overlayPlayContainer div,[videogular] vg-overlay-play .overlayPlayContainer div{vertical-align:middle;text-align:center;display:table-cell}videogular vg-controls,[videogular] vg-controls{width:100%;height:50px;display:block;position:absolute;z-index:3;bottom:0}videogular vg-controls .controls-container,[videogular] vg-controls .controls-container{width:100%;height:50px;background-color:rgba(0,0,0,.5);position:absolute;display:table;zoom:1}videogular vg-play-pause-button,[videogular] vg-play-pause-button{display:table-cell;width:50px;vertical-align:middle;text-align:center;cursor:pointer}videogular vg-time-display,[videogular] vg-time-display{color:#FFF;display:table-cell;font-family:Arial;font-size:18px;width:75px;vertical-align:middle;text-align:center;cursor:default}videogular .vgTimeDisplay,[videogular] .vgTimeDisplay{display:table-cell;font-family:Arial;font-size:18px;width:auto}videogular vg-scrub-bar,[videogular] vg-scrub-bar{width:auto;display:table-cell;cursor:pointer;vertical-align:middle}videogular vg-scrub-bar [role=slider],[videogular] vg-scrub-bar [role=slider]{margin-top:24px;margin-bottom:24px;height:2px;background-color:#000;position:relative}videogular vg-scrub-bar :focus vg-scrub-bar-current-time,[videogular] vg-scrub-bar :focus vg-scrub-bar-current-time{border-right:6px #000 groove}videogular vg-scrub-bar-current-time,[videogular] vg-scrub-bar-current-time{background-color:#FFF;width:100%;height:100%;display:block;cursor:pointer}videogular vg-scrub-bar-buffer,[videogular] vg-scrub-bar-buffer{position:absolute;background-color:#FFF;width:100%;height:100%;display:block;cursor:pointer;zoom:1;filter:alpha(opacity=50);opacity:.5}videogular vg-scrub-bar-cue-points,[videogular] vg-scrub-bar-cue-points{width:100%;height:100%;display:block;position:relative}videogular vg-scrub-bar-cue-points .cue-point-timeline,[videogular] vg-scrub-bar-cue-points .cue-point-timeline{color:#FFF;padding-top:3px}videogular vg-scrub-bar-cue-points .cue-point-timeline .cue-point,[videogular] vg-scrub-bar-cue-points .cue-point-timeline .cue-point{position:absolute;height:3px;background-color:#FFF}videogular vg-playback-button,[videogular] vg-playback-button{display:table-cell;width:50px;vertical-align:middle;text-align:center;cursor:pointer}videogular vg-volume,[videogular] vg-volume{display:table-cell;width:50px;vertical-align:middle;text-align:center;cursor:pointer}videogular vg-volume-bar,[videogular] vg-volume-bar{width:50px;height:100px;top:-100px;margin-left:-25px;vertical-align:middle;text-align:center;position:absolute;cursor:pointer}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){videogular vg-volume-bar,[videogular] vg-volume-bar{zoom:1;filter:alpha(opacity=50);opacity:.5}}videogular vg-fullscreen-button,[videogular] vg-fullscreen-button{display:table-cell;width:50px;vertical-align:middle;text-align:center;cursor:pointer}videogular vg-volume-bar .verticalVolumeBar,[videogular] vg-volume-bar .verticalVolumeBar{width:50px;height:100px;background-color:#000;position:absolute}videogular vg-volume-bar .volumeBackground,[videogular] vg-volume-bar .volumeBackground{width:20px;height:70px;left:15px;top:15px;background-color:#222;position:absolute}videogular vg-volume-bar .volumeValue,[videogular] vg-volume-bar .volumeValue{width:20px;height:100%;background-color:#FFF;position:absolute}videogular vg-volume-bar .volumeClickArea,[videogular] vg-volume-bar .volumeClickArea{width:20px;height:100%;position:absolute}videogular vg-controls .hide-animation,[videogular] vg-controls .hide-animation{animation:hideControlsAnimationFrames ease-out .5s;animation-iteration-count:1;animation-fill-mode:forwards;-webkit-animation:hideControlsAnimationFrames ease-out .5s;-webkit-animation-iteration-count:1;-webkit-animation-fill-mode:forwards;-moz-animation:hideControlsAnimationFrames ease-out .5s;-moz-animation-iteration-count:1;-moz-animation-fill-mode:forwards;-o-animation:hideControlsAnimationFrames ease-out .5s;-o-animation-iteration-count:1;-o-animation-fill-mode:forwards;-ms-animation:hideControlsAnimationFrames ease-out .5s;-ms-animation-iteration-count:1;-ms-animation-fill-mode:forwards}@keyframes hideControlsAnimationFrames{0%{opacity:.5}100%{opacity:0}}@-moz-keyframes hideControlsAnimationFrames{0%{opacity:.5}100%{opacity:0}}@-webkit-keyframes hideControlsAnimationFrames{0%{opacity:.5}100%{opacity:0}}@-o-keyframes hideControlsAnimationFrames{0%{opacity:.5}100%{opacity:0}}@-ms-keyframes hideControlsAnimationFrames{0%{opacity:.5}100%{opacity:0}}videogular vg-controls .show-animation,[videogular] vg-controls .show-animation{animation:showControlsAnimationFrames ease-out .5s;animation-iteration-count:1;animation-fill-mode:forwards;-webkit-animation:showControlsAnimationFrames ease-out .5s;-webkit-animation-iteration-count:1;-webkit-animation-fill-mode:forwards;-moz-animation:showControlsAnimationFrames ease-out .5s;-moz-animation-iteration-count:1;-moz-animation-fill-mode:forwards;-o-animation:showControlsAnimationFrames ease-out .5s;-o-animation-iteration-count:1;-o-animation-fill-mode:forwards;-ms-animation:showControlsAnimationFrames ease-out .5s;-ms-animation-iteration-count:1;-ms-animation-fill-mode:forwards}@keyframes showControlsAnimationFrames{0%{background-color:transparent}100%{background-color:rgba(0,0,0,.5)}}@-moz-keyframes showControlsAnimationFrames{0%{background-color:transparent}100%{background-color:rgba(0,0,0,.5)}}@-webkit-keyframes showControlsAnimationFrames{0%{background-color:transparent}100%{background-color:rgba(0,0,0,.5)}}@-o-keyframes showControlsAnimationFrames{0%{background-color:transparent}100%{background-color:rgba(0,0,0,.5)}}@-ms-keyframes showControlsAnimationFrames{0%{background-color:transparent}100%{background-color:rgba(0,0,0,.5)}}videogular vg-play-pause-button .play:before,[videogular] vg-play-pause-button .play:before{content:"\e000"}videogular vg-play-pause-button .pause:before,[videogular] vg-play-pause-button .pause:before{content:"\e001"}videogular vg-mute-button,[videogular] vg-mute-button{width:50px;display:block}videogular vg-mute-button .level3:before,[videogular] vg-mute-button .level3:before{content:"\e002"}videogular vg-mute-button .level2:before,[videogular] vg-mute-button .level2:before{content:"\e003"}videogular vg-mute-button .level1:before,[videogular] vg-mute-button .level1:before{content:"\e004"}videogular vg-mute-button .level0:before,[videogular] vg-mute-button .level0:before{content:"\e005"}videogular vg-mute-button .mute:before,[videogular] vg-mute-button .mute:before{content:"\e006"}videogular vg-fullscreen-button .enter:before,[videogular] vg-fullscreen-button .enter:before{content:"\e007"}videogular vg-fullscreen-button .exit:before,[videogular] vg-fullscreen-button .exit:before{content:"\e008"}videogular vg-buffering,[videogular] vg-buffering{width:100%;height:100%;position:absolute;z-index:4;top:0}videogular vg-buffering .bufferingContainer,[videogular] vg-buffering .bufferingContainer{width:100%;position:absolute;cursor:pointer;top:50%;margin-top:-50px;zoom:1;filter:alpha(opacity=60);opacity:.6}videogular vg-buffering .loadingSpinner,[videogular] vg-buffering .loadingSpinner{background-color:transparent;border:5px solid #fff;opacity:.9;border-top:5px solid transparent;border-left:5px solid transparent;border-radius:50px;box-shadow:0 0 35px #FFF;width:50px;height:50px;margin:0 auto;-moz-animation:spin .5s infinite linear;-webkit-animation:spin .5s infinite linear}videogular vg-buffering .loadingSpinner .stop,[videogular] vg-buffering .loadingSpinner .stop{-webkit-animation-play-state:paused;-moz-animation-play-state:paused}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(360deg)}}@-moz-keyframes spinoff{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(-360deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@-webkit-keyframes spinoff{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(-360deg)}}videogular vg-ima-ads,[videogular] vg-ima-ads{width:100%;height:100%;position:absolute;z-index:5;top:0;display:none} \ No newline at end of file
+@font-face{font-family:videogular;src:url(fonts/videogular.eot);src:url(fonts/videogular.eot?#iefix) format("embedded-opentype"),url(fonts/videogular.woff) format("woff"),url(fonts/videogular.ttf) format("truetype"),url(fonts/videogular.svg#videogular) format("svg");font-weight:400;font-style:normal}videogular,[videogular]{width:100%;height:100%;position:relative;background-color:#000;display:block;flex-direction:column;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:moz-none;-ms-user-select:none;user-select:none}videogular button,[videogular] button{cursor:pointer}videogular.fullscreen,[videogular].fullscreen{position:fixed;left:0;top:0}videogular vg-media,[videogular] vg-media{width:100%;height:100%;max-width:100%;max-height:100%;display:block}videogular vg-media video,[videogular] vg-media video{width:100%;height:100%;max-width:100%;max-height:100%}videogular .iconButton,[videogular] .iconButton{color:#FFF;font-family:videogular;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;background:0 0;padding:6px;border:0}videogular .iconButton:focus,[videogular] .iconButton:focus{border:1px solid #fff}videogular vg-poster,[videogular] vg-poster{width:100%;height:100%;max-width:100%;max-height:100%;position:absolute;display:block;z-index:1;top:0;pointer-events:none}videogular vg-poster img,[videogular] vg-poster img{width:auto;height:auto;max-width:100%;max-height:100%;top:0;bottom:0;right:0;left:0;margin:auto;position:absolute}videogular vg-poster img.pause,videogular vg-poster img.play,[videogular] vg-poster img.pause,[videogular] vg-poster img.play{display:none}videogular vg-poster img.stop,[videogular] vg-poster img.stop{display:block}videogular vg-overlay-play,[videogular] vg-overlay-play{width:100%;height:100%;max-width:100%;max-height:100%;position:absolute;z-index:2;top:0}videogular vg-overlay-play .play:before,[videogular] vg-overlay-play .play:before{content:"\e000"}videogular vg-overlay-play .overlayPlayContainer,[videogular] vg-overlay-play .overlayPlayContainer{font-size:100px;width:100%;height:100%;max-width:100%;max-height:100%;position:absolute;display:table;cursor:pointer;zoom:1;filter:alpha(opacity=60);opacity:.6}videogular vg-overlay-play .overlayPlayContainer div,[videogular] vg-overlay-play .overlayPlayContainer div{vertical-align:middle;text-align:center;display:table-cell}videogular vg-controls,[videogular] vg-controls{width:100%;height:50px;display:block;position:absolute;z-index:3;bottom:0}videogular vg-controls .controls-container,[videogular] vg-controls .controls-container{width:100%;height:50px;background-color:rgba(0,0,0,.5);position:absolute;display:table;zoom:1}videogular vg-play-pause-button,[videogular] vg-play-pause-button{display:table-cell;width:50px;vertical-align:middle;text-align:center;cursor:pointer}videogular vg-time-display,[videogular] vg-time-display{color:#FFF;display:table-cell;font-family:Arial;font-size:18px;width:75px;vertical-align:middle;text-align:center;cursor:default}videogular .vgTimeDisplay,[videogular] .vgTimeDisplay{display:table-cell;font-family:Arial;font-size:18px;width:auto}videogular vg-scrub-bar,[videogular] vg-scrub-bar{width:auto;display:table-cell;cursor:pointer;vertical-align:middle;position:relative}videogular vg-scrub-bar [role=slider],[videogular] vg-scrub-bar [role=slider]{margin-top:24px;margin-bottom:24px;height:2px;background-color:#000;position:relative}videogular vg-scrub-bar .container,[videogular] vg-scrub-bar .container{position:absolute;width:100%;height:2px;top:24px;padding-left:0}videogular vg-scrub-bar :focus vg-scrub-bar-current-time,[videogular] vg-scrub-bar :focus vg-scrub-bar-current-time{border-right:6px #000 groove}videogular vg-scrub-bar-current-time,[videogular] vg-scrub-bar-current-time{position:absolute;background-color:#FFF;width:100%;height:100%;display:block;cursor:pointer}videogular vg-scrub-bar-buffer,[videogular] vg-scrub-bar-buffer{position:absolute;background-color:#FFF;width:100%;height:100%;display:block;cursor:pointer;zoom:1;filter:alpha(opacity=50);opacity:.5}videogular vg-scrub-bar-cue-points,[videogular] vg-scrub-bar-cue-points{width:100%;height:100%;display:block;position:absolute}videogular vg-scrub-bar-cue-points .cue-point-timeline,[videogular] vg-scrub-bar-cue-points .cue-point-timeline{color:#FFF;padding-top:3px}videogular vg-scrub-bar-cue-points .cue-point-timeline .cue-point,[videogular] vg-scrub-bar-cue-points .cue-point-timeline .cue-point{position:absolute;height:3px;background-color:#FFF}videogular vg-scrub-bar-thumbnails,[videogular] vg-scrub-bar-thumbnails{position:absolute;width:100%;height:100%;display:block;cursor:pointer;bottom:24px;z-index:1}videogular vg-scrub-bar-thumbnails .vg-thumbnails,[videogular] vg-scrub-bar-thumbnails .vg-thumbnails{position:absolute;top:-20px;margin-top:-40px;width:80px;height:60px;overflow:hidden}videogular vg-scrub-bar-thumbnails .vg-thumbnails .image-thumbnail,[videogular] vg-scrub-bar-thumbnails .vg-thumbnails .image-thumbnail{height:60px;background-repeat:no-repeat}videogular vg-scrub-bar-thumbnails .background,[videogular] vg-scrub-bar-thumbnails .background{width:100%;height:50px}videogular vg-playback-button,[videogular] vg-playback-button{display:table-cell;width:50px;vertical-align:middle;text-align:center;cursor:pointer}videogular vg-volume,[videogular] vg-volume{display:table-cell;width:50px;vertical-align:middle;text-align:center;cursor:pointer}videogular vg-volume-bar,[videogular] vg-volume-bar{width:50px;height:100px;top:-100px;margin-left:-25px;vertical-align:middle;text-align:center;position:absolute;cursor:pointer}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){videogular vg-volume-bar,[videogular] vg-volume-bar{zoom:1;filter:alpha(opacity=50);opacity:.5}}videogular vg-fullscreen-button,[videogular] vg-fullscreen-button{display:table-cell;width:50px;vertical-align:middle;text-align:center;cursor:pointer}videogular vg-volume-bar .verticalVolumeBar,[videogular] vg-volume-bar .verticalVolumeBar{width:50px;height:100px;background-color:#000;position:absolute}videogular vg-volume-bar .volumeBackground,[videogular] vg-volume-bar .volumeBackground{width:20px;height:70px;left:15px;top:15px;background-color:#222;position:absolute}videogular vg-volume-bar .volumeValue,[videogular] vg-volume-bar .volumeValue{width:20px;height:100%;background-color:#FFF;position:absolute}videogular vg-volume-bar .volumeClickArea,[videogular] vg-volume-bar .volumeClickArea{width:20px;height:100%;position:absolute}videogular vg-controls .hide-animation,[videogular] vg-controls .hide-animation{animation:hideControlsAnimationFrames ease-out .5s;animation-iteration-count:1;animation-fill-mode:forwards;-webkit-animation:hideControlsAnimationFrames ease-out .5s;-webkit-animation-iteration-count:1;-webkit-animation-fill-mode:forwards;-moz-animation:hideControlsAnimationFrames ease-out .5s;-moz-animation-iteration-count:1;-moz-animation-fill-mode:forwards;-o-animation:hideControlsAnimationFrames ease-out .5s;-o-animation-iteration-count:1;-o-animation-fill-mode:forwards;-ms-animation:hideControlsAnimationFrames ease-out .5s;-ms-animation-iteration-count:1;-ms-animation-fill-mode:forwards}@keyframes hideControlsAnimationFrames{0%{opacity:.5}100%{opacity:0}}@-moz-keyframes hideControlsAnimationFrames{0%{opacity:.5}100%{opacity:0}}@-webkit-keyframes hideControlsAnimationFrames{0%{opacity:.5}100%{opacity:0}}@-o-keyframes hideControlsAnimationFrames{0%{opacity:.5}100%{opacity:0}}@-ms-keyframes hideControlsAnimationFrames{0%{opacity:.5}100%{opacity:0}}videogular vg-controls .show-animation,[videogular] vg-controls .show-animation{animation:showControlsAnimationFrames ease-out .5s;animation-iteration-count:1;animation-fill-mode:forwards;-webkit-animation:showControlsAnimationFrames ease-out .5s;-webkit-animation-iteration-count:1;-webkit-animation-fill-mode:forwards;-moz-animation:showControlsAnimationFrames ease-out .5s;-moz-animation-iteration-count:1;-moz-animation-fill-mode:forwards;-o-animation:showControlsAnimationFrames ease-out .5s;-o-animation-iteration-count:1;-o-animation-fill-mode:forwards;-ms-animation:showControlsAnimationFrames ease-out .5s;-ms-animation-iteration-count:1;-ms-animation-fill-mode:forwards}@keyframes showControlsAnimationFrames{0%{background-color:transparent}100%{background-color:rgba(0,0,0,.5)}}@-moz-keyframes showControlsAnimationFrames{0%{background-color:transparent}100%{background-color:rgba(0,0,0,.5)}}@-webkit-keyframes showControlsAnimationFrames{0%{background-color:transparent}100%{background-color:rgba(0,0,0,.5)}}@-o-keyframes showControlsAnimationFrames{0%{background-color:transparent}100%{background-color:rgba(0,0,0,.5)}}@-ms-keyframes showControlsAnimationFrames{0%{background-color:transparent}100%{background-color:rgba(0,0,0,.5)}}videogular vg-play-pause-button .play:before,[videogular] vg-play-pause-button .play:before{content:"\e000"}videogular vg-play-pause-button .pause:before,[videogular] vg-play-pause-button .pause:before{content:"\e001"}videogular vg-mute-button,[videogular] vg-mute-button{width:50px;display:block}videogular vg-mute-button .level3:before,[videogular] vg-mute-button .level3:before{content:"\e002"}videogular vg-mute-button .level2:before,[videogular] vg-mute-button .level2:before{content:"\e003"}videogular vg-mute-button .level1:before,[videogular] vg-mute-button .level1:before{content:"\e004"}videogular vg-mute-button .level0:before,[videogular] vg-mute-button .level0:before{content:"\e005"}videogular vg-mute-button .mute:before,[videogular] vg-mute-button .mute:before{content:"\e006"}videogular vg-fullscreen-button .enter:before,[videogular] vg-fullscreen-button .enter:before{content:"\e007"}videogular vg-fullscreen-button .exit:before,[videogular] vg-fullscreen-button .exit:before{content:"\e008"}videogular vg-buffering,[videogular] vg-buffering{width:100%;height:100%;position:absolute;z-index:4;top:0}videogular vg-buffering .bufferingContainer,[videogular] vg-buffering .bufferingContainer{width:100%;position:absolute;cursor:pointer;top:50%;margin-top:-50px;zoom:1;filter:alpha(opacity=60);opacity:.6}videogular vg-buffering .loadingSpinner,[videogular] vg-buffering .loadingSpinner{background-color:transparent;border:5px solid #fff;opacity:.9;border-top:5px solid transparent;border-left:5px solid transparent;border-radius:50px;box-shadow:0 0 35px #FFF;width:50px;height:50px;margin:0 auto;-moz-animation:spin .5s infinite linear;-webkit-animation:spin .5s infinite linear}videogular vg-buffering .loadingSpinner .stop,[videogular] vg-buffering .loadingSpinner .stop{-webkit-animation-play-state:paused;-moz-animation-play-state:paused}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(360deg)}}@-moz-keyframes spinoff{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(-360deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@-webkit-keyframes spinoff{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(-360deg)}}videogular vg-ima-ads,[videogular] vg-ima-ads{width:100%;height:100%;position:absolute;z-index:5;top:0;display:none} \ No newline at end of file
diff --git a/www/lib/videogular/.bower.json b/www/lib/videogular/.bower.json
index f105cfd7..2246d623 100644
--- a/www/lib/videogular/.bower.json
+++ b/www/lib/videogular/.bower.json
@@ -1,20 +1,19 @@
{
"name": "videogular",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "./videogular.js",
"dependencies": {
"angular": "^1.3.x",
"angular-sanitize": "^1.3.x"
},
"homepage": "https://github.com/2fdevs/bower-videogular",
- "_release": "1.3.2",
+ "_release": "1.4.4",
"_resolution": {
"type": "version",
- "tag": "v1.3.2",
- "commit": "b0c01c91bd5277797d3a02e5546a5b31423cfeaa"
+ "tag": "v1.4.4",
+ "commit": "6075385b6f0e41ffa707cf2c1f0afd456ac45e69"
},
- "_source": "git://github.com/2fdevs/bower-videogular.git",
- "_target": "~1.3.2",
- "_originalSource": "videogular",
- "_direct": true
+ "_source": "https://github.com/2fdevs/bower-videogular.git",
+ "_target": "~1.4.4",
+ "_originalSource": "videogular"
} \ No newline at end of file
diff --git a/www/lib/videogular/bower.json b/www/lib/videogular/bower.json
index c593e6c9..50cca3b7 100644
--- a/www/lib/videogular/bower.json
+++ b/www/lib/videogular/bower.json
@@ -1,6 +1,6 @@
{
"name": "videogular",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "./videogular.js",
"dependencies": {
"angular": "^1.3.x",
diff --git a/www/lib/videogular/index.js b/www/lib/videogular/index.js
index 51945645..84d99a76 100644
--- a/www/lib/videogular/index.js
+++ b/www/lib/videogular/index.js
@@ -1,4 +1,4 @@
-require('angular');
+require('angular');
require('angular-sanitize');
require('./videogular');
diff --git a/www/lib/videogular/package.json b/www/lib/videogular/package.json
index ee4603b7..9892ee30 100644
--- a/www/lib/videogular/package.json
+++ b/www/lib/videogular/package.json
@@ -1,7 +1,11 @@
{
"name": "videogular",
- "version": "1.3.2",
+ "version": "1.4.4",
"main": "index.js",
+ "dependencies": {
+ "angular": "^1.3.0",
+ "angular-sanitize": "^1.3.0"
+ },
"devDependencies": {
"grunt": "~0.4.1",
"grunt-release": "~0.7.0"
diff --git a/www/lib/videogular/videogular.js b/www/lib/videogular/videogular.js
index 5685b076..1a29b398 100644
--- a/www/lib/videogular/videogular.js
+++ b/www/lib/videogular/videogular.js
@@ -1,5 +1,5 @@
/**
- * @license videogular v1.3.2 http://videogular.com
+ * @license videogular v1.4.4 http://videogular.com
* Two Fucking Developers http://twofuckingdevelopers.com
* License: MIT
*/
@@ -78,13 +78,13 @@ angular.module("com.2fdevs.videogular")
* - stop(): Stops media.
* - playPause(): Toggles play and pause.
* - seekTime(value, byPercent): Seeks to a specified time position. Param value must be an integer representing the target position in seconds or a percentage. By default seekTime seeks by seconds, if you want to seek by percentage just pass byPercent to true.
- * - setVolume(volume): Sets volume. Param volume must be an integer with a value between 0 and 1.
- * - setPlayback(playback): Sets playback. Param plaback must be an integer with a value between 0 and 2.
+ * - setVolume(volume): Sets volume. Param volume must be a float number with a value between 0 and 1.
+ * - setPlayback(playback): Sets playback. Param plaback must be a float number with a value between 0 and 2.
* - setState(state): Sets a new state. Param state mus be an string with 'play', 'pause' or 'stop'. This method only changes the state of the player, but doesn't plays, pauses or stops the media file.
* - toggleFullScreen(): Toggles between fullscreen and normal mode.
* - updateTheme(css-url): Removes previous CSS theme and sets a new one.
* - clearMedia(): Cleans the current media file.
- * - changeSource(array): Updates current media source. Param `array` must be an array of media source objects.
+ * - changeSource(array): Updates current media source. Param `array` must be an array of media source objects or a simple URL string.
* A media source is an object with two properties `src` and `type`. The `src` property must contains a trustful url resource.
* <pre>{src: $sce.trustAsResourceUrl("http://static.videogular.com/assets/videos/videogular.mp4"), type: "video/mp4"}</pre>
*
@@ -98,7 +98,7 @@ angular.module("com.2fdevs.videogular")
* - nativeFullscreen: Boolean value to know if Videogular if fullscreen mode will use native mode or emulated mode.
* - mediaElement: Reference to video/audio object.
* - videogularElement: Reference to videogular tag.
- * - sources: Array with current sources.
+ * - sources: Array with current sources or a simple URL string.
* - tracks: Array with current tracks.
* - cuePoints: Object containing a list of timelines with cue points. Each property in the object represents a timeline, which is an Array of objects with the next definition:
* <pre>{
@@ -139,12 +139,28 @@ angular.module("com.2fdevs.videogular")
var currentTheme = null;
var isFullScreenPressed = false;
var isMetaDataLoaded = false;
+ var hasStartTimePlayed = false;
+ var isVirtualClip = false;
// PUBLIC $API
this.videogularElement = null;
this.clearMedia = function () {
this.mediaElement[0].src = '';
+ this.mediaElement[0].removeEventListener("canplay", this.onCanPlay.bind(this), false);
+ this.mediaElement[0].removeEventListener("loadedmetadata", this.onLoadMetaData.bind(this), false);
+ this.mediaElement[0].removeEventListener("waiting", this.onStartBuffering.bind(this), false);
+ this.mediaElement[0].removeEventListener("ended", this.onComplete.bind(this), false);
+ this.mediaElement[0].removeEventListener("playing", this.onStartPlaying.bind(this), false);
+ this.mediaElement[0].removeEventListener("play", this.onPlay.bind(this), false);
+ this.mediaElement[0].removeEventListener("pause", this.onPause.bind(this), false);
+ this.mediaElement[0].removeEventListener("volumechange", this.onVolumeChange.bind(this), false);
+ this.mediaElement[0].removeEventListener("playbackchange", this.onPlaybackChange.bind(this), false);
+ this.mediaElement[0].removeEventListener("timeupdate", this.onUpdateTime.bind(this), false);
+ this.mediaElement[0].removeEventListener("progress", this.onProgress.bind(this), false);
+ this.mediaElement[0].removeEventListener("seeking", this.onSeeking.bind(this), false);
+ this.mediaElement[0].removeEventListener("seeked", this.onSeeked.bind(this), false);
+ this.mediaElement[0].removeEventListener("error", this.onVideoError.bind(this), false);
};
this.onRouteChange = function() {
@@ -155,7 +171,12 @@ angular.module("com.2fdevs.videogular")
this.onCanPlay = function (evt) {
this.isBuffering = false;
- $scope.$apply($scope.vgCanPlay({$event: evt}));
+ $scope.$parent.$digest($scope.vgCanPlay({$event: evt}));
+
+ if (!hasStartTimePlayed && (this.startTime > 0 || this.startTime === 0)) {
+ this.seekTime(this.startTime);
+ hasStartTimePlayed = true;
+ }
};
this.onVideoReady = function () {
@@ -164,10 +185,13 @@ angular.module("com.2fdevs.videogular")
this.playsInline = $scope.vgPlaysInline;
this.nativeFullscreen = $scope.vgNativeFullscreen || true;
this.cuePoints = $scope.vgCuePoints;
+ this.startTime = $scope.vgStartTime;
+ this.virtualClipDuration = $scope.vgVirtualClipDuration;
this.clearMediaOnNavigate = $scope.vgClearMediaOnNavigate || true;
this.currentState = VG_STATES.STOP;
isMetaDataLoaded = true;
+ isVirtualClip = this.startTime >= 0 && this.virtualClipDuration > 0;
//Set media volume from localStorage if available
if (VG_UTILS.supportsLocalStorage()) {
@@ -194,6 +218,9 @@ angular.module("com.2fdevs.videogular")
$scope.vgNativeFullscreen = this.config.nativeFullscreen;
$scope.vgCuePoints = this.config.cuePoints;
$scope.vgClearMediaOnNavigate = this.config.clearMediaOnNavigate;
+ $scope.vgStartTime = this.config.startTime;
+ $scope.vgVirtualClipDuration = this.config.virtualClipDuration;
+ isVirtualClip = $scope.vgStartTime >= 0 && $scope.vgVirtualClipDuration > 0;
$scope.vgPlayerReady({$API: this});
};
@@ -204,39 +231,65 @@ angular.module("com.2fdevs.videogular")
};
this.onProgress = function (event) {
+ this.updateBuffer(event);
+
+ $scope.$parent.$digest();
+ };
+
+ this.updateBuffer = function getBuffer(event) {
if (event.target.buffered.length) {
this.buffered = event.target.buffered;
this.bufferEnd = 1000 * event.target.buffered.end(event.target.buffered.length - 1);
- }
- $scope.$apply();
+ // Avoid bufferEnd overflow by virtual clips
+ if (this.bufferEnd > this.totalTime) this.bufferEnd = this.totalTime;
+ }
};
this.onUpdateTime = function (event) {
- this.currentTime = 1000 * event.target.currentTime;
+ var targetTime = 1000 * event.target.currentTime;
- if (event.target.buffered.length) {
- this.buffered = event.target.buffered;
- this.bufferEnd = 1000 * event.target.buffered.end(event.target.buffered.length - 1);
- }
+ this.updateBuffer(event);
+
+ if (event.target.duration != Infinity && event.target.duration != null && event.target.duration != undefined && event.target.duration != 1.7976931348623157e+308) {
+ // Fake the duration and current time for virtual clips
+ if (isVirtualClip) {
+ if (hasStartTimePlayed && (event.target.currentTime < this.startTime || event.target.currentTime - this.startTime > this.virtualClipDuration)) {
+ this.onComplete();
+ }
+ else {
+ this.currentTime = Math.max(0, targetTime - (1000 * this.startTime));
+ this.totalTime = 1000 * this.virtualClipDuration;
+ this.timeLeft = (1000 * this.virtualClipDuration) - this.currentTime;
+ }
+ }
+ else {
+ this.currentTime = targetTime;
+ this.totalTime = 1000 * event.target.duration;
+ this.timeLeft = 1000 * (event.target.duration - event.target.currentTime);
+ }
- if (event.target.duration != Infinity) {
- this.totalTime = 1000 * event.target.duration;
- this.timeLeft = 1000 * (event.target.duration - event.target.currentTime);
this.isLive = false;
}
else {
// It's a live streaming without and end
+ this.currentTime = targetTime;
this.isLive = true;
}
+ var targetSeconds = isVirtualClip ? this.currentTime / 1000 : event.target.currentTime;
+ var targetDuration = isVirtualClip ? this.totalTime / 1000 : event.target.duration;
+
if (this.cuePoints) {
- this.checkCuePoints(event.target.currentTime);
+ this.checkCuePoints(targetSeconds);
}
- $scope.vgUpdateTime({$currentTime: event.target.currentTime, $duration: event.target.duration});
+ $scope.vgUpdateTime({$currentTime: targetSeconds, $duration: targetDuration});
- $scope.$apply();
+ // Safe apply just in case we're calling from a non-event
+ if ($scope.$$phase != '$apply' && $scope.$$phase != '$digest') {
+ $scope.$parent.$digest();
+ }
};
this.checkCuePoints = function checkCuePoints(currentTime) {
@@ -293,28 +346,30 @@ angular.module("com.2fdevs.videogular")
this.onPlay = function () {
this.setState(VG_STATES.PLAY);
- $scope.$apply();
+ $scope.$parent.$digest();
};
this.onPause = function () {
- if (this.mediaElement[0].currentTime == 0) {
+ var currentTime = isVirtualClip ? this.currentTime : this.mediaElement[0].currentTime;
+
+ if (currentTime == 0) {
this.setState(VG_STATES.STOP);
}
else {
this.setState(VG_STATES.PAUSE);
}
- $scope.$apply();
+ $scope.$parent.$digest();
};
this.onVolumeChange = function () {
this.volume = this.mediaElement[0].volume;
- $scope.$apply();
+ $scope.$parent.$digest();
};
this.onPlaybackChange = function () {
this.playback = this.mediaElement[0].playbackRate;
- $scope.$apply();
+ $scope.$parent.$digest();
};
this.onSeeking = function (event) {
@@ -328,12 +383,26 @@ angular.module("com.2fdevs.videogular")
this.seekTime = function (value, byPercent) {
var second;
if (byPercent) {
- second = value * this.mediaElement[0].duration / 100;
- this.mediaElement[0].currentTime = second;
+ if (isVirtualClip) {
+ value = Math.max(0, Math.min(value, 100));
+ second = (value * this.virtualClipDuration / 100);
+ this.mediaElement[0].currentTime = this.startTime + second;
+ }
+ else {
+ second = value * this.mediaElement[0].duration / 100;
+ this.mediaElement[0].currentTime = second;
+ }
}
else {
- second = value;
- this.mediaElement[0].currentTime = second;
+ if (isVirtualClip) {
+ var durationPercent = value/this.mediaElement[0].duration;
+ second = !hasStartTimePlayed ? 0 : this.virtualClipDuration * durationPercent;
+ this.mediaElement[0].currentTime = !hasStartTimePlayed ? this.startTime : this.startTime + second;
+ }
+ else {
+ second = value;
+ this.mediaElement[0].currentTime = second;
+ }
}
this.currentTime = 1000 * second;
@@ -371,9 +440,11 @@ angular.module("com.2fdevs.videogular")
this.stop = function () {
try {
this.mediaElement[0].pause();
- this.mediaElement[0].currentTime = 0;
- this.currentTime = 0;
+ var targetTime = isVirtualClip ? this.startTime : 0;
+ this.mediaElement[0].currentTime = targetTime;
+
+ this.currentTime = targetTime;
this.buffered = [];
this.bufferEnd = 0;
this.setState(VG_STATES.STOP);
@@ -494,12 +565,12 @@ angular.module("com.2fdevs.videogular")
this.onStartBuffering = function (event) {
this.isBuffering = true;
- $scope.$apply();
+ $scope.$parent.$digest();
};
this.onStartPlaying = function (event) {
this.isBuffering = false;
- $scope.$apply();
+ $scope.$parent.$digest();
};
this.onComplete = function (event) {
@@ -507,7 +578,12 @@ angular.module("com.2fdevs.videogular")
this.setState(VG_STATES.STOP);
this.isCompleted = true;
- $scope.$apply();
+
+ if (isVirtualClip) {
+ this.stop()
+ }
+
+ $scope.$parent.$digest();
};
this.onVideoError = function (event) {
@@ -543,6 +619,7 @@ angular.module("com.2fdevs.videogular")
this.isFullScreen = false;
this.playback = 1;
this.isConfig = ($scope.vgConfig != undefined);
+ this.mediaElement = [{play:function(){}, pause:function(){}, stop:function(){}, addEventListener:function(){}, removeEventListener: function(){}}];
if (vgFullscreen.isAvailable) {
this.isFullScreen = vgFullscreen.isFullScreen();
@@ -567,6 +644,31 @@ angular.module("com.2fdevs.videogular")
}
};
+ this.onUpdateStartTime = function onUpdateStartTime(newValue) {
+ if (newValue && (newValue != this.startTime)) {
+ this.mediaElement[0].currentTime = newValue;
+ this.startTime = newValue;
+ isVirtualClip = this.startTime >= 0 && this.virtualClipDuration > 0;
+
+ var fakeEvent = {
+ target: this.mediaElement[0]
+ };
+ this.onUpdateTime(fakeEvent, true);
+ }
+ };
+
+ this.onUpdateVirtualClipDuration = function onUpdateVirtualClipDuration(newValue) {
+ if (newValue && (newValue != this.virtualClipDuration)) {
+ this.virtualClipDuration = newValue;
+ isVirtualClip = this.startTime >= 0 && this.virtualClipDuration > 0;
+
+ var fakeEvent = {
+ target: this.mediaElement[0]
+ };
+ this.onUpdateTime(fakeEvent, true);
+ }
+ };
+
this.onUpdatePlaysInline = function onUpdatePlaysInline(newValue) {
this.playsInline = newValue;
};
@@ -591,6 +693,10 @@ angular.module("com.2fdevs.videogular")
$scope.$watch("vgAutoPlay", this.onUpdateAutoPlay.bind(this));
+ $scope.$watch("vgStartTime", this.onUpdateStartTime.bind(this));
+
+ $scope.$watch("vgVirtualClipDuration", this.onUpdateVirtualClipDuration.bind(this));
+
$scope.$watch("vgPlaysInline", this.onUpdatePlaysInline.bind(this));
$scope.$watch("vgNativeFullscreen", this.onUpdateNativeFullscreen.bind(this));
@@ -602,7 +708,7 @@ angular.module("com.2fdevs.videogular")
this.onFullScreenChange = function (event) {
this.isFullScreen = vgFullscreen.isFullScreen();
- $scope.$apply();
+ $scope.$parent.$digest();
};
// Empty mediaElement on destroy to avoid that Chrome downloads video even when it's not present
@@ -738,7 +844,7 @@ angular.module("com.2fdevs.videogular")
* @description
* Directive to add a source of videos or audios. This directive will create a &lt;video&gt; or &lt;audio&gt; tag and usually will be above plugin tags.
*
- * @param {array} vgSrc Bindable array with a list of media sources. A media source is an object with two properties `src` and `type`. The `src` property must contains a trustful url resource.
+ * @param {array} vgSrc Bindable array with a list of media sources or a simple url string. A media source is an object with two properties `src` and `type`. The `src` property must contains a trustful url resource.
* @param {string} vgType String with "video" or "audio" values to set a <video> or <audio> tag inside <vg-media>.
* <pre>
* {
@@ -789,36 +895,42 @@ angular.module("com.2fdevs.videogular")
};
scope.changeSource = function changeSource() {
- var canPlay = "";
-
- // It's a cool browser
- if (API.mediaElement[0].canPlayType) {
- for (var i = 0, l = sources.length; i < l; i++) {
- canPlay = API.mediaElement[0].canPlayType(sources[i].type);
-
- if (canPlay == "maybe" || canPlay == "probably") {
- API.mediaElement.attr("src", sources[i].src);
- API.mediaElement.attr("type", sources[i].type);
- //Trigger vgChangeSource($source) API callback in vgController
- API.changeSource(sources[i]);
- break;
+
+ if (angular.isArray(sources)) {
+ var canPlay = "";
+
+ // It's a cool browser
+ if (API.mediaElement[0].canPlayType) {
+ for (var i = 0, l = sources.length; i < l; i++) {
+ canPlay = API.mediaElement[0].canPlayType(sources[i].type);
+
+ if (canPlay == "maybe" || canPlay == "probably") {
+ API.mediaElement.attr("src", sources[i].src);
+ API.mediaElement.attr("type", sources[i].type);
+ //Trigger vgChangeSource($source) API callback in vgController
+ API.changeSource(sources[i]);
+ break;
+ }
}
}
- }
- // It's a crappy browser and it doesn't deserve any respect
- else {
- // Get H264 or the first one
- API.mediaElement.attr("src", sources[0].src);
- API.mediaElement.attr("type", sources[0].type);
+ // It's a crappy browser and it doesn't deserve any respect
+ else {
+ // Get H264 or the first one
+ API.mediaElement.attr("src", sources[0].src);
+ API.mediaElement.attr("type", sources[0].type);
+ //Trigger vgChangeSource($source) API callback in vgController
+ API.changeSource(sources[0]);
+ }
+ } else {
+ API.mediaElement.attr("src", sources);
//Trigger vgChangeSource($source) API callback in vgController
- API.changeSource(sources[0]);
+ API.changeSource(sources);
}
-
// Android 2.3 support: https://github.com/2fdevs/videogular/issues/187
if (VG_UTILS.isMobileDevice()) API.mediaElement[0].load();
$timeout(function () {
- if (API.autoPlay && !VG_UTILS.isMobileDevice()) {
+ if (API.autoPlay && (VG_UTILS.isCordova() || !VG_UTILS.isMobileDevice())) {
API.play();
}
});
@@ -1126,6 +1238,10 @@ angular.module("com.2fdevs.videogular")
*
* **This parameter is disabled in mobile devices** because user must click on content to prevent consuming mobile data plans.
*
+ * @param {boolean} [vgStartTime=-1] vgStartTime Number value or a String with a scope name variable to start playing the video at a certain time.
+ *
+ * @param {boolean} [vgVirtualClipDuration=-1] vgVirtualClipDuration Number value or a String with a scope name variable for a length to limit the video playback to.
+ *
* @param {object} vgCuePoints Bindable object containing a list of timelines with cue points objects. A timeline is an array of objects with the following properties:
* - `timeLapse` is an object with two properties `start` and `end` representing in seconds the period for this cue points.
* - `onEnter` callback called when user enters on a cue point. callback(currentTime, timeLapse, params)
@@ -1140,6 +1256,8 @@ angular.module("com.2fdevs.videogular")
"controls": false,
"loop": false,
"autoplay": false,
+ "startTime": -1,
+ "virtualClipDuration": -1,
"preload": "auto",
"theme": "path/to/videogular.css",
"sources": [
@@ -1222,6 +1340,8 @@ angular.module("com.2fdevs.videogular")
scope: {
vgTheme: "=?",
vgAutoPlay: "=?",
+ vgStartTime: "=?",
+ vgVirtualClipDuration: "=?",
vgPlaysInline: "=?",
vgNativeFullscreen: "=?",
vgClearMediaOnNavigate: "=?",
@@ -1451,7 +1571,11 @@ angular.module("com.2fdevs.videogular")
};
this.isiOSDevice = function () {
- return (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i));
+ return (navigator.userAgent.match(/ip(hone|ad|od)/i) && !navigator.userAgent.match(/(iemobile)[\/\s]?([\w\.]*)/i));
+ };
+
+ this.isCordova = function () {
+ return document.URL.indexOf('http://') === -1 && document.URL.indexOf('https://') === -1;
};
/**
@@ -1460,9 +1584,9 @@ angular.module("com.2fdevs.videogular")
*/
this.supportsLocalStorage = function () {
var testKey = 'videogular-test-key';
- var storage = $window.sessionStorage;
try {
+ var storage = $window.sessionStorage;
storage.setItem(testKey, '1');
storage.removeItem(testKey);
return 'localStorage' in $window && $window['localStorage'] !== null;
diff --git a/www/lib/videogular/videogular.min.js b/www/lib/videogular/videogular.min.js
index 977e6c0b..9c42a625 100644
--- a/www/lib/videogular/videogular.min.js
+++ b/www/lib/videogular/videogular.min.js
@@ -1 +1 @@
-"use strict";angular.module("com.2fdevs.videogular",["ngSanitize"]).run(["$templateCache",function(a){a.put("vg-templates/vg-media-video","<video></video>"),a.put("vg-templates/vg-media-audio","<audio></audio>"),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e})}]),angular.module("com.2fdevs.videogular").constant("VG_STATES",{PLAY:"play",PAUSE:"pause",STOP:"stop"}).constant("VG_VOLUME_KEY","videogularVolume"),angular.module("com.2fdevs.videogular").controller("vgController",["$scope","$window","vgConfigLoader","vgFullscreen","VG_UTILS","VG_STATES","VG_VOLUME_KEY",function(a,b,c,d,e,f,g){var h=null,i=!1,j=!1;this.videogularElement=null,this.clearMedia=function(){this.mediaElement[0].src=""},this.onRouteChange=function(){(void 0===this.clearMediaOnNavigate||this.clearMediaOnNavigate===!0)&&this.clearMedia()},this.onCanPlay=function(b){this.isBuffering=!1,a.$apply(a.vgCanPlay({$event:b}))},this.onVideoReady=function(){this.isReady=!0,this.autoPlay=a.vgAutoPlay,this.playsInline=a.vgPlaysInline,this.nativeFullscreen=a.vgNativeFullscreen||!0,this.cuePoints=a.vgCuePoints,this.clearMediaOnNavigate=a.vgClearMediaOnNavigate||!0,this.currentState=f.STOP,j=!0,e.supportsLocalStorage()&&this.setVolume(parseFloat(b.localStorage.getItem(g)||"1")),a.vgConfig?c.loadConfig(a.vgConfig).then(this.onLoadConfig.bind(this)):a.vgPlayerReady({$API:this})},this.onLoadConfig=function(b){this.config=b,a.vgTheme=this.config.theme,a.vgAutoPlay=this.config.autoPlay,a.vgPlaysInline=this.config.playsInline,a.vgNativeFullscreen=this.config.nativeFullscreen,a.vgCuePoints=this.config.cuePoints,a.vgClearMediaOnNavigate=this.config.clearMediaOnNavigate,a.vgPlayerReady({$API:this})},this.onLoadMetaData=function(a){this.isBuffering=!1,this.onUpdateTime(a)},this.onProgress=function(b){b.target.buffered.length&&(this.buffered=b.target.buffered,this.bufferEnd=1e3*b.target.buffered.end(b.target.buffered.length-1)),a.$apply()},this.onUpdateTime=function(b){this.currentTime=1e3*b.target.currentTime,b.target.buffered.length&&(this.buffered=b.target.buffered,this.bufferEnd=1e3*b.target.buffered.end(b.target.buffered.length-1)),b.target.duration!=1/0?(this.totalTime=1e3*b.target.duration,this.timeLeft=1e3*(b.target.duration-b.target.currentTime),this.isLive=!1):this.isLive=!0,this.cuePoints&&this.checkCuePoints(b.target.currentTime),a.vgUpdateTime({$currentTime:b.target.currentTime,$duration:b.target.duration}),a.$apply()},this.checkCuePoints=function(a){for(var b in this.cuePoints)for(var c=0,d=this.cuePoints[b].length;d>c;c++){var e=this.cuePoints[b][c],f=parseInt(a,10),g=parseInt(e.timeLapse.start,10);e.timeLapse.end||(e.timeLapse.end=e.timeLapse.start+1),a<e.timeLapse.end&&(e.$$isCompleted=!1),e.$$isDirty||f!==g||"function"!=typeof e.onEnter||(e.onEnter(a,e.timeLapse,e.params),e.$$isDirty=!0),a>e.timeLapse.start?(a<e.timeLapse.end&&(e.onUpdate&&e.onUpdate(a,e.timeLapse,e.params),e.$$isDirty||"function"!=typeof e.onEnter||e.onEnter(a,e.timeLapse,e.params)),a>=e.timeLapse.end&&e.onComplete&&!e.$$isCompleted&&(e.$$isCompleted=!0,e.onComplete(a,e.timeLapse,e.params)),e.$$isDirty=!0):(e.onLeave&&e.$$isDirty&&e.onLeave(a,e.timeLapse,e.params),e.$$isDirty=!1)}},this.onPlay=function(){this.setState(f.PLAY),a.$apply()},this.onPause=function(){0==this.mediaElement[0].currentTime?this.setState(f.STOP):this.setState(f.PAUSE),a.$apply()},this.onVolumeChange=function(){this.volume=this.mediaElement[0].volume,a.$apply()},this.onPlaybackChange=function(){this.playback=this.mediaElement[0].playbackRate,a.$apply()},this.onSeeking=function(b){a.vgSeeking({$currentTime:b.target.currentTime,$duration:b.target.duration})},this.onSeeked=function(b){a.vgSeeked({$currentTime:b.target.currentTime,$duration:b.target.duration})},this.seekTime=function(a,b){var c;b?(c=a*this.mediaElement[0].duration/100,this.mediaElement[0].currentTime=c):(c=a,this.mediaElement[0].currentTime=c),this.currentTime=1e3*c},this.playPause=function(){this.mediaElement[0].paused?this.play():this.pause()},this.setState=function(b){return b&&b!=this.currentState&&(a.vgUpdateState({$state:b}),this.currentState=b),this.currentState},this.play=function(){this.mediaElement[0].play(),this.setState(f.PLAY)},this.pause=function(){this.mediaElement[0].pause(),this.setState(f.PAUSE)},this.stop=function(){try{this.mediaElement[0].pause(),this.mediaElement[0].currentTime=0,this.currentTime=0,this.buffered=[],this.bufferEnd=0,this.setState(f.STOP)}catch(a){return a}},this.toggleFullScreen=function(){d.isAvailable&&this.nativeFullscreen?this.isFullScreen?e.isMobileDevice()||d.exit():e.isMobileDevice()?e.isiOSDevice()?j?this.enterElementInFullScreen(this.mediaElement[0]):(i=!0,this.play()):this.enterElementInFullScreen(this.mediaElement[0]):this.enterElementInFullScreen(this.videogularElement[0]):(this.isFullScreen?(this.videogularElement.removeClass("fullscreen"),this.videogularElement.css("z-index","auto")):(this.videogularElement.addClass("fullscreen"),this.videogularElement.css("z-index",e.getZIndex())),this.isFullScreen=!this.isFullScreen)},this.enterElementInFullScreen=function(a){d.request(a)},this.changeSource=function(b){a.vgChangeSource({$source:b})},this.setVolume=function(c){c=Math.max(Math.min(c,1),0),a.vgUpdateVolume({$volume:c}),this.mediaElement[0].volume=c,this.volume=c,e.supportsLocalStorage()&&b.localStorage.setItem(g,c.toString())},this.setPlayback=function(b){a.vgUpdatePlayback({$playBack:b}),this.mediaElement[0].playbackRate=b,this.playback=b},this.updateTheme=function(a){var b,c,d=document.getElementsByTagName("link");if(h)for(b=0,c=d.length;c>b;b++)if(d[b].outerHTML.indexOf(h)>=0){d[b].parentNode.removeChild(d[b]);break}if(a){var e=angular.element(document).find("head"),f=!1;for(b=0,c=d.length;c>b&&!(f=d[b].outerHTML.indexOf(a)>=0);b++);f||e.append("<link rel='stylesheet' href='"+a+"'>"),h=a}},this.onStartBuffering=function(b){this.isBuffering=!0,a.$apply()},this.onStartPlaying=function(b){this.isBuffering=!1,a.$apply()},this.onComplete=function(b){a.vgComplete(),this.setState(f.STOP),this.isCompleted=!0,a.$apply()},this.onVideoError=function(b){a.vgError({$event:b})},this.addListeners=function(){this.mediaElement[0].addEventListener("canplay",this.onCanPlay.bind(this),!1),this.mediaElement[0].addEventListener("loadedmetadata",this.onLoadMetaData.bind(this),!1),this.mediaElement[0].addEventListener("waiting",this.onStartBuffering.bind(this),!1),this.mediaElement[0].addEventListener("ended",this.onComplete.bind(this),!1),this.mediaElement[0].addEventListener("playing",this.onStartPlaying.bind(this),!1),this.mediaElement[0].addEventListener("play",this.onPlay.bind(this),!1),this.mediaElement[0].addEventListener("pause",this.onPause.bind(this),!1),this.mediaElement[0].addEventListener("volumechange",this.onVolumeChange.bind(this),!1),this.mediaElement[0].addEventListener("playbackchange",this.onPlaybackChange.bind(this),!1),this.mediaElement[0].addEventListener("timeupdate",this.onUpdateTime.bind(this),!1),this.mediaElement[0].addEventListener("progress",this.onProgress.bind(this),!1),this.mediaElement[0].addEventListener("seeking",this.onSeeking.bind(this),!1),this.mediaElement[0].addEventListener("seeked",this.onSeeked.bind(this),!1),this.mediaElement[0].addEventListener("error",this.onVideoError.bind(this),!1)},this.init=function(){this.isReady=!1,this.isCompleted=!1,this.buffered=[],this.bufferEnd=0,this.currentTime=0,this.totalTime=0,this.timeLeft=0,this.isLive=!1,this.isFullScreen=!1,this.playback=1,this.isConfig=void 0!=a.vgConfig,d.isAvailable&&(this.isFullScreen=d.isFullScreen()),this.updateTheme(a.vgTheme),this.addBindings(),d.isAvailable&&document.addEventListener(d.onchange,this.onFullScreenChange.bind(this))},this.onUpdateTheme=function(a){this.updateTheme(a)},this.onUpdateAutoPlay=function(a){a&&!this.autoPlay&&(this.autoPlay=a,this.play(this))},this.onUpdatePlaysInline=function(a){this.playsInline=a},this.onUpdateNativeFullscreen=function(a){void 0==a&&(a=!0),this.nativeFullscreen=a},this.onUpdateCuePoints=function(a){this.cuePoints=a,this.checkCuePoints(this.currentTime)},this.onUpdateClearMediaOnNavigate=function(a){this.clearMediaOnNavigate=a},this.addBindings=function(){a.$watch("vgTheme",this.onUpdateTheme.bind(this)),a.$watch("vgAutoPlay",this.onUpdateAutoPlay.bind(this)),a.$watch("vgPlaysInline",this.onUpdatePlaysInline.bind(this)),a.$watch("vgNativeFullscreen",this.onUpdateNativeFullscreen.bind(this)),a.$watch("vgCuePoints",this.onUpdateCuePoints.bind(this)),a.$watch("vgClearMediaOnNavigate",this.onUpdateClearMediaOnNavigate.bind(this))},this.onFullScreenChange=function(b){this.isFullScreen=d.isFullScreen(),a.$apply()},a.$on("$destroy",this.clearMedia.bind(this)),a.$on("$routeChangeStart",this.onRouteChange.bind(this)),this.init()}]),angular.module("com.2fdevs.videogular").directive("vgCrossorigin",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setCrossorigin=function(a){a?d.mediaElement.attr("crossorigin",a):d.mediaElement.removeAttr("crossorigin")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setCrossorigin(d.config.crossorigin)}):a.$watch(c.vgCrossorigin,function(b,c){e&&b==c||!b?a.setCrossorigin():(e=b,a.setCrossorigin(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgLoop",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setLoop=function(a){a?d.mediaElement.attr("loop",a):d.mediaElement.removeAttr("loop")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setLoop(d.config.loop)}):a.$watch(c.vgLoop,function(b,c){e&&b==c||!b?a.setLoop():(e=b,a.setLoop(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgMedia",["$timeout","VG_UTILS","VG_STATES",function(a,b,c){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){var c=b.vgType||"video";return b.vgTemplate||"vg-templates/vg-media-"+c},scope:{vgSrc:"=?",vgType:"=?"},link:function(d,e,f,g){var h;f.vgType&&"video"!==f.vgType?f.vgType="audio":f.vgType="video",d.onChangeSource=function(a,b){h&&a==b||!a||(h=a,g.currentState!==c.PLAY&&(g.currentState=c.STOP),g.sources=h,d.changeSource())},d.changeSource=function(){var c="";if(g.mediaElement[0].canPlayType){for(var d=0,e=h.length;e>d;d++)if(c=g.mediaElement[0].canPlayType(h[d].type),"maybe"==c||"probably"==c){g.mediaElement.attr("src",h[d].src),g.mediaElement.attr("type",h[d].type),g.changeSource(h[d]);break}}else g.mediaElement.attr("src",h[0].src),g.mediaElement.attr("type",h[0].type),g.changeSource(h[0]);b.isMobileDevice()&&g.mediaElement[0].load(),a(function(){g.autoPlay&&!b.isMobileDevice()&&g.play()}),""==c&&g.onVideoError()},g.mediaElement=e.find(f.vgType),g.sources=d.vgSrc,g.addListeners(),g.onVideoReady(),d.$watch("vgSrc",d.onChangeSource),d.$watch(function(){return g.sources},d.onChangeSource),d.$watch(function(){return g.playsInline},function(a,b){a?g.mediaElement.attr("webkit-playsinline",""):g.mediaElement.removeAttr("webkit-playsinline")}),g.isConfig&&d.$watch(function(){return g.config},function(){g.config&&(d.vgSrc=g.config.sources)})}}}]),angular.module("com.2fdevs.videogular").directive("vgNativeControls",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setControls=function(a){a?d.mediaElement.attr("controls",a):d.mediaElement.removeAttr("controls")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setControls(d.config.controls)}):a.$watch(c.vgNativeControls,function(b,c){e&&b==c||!b?a.setControls():(e=b,a.setControls(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgPreload",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setPreload=function(a){a?d.mediaElement.attr("preload",a):d.mediaElement.removeAttr("preload")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setPreload(d.config.preload)}):a.$watch(c.vgPreload,function(b,c){e&&b==c||!b?a.setPreload():(e=b,a.setPreload(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgTracks",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e,f,g,h=!1;a.onLoadMetaData=function(){h=!0,a.updateTracks()},a.updateTracks=function(){var b=d.mediaElement.children();for(f=0,g=b.length;g>f;f++)b[f].remove&&b[f].remove();if(e)for(f=0,g=e.length;g>f;f++){var c=document.createElement("track");for(var h in e[f])c[h]=e[f][h];c.addEventListener("load",a.onLoadTrack.bind(a,c)),d.mediaElement[0].appendChild(c)}},a.onLoadTrack=function(b){b["default"]?b.mode="showing":b.mode="hidden";for(var c=0,e=d.mediaElement[0].textTracks.length;e>c;c++)b.label==d.mediaElement[0].textTracks[c].label&&(b["default"]?d.mediaElement[0].textTracks[c].mode="showing":d.mediaElement[0].textTracks[c].mode="disabled");b.removeEventListener("load",a.onLoadTrack.bind(a,b))},a.setTracks=function(b){e=b,d.tracks=b,h?a.updateTracks():d.mediaElement[0].addEventListener("loadedmetadata",a.onLoadMetaData.bind(a),!1)},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setTracks(d.config.tracks)}):a.$watch(c.vgTracks,function(b,c){e&&b==c||a.setTracks(b)},!0)}}}}]),angular.module("com.2fdevs.videogular").directive("videogular",[function(){return{restrict:"EA",scope:{vgTheme:"=?",vgAutoPlay:"=?",vgPlaysInline:"=?",vgNativeFullscreen:"=?",vgClearMediaOnNavigate:"=?",vgCuePoints:"=?",vgConfig:"@",vgCanPlay:"&",vgComplete:"&",vgUpdateVolume:"&",vgUpdatePlayback:"&",vgUpdateTime:"&",vgUpdateState:"&",vgPlayerReady:"&",vgChangeSource:"&",vgSeeking:"&",vgSeeked:"&",vgError:"&"},controller:"vgController",controllerAs:"API",link:{pre:function(a,b,c,d){d.videogularElement=angular.element(b)}}}}]),angular.module("com.2fdevs.videogular").service("vgConfigLoader",["$http","$q","$sce",function(a,b,c){this.loadConfig=function(d){var e=b.defer();return a({method:"GET",url:d}).then(function(a){for(var b=a.data,d=0,f=b.sources.length;f>d;d++)b.sources[d].src=c.trustAsResourceUrl(b.sources[d].src);e.resolve(b)},function(){e.reject()}),e.promise}}]),angular.module("com.2fdevs.videogular").service("vgFullscreen",["VG_UTILS",function(a){function b(){var a=!1;return a=c?null!=document[d.element]||c.webkitDisplayingFullscreen:null!=document[d.element]}var c,d=null,e={w3:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",onchange:"fullscreenchange",onerror:"fullscreenerror"},newWebkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},oldWebkit:{enabled:"webkitIsFullScreen",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullScreen",exit:"webkitCancelFullScreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},moz:{enabled:"mozFullScreen",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",onchange:"mozfullscreenchange",onerror:"mozfullscreenerror"},ios:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitEnterFullscreen",exit:"webkitExitFullscreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",onchange:"MSFullscreenChange",onerror:"MSFullscreenError"}};for(var f in e)if(e[f].enabled in document){d=e[f];break}a.isiOSDevice()&&(d=e.ios),this.isAvailable=null!=d,d&&(this.onchange=d.onchange,this.onerror=d.onerror,this.isFullScreen=b,this.exit=function(){document[d.exit]()},this.request=function(a){c=a,c[d.request]()})}]),angular.module("com.2fdevs.videogular").service("VG_UTILS",["$window",function(a){this.fixEventOffset=function(a){var b=navigator.userAgent.match(/Firefox\/(\d+)/i);if(b&&Number.parseInt(b.pop())<39){var c=a.currentTarget.currentStyle||window.getComputedStyle(a.target,null),d=parseInt(c.borderLeftWidth,10),e=parseInt(c.borderTopWidth,10),f=a.currentTarget.getBoundingClientRect(),g=a.clientX-d-f.left,h=a.clientY-e-f.top;a.offsetX=g,a.offsetY=h}return a},this.getZIndex=function(){for(var a,b=1,c=document.getElementsByTagName("*"),d=0,e=c.length;e>d;d++)a=parseInt(window.getComputedStyle(c[d])["z-index"]),a>b&&(b=a+1);return b},this.isMobileDevice=function(){return"undefined"!=typeof window.orientation||-1!==navigator.userAgent.indexOf("IEMobile")},this.isiOSDevice=function(){return navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/iPad/i)},this.supportsLocalStorage=function(){var b="videogular-test-key",c=a.sessionStorage;try{return c.setItem(b,"1"),c.removeItem(b),"localStorage"in a&&null!==a.localStorage}catch(d){return!1}}}]); \ No newline at end of file
+"use strict";angular.module("com.2fdevs.videogular",["ngSanitize"]).run(["$templateCache",function(a){a.put("vg-templates/vg-media-video","<video></video>"),a.put("vg-templates/vg-media-audio","<audio></audio>"),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e})}]),angular.module("com.2fdevs.videogular").constant("VG_STATES",{PLAY:"play",PAUSE:"pause",STOP:"stop"}).constant("VG_VOLUME_KEY","videogularVolume"),angular.module("com.2fdevs.videogular").controller("vgController",["$scope","$window","vgConfigLoader","vgFullscreen","VG_UTILS","VG_STATES","VG_VOLUME_KEY",function(a,b,c,d,e,f,g){var h=null,i=!1,j=!1,k=!1,l=!1;this.videogularElement=null,this.clearMedia=function(){this.mediaElement[0].src="",this.mediaElement[0].removeEventListener("canplay",this.onCanPlay.bind(this),!1),this.mediaElement[0].removeEventListener("loadedmetadata",this.onLoadMetaData.bind(this),!1),this.mediaElement[0].removeEventListener("waiting",this.onStartBuffering.bind(this),!1),this.mediaElement[0].removeEventListener("ended",this.onComplete.bind(this),!1),this.mediaElement[0].removeEventListener("playing",this.onStartPlaying.bind(this),!1),this.mediaElement[0].removeEventListener("play",this.onPlay.bind(this),!1),this.mediaElement[0].removeEventListener("pause",this.onPause.bind(this),!1),this.mediaElement[0].removeEventListener("volumechange",this.onVolumeChange.bind(this),!1),this.mediaElement[0].removeEventListener("playbackchange",this.onPlaybackChange.bind(this),!1),this.mediaElement[0].removeEventListener("timeupdate",this.onUpdateTime.bind(this),!1),this.mediaElement[0].removeEventListener("progress",this.onProgress.bind(this),!1),this.mediaElement[0].removeEventListener("seeking",this.onSeeking.bind(this),!1),this.mediaElement[0].removeEventListener("seeked",this.onSeeked.bind(this),!1),this.mediaElement[0].removeEventListener("error",this.onVideoError.bind(this),!1)},this.onRouteChange=function(){(void 0===this.clearMediaOnNavigate||this.clearMediaOnNavigate===!0)&&this.clearMedia()},this.onCanPlay=function(b){this.isBuffering=!1,a.$parent.$digest(a.vgCanPlay({$event:b})),!k&&(this.startTime>0||0===this.startTime)&&(this.seekTime(this.startTime),k=!0)},this.onVideoReady=function(){this.isReady=!0,this.autoPlay=a.vgAutoPlay,this.playsInline=a.vgPlaysInline,this.nativeFullscreen=a.vgNativeFullscreen||!0,this.cuePoints=a.vgCuePoints,this.startTime=a.vgStartTime,this.virtualClipDuration=a.vgVirtualClipDuration,this.clearMediaOnNavigate=a.vgClearMediaOnNavigate||!0,this.currentState=f.STOP,j=!0,l=this.startTime>=0&&this.virtualClipDuration>0,e.supportsLocalStorage()&&this.setVolume(parseFloat(b.localStorage.getItem(g)||"1")),a.vgConfig?c.loadConfig(a.vgConfig).then(this.onLoadConfig.bind(this)):a.vgPlayerReady({$API:this})},this.onLoadConfig=function(b){this.config=b,a.vgTheme=this.config.theme,a.vgAutoPlay=this.config.autoPlay,a.vgPlaysInline=this.config.playsInline,a.vgNativeFullscreen=this.config.nativeFullscreen,a.vgCuePoints=this.config.cuePoints,a.vgClearMediaOnNavigate=this.config.clearMediaOnNavigate,a.vgStartTime=this.config.startTime,a.vgVirtualClipDuration=this.config.virtualClipDuration,l=a.vgStartTime>=0&&a.vgVirtualClipDuration>0,a.vgPlayerReady({$API:this})},this.onLoadMetaData=function(a){this.isBuffering=!1,this.onUpdateTime(a)},this.onProgress=function(b){this.updateBuffer(b),a.$parent.$digest()},this.updateBuffer=function(a){a.target.buffered.length&&(this.buffered=a.target.buffered,this.bufferEnd=1e3*a.target.buffered.end(a.target.buffered.length-1),this.bufferEnd>this.totalTime&&(this.bufferEnd=this.totalTime))},this.onUpdateTime=function(b){var c=1e3*b.target.currentTime;this.updateBuffer(b),b.target.duration!=1/0&&null!=b.target.duration&&void 0!=b.target.duration&&1.7976931348623157e308!=b.target.duration?(l?k&&(b.target.currentTime<this.startTime||b.target.currentTime-this.startTime>this.virtualClipDuration)?this.onComplete():(this.currentTime=Math.max(0,c-1e3*this.startTime),this.totalTime=1e3*this.virtualClipDuration,this.timeLeft=1e3*this.virtualClipDuration-this.currentTime):(this.currentTime=c,this.totalTime=1e3*b.target.duration,this.timeLeft=1e3*(b.target.duration-b.target.currentTime)),this.isLive=!1):(this.currentTime=c,this.isLive=!0);var d=l?this.currentTime/1e3:b.target.currentTime,e=l?this.totalTime/1e3:b.target.duration;this.cuePoints&&this.checkCuePoints(d),a.vgUpdateTime({$currentTime:d,$duration:e}),"$apply"!=a.$$phase&&"$digest"!=a.$$phase&&a.$parent.$digest()},this.checkCuePoints=function(a){for(var b in this.cuePoints)for(var c=0,d=this.cuePoints[b].length;d>c;c++){var e=this.cuePoints[b][c],f=parseInt(a,10),g=parseInt(e.timeLapse.start,10);e.timeLapse.end||(e.timeLapse.end=e.timeLapse.start+1),a<e.timeLapse.end&&(e.$$isCompleted=!1),e.$$isDirty||f!==g||"function"!=typeof e.onEnter||(e.onEnter(a,e.timeLapse,e.params),e.$$isDirty=!0),a>e.timeLapse.start?(a<e.timeLapse.end&&(e.onUpdate&&e.onUpdate(a,e.timeLapse,e.params),e.$$isDirty||"function"!=typeof e.onEnter||e.onEnter(a,e.timeLapse,e.params)),a>=e.timeLapse.end&&e.onComplete&&!e.$$isCompleted&&(e.$$isCompleted=!0,e.onComplete(a,e.timeLapse,e.params)),e.$$isDirty=!0):(e.onLeave&&e.$$isDirty&&e.onLeave(a,e.timeLapse,e.params),e.$$isDirty=!1)}},this.onPlay=function(){this.setState(f.PLAY),a.$parent.$digest()},this.onPause=function(){var b=l?this.currentTime:this.mediaElement[0].currentTime;0==b?this.setState(f.STOP):this.setState(f.PAUSE),a.$parent.$digest()},this.onVolumeChange=function(){this.volume=this.mediaElement[0].volume,a.$parent.$digest()},this.onPlaybackChange=function(){this.playback=this.mediaElement[0].playbackRate,a.$parent.$digest()},this.onSeeking=function(b){a.vgSeeking({$currentTime:b.target.currentTime,$duration:b.target.duration})},this.onSeeked=function(b){a.vgSeeked({$currentTime:b.target.currentTime,$duration:b.target.duration})},this.seekTime=function(a,b){var c;if(b)l?(a=Math.max(0,Math.min(a,100)),c=a*this.virtualClipDuration/100,this.mediaElement[0].currentTime=this.startTime+c):(c=a*this.mediaElement[0].duration/100,this.mediaElement[0].currentTime=c);else if(l){var d=a/this.mediaElement[0].duration;c=k?this.virtualClipDuration*d:0,this.mediaElement[0].currentTime=k?this.startTime+c:this.startTime}else c=a,this.mediaElement[0].currentTime=c;this.currentTime=1e3*c},this.playPause=function(){this.mediaElement[0].paused?this.play():this.pause()},this.setState=function(b){return b&&b!=this.currentState&&(a.vgUpdateState({$state:b}),this.currentState=b),this.currentState},this.play=function(){this.mediaElement[0].play(),this.setState(f.PLAY)},this.pause=function(){this.mediaElement[0].pause(),this.setState(f.PAUSE)},this.stop=function(){try{this.mediaElement[0].pause();var a=l?this.startTime:0;this.mediaElement[0].currentTime=a,this.currentTime=a,this.buffered=[],this.bufferEnd=0,this.setState(f.STOP)}catch(b){return b}},this.toggleFullScreen=function(){d.isAvailable&&this.nativeFullscreen?this.isFullScreen?e.isMobileDevice()||d.exit():e.isMobileDevice()?e.isiOSDevice()?j?this.enterElementInFullScreen(this.mediaElement[0]):(i=!0,this.play()):this.enterElementInFullScreen(this.mediaElement[0]):this.enterElementInFullScreen(this.videogularElement[0]):(this.isFullScreen?(this.videogularElement.removeClass("fullscreen"),this.videogularElement.css("z-index","auto")):(this.videogularElement.addClass("fullscreen"),this.videogularElement.css("z-index",e.getZIndex())),this.isFullScreen=!this.isFullScreen)},this.enterElementInFullScreen=function(a){d.request(a)},this.changeSource=function(b){a.vgChangeSource({$source:b})},this.setVolume=function(c){c=Math.max(Math.min(c,1),0),a.vgUpdateVolume({$volume:c}),this.mediaElement[0].volume=c,this.volume=c,e.supportsLocalStorage()&&b.localStorage.setItem(g,c.toString())},this.setPlayback=function(b){a.vgUpdatePlayback({$playBack:b}),this.mediaElement[0].playbackRate=b,this.playback=b},this.updateTheme=function(a){var b,c,d=document.getElementsByTagName("link");if(h)for(b=0,c=d.length;c>b;b++)if(d[b].outerHTML.indexOf(h)>=0){d[b].parentNode.removeChild(d[b]);break}if(a){var e=angular.element(document).find("head"),f=!1;for(b=0,c=d.length;c>b&&!(f=d[b].outerHTML.indexOf(a)>=0);b++);f||e.append("<link rel='stylesheet' href='"+a+"'>"),h=a}},this.onStartBuffering=function(b){this.isBuffering=!0,a.$parent.$digest()},this.onStartPlaying=function(b){this.isBuffering=!1,a.$parent.$digest()},this.onComplete=function(b){a.vgComplete(),this.setState(f.STOP),this.isCompleted=!0,l&&this.stop(),a.$parent.$digest()},this.onVideoError=function(b){a.vgError({$event:b})},this.addListeners=function(){this.mediaElement[0].addEventListener("canplay",this.onCanPlay.bind(this),!1),this.mediaElement[0].addEventListener("loadedmetadata",this.onLoadMetaData.bind(this),!1),this.mediaElement[0].addEventListener("waiting",this.onStartBuffering.bind(this),!1),this.mediaElement[0].addEventListener("ended",this.onComplete.bind(this),!1),this.mediaElement[0].addEventListener("playing",this.onStartPlaying.bind(this),!1),this.mediaElement[0].addEventListener("play",this.onPlay.bind(this),!1),this.mediaElement[0].addEventListener("pause",this.onPause.bind(this),!1),this.mediaElement[0].addEventListener("volumechange",this.onVolumeChange.bind(this),!1),this.mediaElement[0].addEventListener("playbackchange",this.onPlaybackChange.bind(this),!1),this.mediaElement[0].addEventListener("timeupdate",this.onUpdateTime.bind(this),!1),this.mediaElement[0].addEventListener("progress",this.onProgress.bind(this),!1),this.mediaElement[0].addEventListener("seeking",this.onSeeking.bind(this),!1),this.mediaElement[0].addEventListener("seeked",this.onSeeked.bind(this),!1),this.mediaElement[0].addEventListener("error",this.onVideoError.bind(this),!1)},this.init=function(){this.isReady=!1,this.isCompleted=!1,this.buffered=[],this.bufferEnd=0,this.currentTime=0,this.totalTime=0,this.timeLeft=0,this.isLive=!1,this.isFullScreen=!1,this.playback=1,this.isConfig=void 0!=a.vgConfig,this.mediaElement=[{play:function(){},pause:function(){},stop:function(){},addEventListener:function(){},removeEventListener:function(){}}],d.isAvailable&&(this.isFullScreen=d.isFullScreen()),this.updateTheme(a.vgTheme),this.addBindings(),d.isAvailable&&document.addEventListener(d.onchange,this.onFullScreenChange.bind(this))},this.onUpdateTheme=function(a){this.updateTheme(a)},this.onUpdateAutoPlay=function(a){a&&!this.autoPlay&&(this.autoPlay=a,this.play(this))},this.onUpdateStartTime=function(a){if(a&&a!=this.startTime){this.mediaElement[0].currentTime=a,this.startTime=a,l=this.startTime>=0&&this.virtualClipDuration>0;var b={target:this.mediaElement[0]};this.onUpdateTime(b,!0)}},this.onUpdateVirtualClipDuration=function(a){if(a&&a!=this.virtualClipDuration){this.virtualClipDuration=a,l=this.startTime>=0&&this.virtualClipDuration>0;var b={target:this.mediaElement[0]};this.onUpdateTime(b,!0)}},this.onUpdatePlaysInline=function(a){this.playsInline=a},this.onUpdateNativeFullscreen=function(a){void 0==a&&(a=!0),this.nativeFullscreen=a},this.onUpdateCuePoints=function(a){this.cuePoints=a,this.checkCuePoints(this.currentTime)},this.onUpdateClearMediaOnNavigate=function(a){this.clearMediaOnNavigate=a},this.addBindings=function(){a.$watch("vgTheme",this.onUpdateTheme.bind(this)),a.$watch("vgAutoPlay",this.onUpdateAutoPlay.bind(this)),a.$watch("vgStartTime",this.onUpdateStartTime.bind(this)),a.$watch("vgVirtualClipDuration",this.onUpdateVirtualClipDuration.bind(this)),a.$watch("vgPlaysInline",this.onUpdatePlaysInline.bind(this)),a.$watch("vgNativeFullscreen",this.onUpdateNativeFullscreen.bind(this)),a.$watch("vgCuePoints",this.onUpdateCuePoints.bind(this)),a.$watch("vgClearMediaOnNavigate",this.onUpdateClearMediaOnNavigate.bind(this))},this.onFullScreenChange=function(b){this.isFullScreen=d.isFullScreen(),a.$parent.$digest()},a.$on("$destroy",this.clearMedia.bind(this)),a.$on("$routeChangeStart",this.onRouteChange.bind(this)),this.init()}]),angular.module("com.2fdevs.videogular").directive("vgCrossorigin",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setCrossorigin=function(a){a?d.mediaElement.attr("crossorigin",a):d.mediaElement.removeAttr("crossorigin")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setCrossorigin(d.config.crossorigin)}):a.$watch(c.vgCrossorigin,function(b,c){e&&b==c||!b?a.setCrossorigin():(e=b,a.setCrossorigin(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgLoop",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setLoop=function(a){a?d.mediaElement.attr("loop",a):d.mediaElement.removeAttr("loop")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setLoop(d.config.loop)}):a.$watch(c.vgLoop,function(b,c){e&&b==c||!b?a.setLoop():(e=b,a.setLoop(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgMedia",["$timeout","VG_UTILS","VG_STATES",function(a,b,c){return{restrict:"E",require:"^videogular",templateUrl:function(a,b){var c=b.vgType||"video";return b.vgTemplate||"vg-templates/vg-media-"+c},scope:{vgSrc:"=?",vgType:"=?"},link:function(d,e,f,g){var h;f.vgType&&"video"!==f.vgType?f.vgType="audio":f.vgType="video",d.onChangeSource=function(a,b){h&&a==b||!a||(h=a,g.currentState!==c.PLAY&&(g.currentState=c.STOP),g.sources=h,d.changeSource())},d.changeSource=function(){if(angular.isArray(h)){var c="";if(g.mediaElement[0].canPlayType){for(var d=0,e=h.length;e>d;d++)if(c=g.mediaElement[0].canPlayType(h[d].type),"maybe"==c||"probably"==c){g.mediaElement.attr("src",h[d].src),g.mediaElement.attr("type",h[d].type),g.changeSource(h[d]);break}}else g.mediaElement.attr("src",h[0].src),g.mediaElement.attr("type",h[0].type),g.changeSource(h[0])}else g.mediaElement.attr("src",h),g.changeSource(h);b.isMobileDevice()&&g.mediaElement[0].load(),a(function(){!g.autoPlay||!b.isCordova()&&b.isMobileDevice()||g.play()}),""==c&&g.onVideoError()},g.mediaElement=e.find(f.vgType),g.sources=d.vgSrc,g.addListeners(),g.onVideoReady(),d.$watch("vgSrc",d.onChangeSource),d.$watch(function(){return g.sources},d.onChangeSource),d.$watch(function(){return g.playsInline},function(a,b){a?g.mediaElement.attr("webkit-playsinline",""):g.mediaElement.removeAttr("webkit-playsinline")}),g.isConfig&&d.$watch(function(){return g.config},function(){g.config&&(d.vgSrc=g.config.sources)})}}}]),angular.module("com.2fdevs.videogular").directive("vgNativeControls",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setControls=function(a){a?d.mediaElement.attr("controls",a):d.mediaElement.removeAttr("controls")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setControls(d.config.controls)}):a.$watch(c.vgNativeControls,function(b,c){e&&b==c||!b?a.setControls():(e=b,a.setControls(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgPreload",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e;a.setPreload=function(a){a?d.mediaElement.attr("preload",a):d.mediaElement.removeAttr("preload")},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setPreload(d.config.preload)}):a.$watch(c.vgPreload,function(b,c){e&&b==c||!b?a.setPreload():(e=b,a.setPreload(e))})}}}}]),angular.module("com.2fdevs.videogular").directive("vgTracks",[function(){return{restrict:"A",require:"^videogular",link:{pre:function(a,b,c,d){var e,f,g,h=!1;a.onLoadMetaData=function(){h=!0,a.updateTracks()},a.updateTracks=function(){var b=d.mediaElement.children();for(f=0,g=b.length;g>f;f++)b[f].remove&&b[f].remove();if(e)for(f=0,g=e.length;g>f;f++){var c=document.createElement("track");for(var h in e[f])c[h]=e[f][h];c.addEventListener("load",a.onLoadTrack.bind(a,c)),d.mediaElement[0].appendChild(c)}},a.onLoadTrack=function(b){b["default"]?b.mode="showing":b.mode="hidden";for(var c=0,e=d.mediaElement[0].textTracks.length;e>c;c++)b.label==d.mediaElement[0].textTracks[c].label&&(b["default"]?d.mediaElement[0].textTracks[c].mode="showing":d.mediaElement[0].textTracks[c].mode="disabled");b.removeEventListener("load",a.onLoadTrack.bind(a,b))},a.setTracks=function(b){e=b,d.tracks=b,h?a.updateTracks():d.mediaElement[0].addEventListener("loadedmetadata",a.onLoadMetaData.bind(a),!1)},d.isConfig?a.$watch(function(){return d.config},function(){d.config&&a.setTracks(d.config.tracks)}):a.$watch(c.vgTracks,function(b,c){e&&b==c||a.setTracks(b)},!0)}}}}]),angular.module("com.2fdevs.videogular").directive("videogular",[function(){return{restrict:"EA",scope:{vgTheme:"=?",vgAutoPlay:"=?",vgStartTime:"=?",vgVirtualClipDuration:"=?",vgPlaysInline:"=?",vgNativeFullscreen:"=?",vgClearMediaOnNavigate:"=?",vgCuePoints:"=?",vgConfig:"@",vgCanPlay:"&",vgComplete:"&",vgUpdateVolume:"&",vgUpdatePlayback:"&",vgUpdateTime:"&",vgUpdateState:"&",vgPlayerReady:"&",vgChangeSource:"&",vgSeeking:"&",vgSeeked:"&",vgError:"&"},controller:"vgController",controllerAs:"API",link:{pre:function(a,b,c,d){d.videogularElement=angular.element(b)}}}}]),angular.module("com.2fdevs.videogular").service("vgConfigLoader",["$http","$q","$sce",function(a,b,c){this.loadConfig=function(d){var e=b.defer();return a({method:"GET",url:d}).then(function(a){for(var b=a.data,d=0,f=b.sources.length;f>d;d++)b.sources[d].src=c.trustAsResourceUrl(b.sources[d].src);e.resolve(b)},function(){e.reject()}),e.promise}}]),angular.module("com.2fdevs.videogular").service("vgFullscreen",["VG_UTILS",function(a){function b(){var a=!1;return a=c?null!=document[d.element]||c.webkitDisplayingFullscreen:null!=document[d.element]}var c,d=null,e={w3:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",onchange:"fullscreenchange",onerror:"fullscreenerror"},newWebkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},oldWebkit:{enabled:"webkitIsFullScreen",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullScreen",exit:"webkitCancelFullScreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},moz:{enabled:"mozFullScreen",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",onchange:"mozfullscreenchange",onerror:"mozfullscreenerror"},ios:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitEnterFullscreen",exit:"webkitExitFullscreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",onchange:"MSFullscreenChange",onerror:"MSFullscreenError"}};for(var f in e)if(e[f].enabled in document){d=e[f];break}a.isiOSDevice()&&(d=e.ios),this.isAvailable=null!=d,d&&(this.onchange=d.onchange,this.onerror=d.onerror,this.isFullScreen=b,this.exit=function(){document[d.exit]()},this.request=function(a){c=a,c[d.request]()})}]),angular.module("com.2fdevs.videogular").service("VG_UTILS",["$window",function(a){this.fixEventOffset=function(a){var b=navigator.userAgent.match(/Firefox\/(\d+)/i);if(b&&Number.parseInt(b.pop())<39){var c=a.currentTarget.currentStyle||window.getComputedStyle(a.target,null),d=parseInt(c.borderLeftWidth,10),e=parseInt(c.borderTopWidth,10),f=a.currentTarget.getBoundingClientRect(),g=a.clientX-d-f.left,h=a.clientY-e-f.top;a.offsetX=g,a.offsetY=h}return a},this.getZIndex=function(){for(var a,b=1,c=document.getElementsByTagName("*"),d=0,e=c.length;e>d;d++)a=parseInt(window.getComputedStyle(c[d])["z-index"]),a>b&&(b=a+1);return b},this.isMobileDevice=function(){return"undefined"!=typeof window.orientation||-1!==navigator.userAgent.indexOf("IEMobile")},this.isiOSDevice=function(){return navigator.userAgent.match(/ip(hone|ad|od)/i)&&!navigator.userAgent.match(/(iemobile)[\/\s]?([\w\.]*)/i)},this.isCordova=function(){return-1===document.URL.indexOf("http://")&&-1===document.URL.indexOf("https://")},this.supportsLocalStorage=function(){var b="videogular-test-key";try{var c=a.sessionStorage;return c.setItem(b,"1"),c.removeItem(b),"localStorage"in a&&null!==a.localStorage}catch(d){return!1}}}]); \ No newline at end of file