Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/apps.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-02-18 16:23:37 +0400
committerLukas Reschke <lukas@statuscode.ch>2014-02-18 16:23:37 +0400
commit638750708c931daafb928025bbc7eaeb6a6f6b33 (patch)
treeffcb3b3705437a140a1a4ec89fe930d357efa955 /files_videoviewer
parentfe72a45c6dd5cc99e84d5bf41254229e7756d934 (diff)
Bump MediaElement
Diffstat (limited to 'files_videoviewer')
-rw-r--r--files_videoviewer/appinfo/version2
-rw-r--r--[-rwxr-xr-x]files_videoviewer/js/flashmediaelement.swfbin28644 -> 28709 bytes
-rw-r--r--[-rwxr-xr-x]files_videoviewer/js/mediaelement-and-player.js948
-rw-r--r--[-rwxr-xr-x]files_videoviewer/js/mediaelement-and-player.min.js242
-rwxr-xr-xfiles_videoviewer/mediaelement/src/Builder.py137
-rwxr-xr-xfiles_videoviewer/mediaelement/src/compiler.jarbin3939454 -> 0 bytes
-rw-r--r--files_videoviewer/mediaelement/src/css/background.pngbin135 -> 0 bytes
-rw-r--r--files_videoviewer/mediaelement/src/css/bigplay.fw.pngbin73809 -> 0 bytes
-rw-r--r--files_videoviewer/mediaelement/src/css/bigplay.pngbin2912 -> 0 bytes
-rw-r--r--files_videoviewer/mediaelement/src/css/bigplay.svg36
-rwxr-xr-xfiles_videoviewer/mediaelement/src/css/controls-ted.pngbin1559 -> 0 bytes
-rwxr-xr-xfiles_videoviewer/mediaelement/src/css/controls-wmp-bg.pngbin1960 -> 0 bytes
-rwxr-xr-xfiles_videoviewer/mediaelement/src/css/controls-wmp.pngbin5511 -> 0 bytes
-rw-r--r--files_videoviewer/mediaelement/src/css/controls.fw.pngbin80382 -> 0 bytes
-rw-r--r--files_videoviewer/mediaelement/src/css/controls.pngbin1873 -> 0 bytes
-rw-r--r--files_videoviewer/mediaelement/src/css/controls.svg98
-rwxr-xr-xfiles_videoviewer/mediaelement/src/css/loading.gifbin6224 -> 0 bytes
-rwxr-xr-xfiles_videoviewer/mediaelement/src/css/mediaelementplayer.css850
-rwxr-xr-xfiles_videoviewer/mediaelement/src/css/mejs-skins.css283
-rwxr-xr-xfiles_videoviewer/mediaelement/src/flash/FlashMediaElement.as1
-rwxr-xr-xfiles_videoviewer/mediaelement/src/flash/FlashMediaElement.flabin26182 -> 0 bytes
-rwxr-xr-xfiles_videoviewer/mediaelement/src/flash/HtmlMediaEvent.as29
-rwxr-xr-xfiles_videoviewer/mediaelement/src/flash/htmlelements/AudioElement.as332
-rwxr-xr-xfiles_videoviewer/mediaelement/src/flash/htmlelements/IMediaElement.as35
-rwxr-xr-xfiles_videoviewer/mediaelement/src/flash/htmlelements/VideoElement.as1
-rwxr-xr-xfiles_videoviewer/mediaelement/src/flash/htmlelements/YouTubeElement.as403
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/jeesh-extras.js49
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/jeesh.js1578
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/me-featuredetection.js98
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/me-header.js13
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/me-i18n-locale-de.js26
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/me-i18n-locale-zh.js26
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/me-i18n.js194
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/me-mediaelements.js327
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/me-namespace.js25
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/me-plugindetector.js102
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/me-shim.js892
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/me-utility.js158
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-ads-vast.js243
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-ads.js312
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-backlight.js435
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-contextmenu.js197
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-endedhtml.js12
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-fullscreen.js458
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-googleanalytics.js68
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-loop.js26
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-playlist.js12
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-playpause.js46
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-postroll.js35
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-progress.js173
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-sourcechooser.js87
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-speed.js11
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-stop.js33
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-time.js84
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-tracks.js673
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-visualcontrols.js10
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-feature-volume.js225
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-header.js11
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-library.js5
-rwxr-xr-xfiles_videoviewer/mediaelement/src/js/mep-player.js1165
-rwxr-xr-xfiles_videoviewer/mediaelement/src/silverlight/App.xaml8
-rwxr-xr-xfiles_videoviewer/mediaelement/src/silverlight/App.xaml.cs68
-rwxr-xr-xfiles_videoviewer/mediaelement/src/silverlight/MainPage.xaml276
-rwxr-xr-xfiles_videoviewer/mediaelement/src/silverlight/MainPage.xaml.cs636
-rwxr-xr-xfiles_videoviewer/mediaelement/src/silverlight/Properties/AppManifest.xml6
-rwxr-xr-xfiles_videoviewer/mediaelement/src/silverlight/Properties/AssemblyInfo.cs35
-rwxr-xr-xfiles_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.csproj112
-rwxr-xr-xfiles_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.csproj.user32
-rwxr-xr-xfiles_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.sln20
-rwxr-xr-xfiles_videoviewer/mediaelement/src/yuicompressor-2.4.2.jarbin851219 -> 0 bytes
70 files changed, 633 insertions, 11766 deletions
diff --git a/files_videoviewer/appinfo/version b/files_videoviewer/appinfo/version
index 6da28dde7..d917d3e26 100644
--- a/files_videoviewer/appinfo/version
+++ b/files_videoviewer/appinfo/version
@@ -1 +1 @@
-0.1.1 \ No newline at end of file
+0.1.2
diff --git a/files_videoviewer/js/flashmediaelement.swf b/files_videoviewer/js/flashmediaelement.swf
index 9832d7b98..2a5cb8da7 100755..100644
--- a/files_videoviewer/js/flashmediaelement.swf
+++ b/files_videoviewer/js/flashmediaelement.swf
Binary files differ
diff --git a/files_videoviewer/js/mediaelement-and-player.js b/files_videoviewer/js/mediaelement-and-player.js
index d52868f67..9b0d668da 100755..100644
--- a/files_videoviewer/js/mediaelement-and-player.js
+++ b/files_videoviewer/js/mediaelement-and-player.js
@@ -15,7 +15,8 @@
var mejs = mejs || {};
// version number
-mejs.version = '2.11.3';
+mejs.version = '2.13.2';
+
// player number (for missing, same id attr)
mejs.meIndex = 0;
@@ -316,13 +317,14 @@ mejs.MediaFeatures = {
t.isiOS = t.isiPhone || t.isiPad;
t.isAndroid = (ua.match(/android/i) !== null);
t.isBustedAndroid = (ua.match(/android 2\.[12]/) !== null);
- t.isIE = (nav.appName.toLowerCase().indexOf("microsoft") != -1);
+ t.isBustedNativeHTTPS = (location.protocol === 'https:' && (ua.match(/android [12]\./) !== null || ua.match(/macintosh.* version.* safari/) !== null));
+ t.isIE = (nav.appName.toLowerCase().indexOf("microsoft") != -1 || nav.appName.toLowerCase().match(/trident/gi) !== null);
t.isChrome = (ua.match(/chrome/gi) !== null);
t.isFirefox = (ua.match(/firefox/gi) !== null);
t.isWebkit = (ua.match(/webkit/gi) !== null);
- t.isGecko = (ua.match(/gecko/gi) !== null) && !t.isWebkit;
+ t.isGecko = (ua.match(/gecko/gi) !== null) && !t.isWebkit && !t.isIE;
t.isOpera = (ua.match(/opera/gi) !== null);
- t.hasTouch = ('ontouchstart' in window);
+ t.hasTouch = ('ontouchstart' in window); // && window.ontouchstart != null); // this breaks iOS 7
// borrowed from Modernizr
t.svg = !! document.createElementNS &&
@@ -335,35 +337,62 @@ mejs.MediaFeatures = {
t.supportsMediaTag = (typeof v.canPlayType !== 'undefined' || t.isBustedAndroid);
+ // Fix for IE9 on Windows 7N / Windows 7KN (Media Player not installer)
+ try{
+ v.canPlayType("video/mp4");
+ }catch(e){
+ t.supportsMediaTag = false;
+ }
+
// detect native JavaScript fullscreen (Safari/Firefox only, Chrome still fails)
// iOS
t.hasSemiNativeFullScreen = (typeof v.webkitEnterFullscreen !== 'undefined');
- // Webkit/firefox
+ // W3C
+ t.hasNativeFullscreen = (typeof v.requestFullscreen !== 'undefined');
+
+ // webkit/firefox/IE11+
t.hasWebkitNativeFullScreen = (typeof v.webkitRequestFullScreen !== 'undefined');
t.hasMozNativeFullScreen = (typeof v.mozRequestFullScreen !== 'undefined');
+ t.hasMsNativeFullScreen = (typeof v.msRequestFullscreen !== 'undefined');
- t.hasTrueNativeFullScreen = (t.hasWebkitNativeFullScreen || t.hasMozNativeFullScreen);
+ t.hasTrueNativeFullScreen = (t.hasWebkitNativeFullScreen || t.hasMozNativeFullScreen || t.hasMsNativeFullScreen);
t.nativeFullScreenEnabled = t.hasTrueNativeFullScreen;
+
+ // Enabled?
if (t.hasMozNativeFullScreen) {
- t.nativeFullScreenEnabled = v.mozFullScreenEnabled;
+ t.nativeFullScreenEnabled = document.mozFullScreenEnabled;
+ } else if (t.hasMsNativeFullScreen) {
+ t.nativeFullScreenEnabled = document.msFullscreenEnabled;
}
-
- if (this.isChrome) {
+ if (t.isChrome) {
t.hasSemiNativeFullScreen = false;
}
if (t.hasTrueNativeFullScreen) {
- t.fullScreenEventName = (t.hasWebkitNativeFullScreen) ? 'webkitfullscreenchange' : 'mozfullscreenchange';
+ t.fullScreenEventName = '';
+ if (t.hasWebkitNativeFullScreen) {
+ t.fullScreenEventName = 'webkitfullscreenchange';
+
+ } else if (t.hasMozNativeFullScreen) {
+ t.fullScreenEventName = 'mozfullscreenchange';
+
+ } else if (t.hasMsNativeFullScreen) {
+ t.fullScreenEventName = 'MSFullscreenChange';
+ }
t.isFullScreen = function() {
if (v.mozRequestFullScreen) {
return d.mozFullScreen;
+
} else if (v.webkitRequestFullScreen) {
return d.webkitIsFullScreen;
+
+ } else if (v.hasMsNativeFullScreen) {
+ return d.msFullscreenElement !== null;
}
}
@@ -371,16 +400,26 @@ mejs.MediaFeatures = {
if (t.hasWebkitNativeFullScreen) {
el.webkitRequestFullScreen();
+
} else if (t.hasMozNativeFullScreen) {
el.mozRequestFullScreen();
+
+ } else if (t.hasMsNativeFullScreen) {
+ el.msRequestFullscreen();
+
}
}
t.cancelFullScreen = function() {
if (t.hasWebkitNativeFullScreen) {
document.webkitCancelFullScreen();
+
} else if (t.hasMozNativeFullScreen) {
document.mozCancelFullScreen();
+
+ } else if (t.hasMsNativeFullScreen) {
+ document.msExitFullscreen();
+
}
}
@@ -563,7 +602,7 @@ mejs.PluginMediaElement.prototype = {
positionFullscreenButton: function(x,y,visibleAndAbove) {
if (this.pluginApi != null && this.pluginApi.positionFullscreenButton) {
- this.pluginApi.positionFullscreenButton(x,y,visibleAndAbove);
+ this.pluginApi.positionFullscreenButton(Math.floor(x),Math.floor(y),visibleAndAbove);
}
},
@@ -775,6 +814,10 @@ mejs.MediaPluginBridge = {
bufferedTime,
pluginMediaElement = this.pluginMediaElements[id];
+ if(!pluginMediaElement){
+ return;
+ }
+
// fake event object to mimic real HTML media event.
e = {
type: eventName,
@@ -819,6 +862,8 @@ mejs.MediaElementDefaults = {
plugins: ['flash','silverlight','youtube','vimeo'],
// shows debug errors on screen
enablePluginDebug: false,
+ // use plugin for browsers that have trouble with Basic Authentication on HTTPS sites
+ httpsBasicAuthSite: false,
// overrides the type specified, useful for dynamic instantiation
type: '',
// path to Flash and Silverlight plugins
@@ -989,7 +1034,7 @@ mejs.HtmlMediaElementShim = {
// test for native playback first
- if (supportsMediaTag && (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'native')) {
+ if (supportsMediaTag && (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'native') && !(mejs.MediaFeatures.isBustedNativeHTTPS && options.httpsBasicAuthSite === true)) {
if (!isMediaTag) {
@@ -1133,9 +1178,13 @@ mejs.HtmlMediaElementShim = {
errorContainer.style.height = htmlMediaElement.height + 'px';
} catch (e) {}
- errorContainer.innerHTML = (poster !== '') ?
- '<a href="' + playback.url + '"><img src="' + poster + '" width="100%" height="100%" /></a>' :
- '<a href="' + playback.url + '"><span>' + mejs.i18n.t('Download File') + '</span></a>';
+ if (options.customError) {
+ errorContainer.innerHTML = options.customError;
+ } else {
+ errorContainer.innerHTML = (poster !== '') ?
+ '<a href="' + playback.url + '"><img src="' + poster + '" width="100%" height="100%" /></a>' :
+ '<a href="' + playback.url + '"><span>' + mejs.i18n.t('Download File') + '</span></a>';
+ }
htmlMediaElement.parentNode.insertBefore(errorContainer, htmlMediaElement);
htmlMediaElement.style.display = 'none';
@@ -1177,8 +1226,8 @@ mejs.HtmlMediaElementShim = {
}
if (playback.isVideo) {
- width = (options.videoWidth > 0) ? options.videoWidth : (htmlMediaElement.getAttribute('width') !== null) ? htmlMediaElement.getAttribute('width') : options.defaultVideoWidth;
- height = (options.videoHeight > 0) ? options.videoHeight : (htmlMediaElement.getAttribute('height') !== null) ? htmlMediaElement.getAttribute('height') : options.defaultVideoHeight;
+ width = (options.pluginWidth > 0) ? options.pluginWidth : (options.videoWidth > 0) ? options.videoWidth : (htmlMediaElement.getAttribute('width') !== null) ? htmlMediaElement.getAttribute('width') : options.defaultVideoWidth;
+ height = (options.pluginHeight > 0) ? options.pluginHeight : (options.videoHeight > 0) ? options.videoHeight : (htmlMediaElement.getAttribute('height') !== null) ? htmlMediaElement.getAttribute('height') : options.defaultVideoHeight;
// in case of '%' make sure it's encoded
width = mejs.Utility.encodeUrl(width);
@@ -1269,6 +1318,7 @@ mejs.HtmlMediaElementShim = {
'<param name="wmode" value="transparent" />' +
'<param name="allowScriptAccess" value="always" />' +
'<param name="allowFullScreen" value="true" />' +
+'<param name="scale" value="default" />' +
'</object>';
} else {
@@ -1287,6 +1337,7 @@ mejs.HtmlMediaElementShim = {
'flashvars="' + initVars.join('&') + '" ' +
'width="' + width + '" ' +
'height="' + height + '" ' +
+'scale="default"' +
'class="mejs-shim"></embed>';
}
break;
@@ -1316,7 +1367,7 @@ mejs.HtmlMediaElementShim = {
// DEMO Code. Does NOT work.
case 'vimeo':
- //console.log('vimeoid');
+ //
pluginMediaElement.vimeoid = playback.url.substr(playback.url.lastIndexOf('/')+1);
@@ -1337,6 +1388,8 @@ mejs.HtmlMediaElementShim = {
}
// hide original element
htmlMediaElement.style.display = 'none';
+ // prevent browser from autoplaying when using a plugin
+ htmlMediaElement.removeAttribute('autoplay');
// FYI: options.success will be fired by the MediaPluginBridge
@@ -1619,30 +1672,26 @@ window.mejs = mejs;
window.MediaElement = mejs.MediaElement;
/*!
- * Adds Internationalization and localization to objects.
+ * Adds Internationalization and localization to mediaelement.
*
- * What is the concept beyond i18n?
- * http://en.wikipedia.org/wiki/Internationalization_and_localization
+ * This file does not contain translations, you have to add the manually.
+ * The schema is always the same: me-i18n-locale-[ISO_639-1 Code].js
*
+ * Examples are provided both for german and chinese translation.
*
- * This file both i18n methods and locale which is used to translate
- * strings into other languages.
- *
- * Default translations are not available, you have to add them
- * through locale objects which are named exactly as the langcode
- * they stand for. The default language is always english (en).
*
+ * What is the concept beyond i18n?
+ * http://en.wikipedia.org/wiki/Internationalization_and_localization
*
- * Wrapper built to be able to attach the i18n object to
- * other objects without changing more than one line.
+ * What langcode should i use?
+ * http://en.wikipedia.org/wiki/ISO_639-1
*
*
- * LICENSE:
+ * License?
*
* The i18n file uses methods from the Drupal project (drupal.js):
* - i18n.methods.t() (modified)
* - i18n.methods.checkPlain() (full copy)
- * - i18n.methods.formatString() (full copy)
*
* The Drupal project is (like mediaelementjs) licensed under GPLv2.
* - http://drupal.org/licensing/faq/#q1
@@ -1653,8 +1702,6 @@ window.MediaElement = mejs.MediaElement;
* @author
* Tim Latz (latz.tim@gmail.com)
*
- * @see
- * me-i18n-locale.js
*
* @params
* - context - document, iframe ..
@@ -1665,6 +1712,7 @@ window.MediaElement = mejs.MediaElement;
"use strict";
var i18n = {
"locale": {
+ "language" : '',
"strings" : {}
},
"methods" : {}
@@ -1673,20 +1721,19 @@ window.MediaElement = mejs.MediaElement;
/**
- * Get the current browser's language
- *
- * @see: i18n.methods.t()
+ * Get language, fallback to browser's language if empty
*/
- i18n.locale.getLanguage = function () {
- return {
- "language" : navigator.language
- };
+ i18n.getLanguage = function () {
+ var language = i18n.locale.language || window.navigator.userLanguage || window.navigator.language;
+ // convert to iso 639-1 (2-letters, lower case)
+ return language.substr(0, 2).toLowerCase();
};
- /**
- * Store the language the locale object was initialized with
- */
- i18n.locale.INIT_LANGUAGE = i18n.locale.getLanguage();
+ // i18n fixes for compatibility with WordPress
+ if ( typeof mejsL10n != 'undefined' ) {
+ i18n.locale.language = mejsL10n.language;
+ }
+
/**
@@ -1711,73 +1758,27 @@ window.MediaElement = mejs.MediaElement;
};
/**
- * Replace placeholders with sanitized values in a string.
- *
- * @param str
- * A string with placeholders.
- * @param args
- * An object of replacements pairs to make. Incidences of any key in this
- * array are replaced with the corresponding value. Based on the first
- * character of the key, the value is escaped and/or themed:
- * - !variable: inserted as is
- * - @variable: escape plain text to HTML (i18n.methods.checkPlain)
- * - %variable: escape text and theme as a placeholder for user-submitted
- * content (checkPlain + <em class="placeholder" > )
- *
- * @see i18n.methods.t()
- */
- i18n.methods.formatString = function(str, args) {
- // Transform arguments before inserting them.
- for (var key in args) {
- switch (key.charAt(0)) {
- // Escaped only.
- case '@':
- args[key] = i18n.methods.checkPlain(args[key]);
- break;
- // Pass-through.
- case '!':
- break;
- // Escaped and placeholder.
- case '%':
- default:
- args[key] = '<em class="placeholder">' + i18n.methods.checkPlain(args[key]) + '</em>';
- break;
- }
- str = str.replace(key, args[key]);
- }
- return str;
- };
-
- /**
* Translate strings to the page language or a given language.
*
- * See the documentation of the server-side t() function for further details.
*
* @param str
* A string containing the English string to translate.
- * @param args
- * An object of replacements pairs to make after translation. Incidences
- * of any key in this array are replaced with the corresponding value.
- * See i18n.methods.formatString().
*
* @param options
* - 'context' (defaults to the default context): The context the source string
* belongs to.
*
* @return
- * The translated string.
+ * The translated string, escaped via i18n.methods.checkPlain()
*/
- i18n.methods.t = function (str, args, options) {
+ i18n.methods.t = function (str, options) {
// Fetch the localized version of the string.
if (i18n.locale.strings && i18n.locale.strings[options.context] && i18n.locale.strings[options.context][str]) {
str = i18n.locale.strings[options.context][str];
}
- if (args) {
- str = i18n.methods.formatString(str, args);
- }
- return str;
+ return i18n.methods.checkPlain(str);
};
@@ -1787,25 +1788,25 @@ window.MediaElement = mejs.MediaElement;
* @see i18n.methods.t()
* @throws InvalidArgumentException
*/
- i18n.t = function(str, args, options) {
+ i18n.t = function(str, options) {
if (typeof str === 'string' && str.length > 0) {
- // check every time due languge can change for
+ // check every time due language can change for
// different reasons (translation, lang switcher ..)
- var lang = i18n.locale.getLanguage();
+ var language = i18n.getLanguage();
options = options || {
- "context" : lang.language
+ "context" : language
};
- return i18n.methods.t(str, args, options);
+ return i18n.methods.t(str, options);
}
else {
throw {
"name" : 'InvalidArgumentException',
"message" : 'First argument is either not a string or empty.'
- }
+ };
}
};
@@ -1813,10 +1814,21 @@ window.MediaElement = mejs.MediaElement;
exports.i18n = i18n;
}(document, mejs));
+// i18n fixes for compatibility with WordPress
+;(function(exports, undefined) {
+
+ "use strict";
+
+ if ( typeof mejsL10n != 'undefined' ) {
+ exports[mejsL10n.language] = mejsL10n.strings;
+ }
+
+}(mejs.i18n.locale.strings));
+
/*!
* This is a i18n.locale language object.
*
- *<de> German translation by Tim Latz, latz.tim@gmail.com
+ * German translation by Tim Latz, latz.tim@gmail.com
*
* @author
* Tim Latz (latz.tim@gmail.com)
@@ -1831,18 +1843,20 @@ window.MediaElement = mejs.MediaElement;
"use strict";
- exports.de = {
- "Fullscreen" : "Vollbild",
- "Go Fullscreen" : "Vollbild an",
- "Turn off Fullscreen" : "Vollbild aus",
- "Close" : "Schließen"
- };
+ if (typeof exports.de === 'undefined') {
+ exports.de = {
+ "Fullscreen" : "Vollbild",
+ "Go Fullscreen" : "Vollbild an",
+ "Turn off Fullscreen" : "Vollbild aus",
+ "Close" : "Schließen"
+ };
+ }
}(mejs.i18n.locale.strings));
/*!
* This is a i18n.locale language object.
*
- *<de> Traditional chinese translation by Tim Latz, latz.tim@gmail.com
+ * Traditional chinese translation by Tim Latz, latz.tim@gmail.com
*
* @author
* Tim Latz (latz.tim@gmail.com)
@@ -1857,12 +1871,14 @@ window.MediaElement = mejs.MediaElement;
"use strict";
- exports.zh = {
- "Fullscreen" : "全螢幕",
- "Go Fullscreen" : "全屏模式",
- "Turn off Fullscreen" : "退出全屏模式",
- "Close" : "關閉"
- };
+ if (typeof exports.zh === 'undefined') {
+ exports.zh = {
+ "Fullscreen" : "全螢幕",
+ "Go Fullscreen" : "全屏模式",
+ "Turn off Fullscreen" : "退出全屏模式",
+ "Close" : "關閉"
+ };
+ }
}(mejs.i18n.locale.strings));
@@ -1874,7 +1890,7 @@ window.MediaElement = mejs.MediaElement;
* Creates a controller bar for HTML5 <video> add <audio> tags
* using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
*
- * Copyright 2010-2012, John Dyer (http://j.hn/)
+ * Copyright 2010-2013, John Dyer (http://j.hn/)
* License: MIT
*
*/
@@ -1889,6 +1905,8 @@ if (typeof jQuery != 'undefined') {
mejs.MepDefaults = {
// url to poster (to fix iOS 3.x)
poster: '',
+ // When the video is ended, we can show the poster.
+ showPosterWhenEnded: false,
// default if the <video width> is not specified
defaultVideoWidth: 480,
// default if the <video height> is not specified
@@ -1902,19 +1920,19 @@ if (typeof jQuery != 'undefined') {
// default if the user doesn't specify
defaultAudioHeight: 30,
- // default amount to move back when back key is pressed
+ // default amount to move back when back key is pressed
defaultSeekBackwardInterval: function(media) {
return (media.duration * 0.05);
- },
- // default amount to move forward when forward key is pressed
+ },
+ // default amount to move forward when forward key is pressed
defaultSeekForwardInterval: function(media) {
return (media.duration * 0.05);
- },
-
+ },
+
// width of audio player
audioWidth: -1,
// height of audio player
- audioHeight: -1,
+ audioHeight: -1,
// initial volume when the player starts (overrided by user cookie)
startVolume: 0.8,
// useful for <audio> player loops
@@ -1930,7 +1948,7 @@ if (typeof jQuery != 'undefined') {
showTimecodeFrameCount: false,
// used when showTimecodeFrameCount is set to true
framesPerSecond: 25,
-
+
// automatically calculate the width of the progress bar based on the sizes of other elements
autosizeProgress : true,
// Hide controls when playing and mouse is not over the video
@@ -1942,20 +1960,20 @@ if (typeof jQuery != 'undefined') {
// force iPad's native controls
iPadUseNativeControls: false,
// force iPhone's native controls
- iPhoneUseNativeControls: false,
+ iPhoneUseNativeControls: false,
// force Android's native controls
- AndroidUseNativeControls: false,
+ AndroidUseNativeControls: false,
// features to show
features: ['playpause','current','progress','duration','tracks','volume','fullscreen'],
// only for dynamic
isVideo: true,
-
+
// turns keyboard support on and off for this instance
enableKeyboard: true,
-
+
// whenthis player starts, it will pause other players
pauseOtherPlayers: true,
-
+
// array of keyboard actions such as play pause
keyActions: [
{
@@ -1965,10 +1983,10 @@ if (typeof jQuery != 'undefined') {
],
action: function(player, media) {
if (media.paused || media.ended) {
- media.play();
+ player.play();
} else {
- media.pause();
- }
+ player.pause();
+ }
}
},
{
@@ -1996,7 +2014,7 @@ if (typeof jQuery != 'undefined') {
player.showControls();
player.startControlsTimer();
}
-
+
// 5%
var newTime = Math.max(media.currentTime - player.options.defaultSeekBackwardInterval(media), 0);
media.setCurrentTime(newTime);
@@ -2007,16 +2025,16 @@ if (typeof jQuery != 'undefined') {
keys: [
39, // RIGHT
228 // Google TV forward
- ],
+ ],
action: function(player, media) {
if (!isNaN(media.duration) && media.duration > 0) {
if (player.isVideo) {
player.showControls();
player.startControlsTimer();
}
-
+
// 5%
- var newTime = Math.min(media.currentTime + player.options.defaultSeekForwardInterval(media), media.duration);
+ var newTime = Math.min(media.currentTime + player.options.defaultSeekForwardInterval(media), media.duration);
media.setCurrentTime(newTime);
}
}
@@ -2032,12 +2050,12 @@ if (typeof jQuery != 'undefined') {
}
}
}
- }
- ]
+ }
+ ]
};
mejs.mepIndex = 0;
-
+
mejs.players = {};
// wraps a MediaElement object in player controls
@@ -2045,14 +2063,14 @@ if (typeof jQuery != 'undefined') {
// enforce object, even without "new" (via John Resig)
if ( !(this instanceof mejs.MediaElementPlayer) ) {
return new mejs.MediaElementPlayer(node, o);
- }
+ }
var t = this;
-
+
// these will be reset after the MediaElement.success fires
t.$media = t.$node = $(node);
- t.node = t.media = t.$media[0];
-
+ t.node = t.media = t.$media[0];
+
// check for existing player
if (typeof t.node.player != 'undefined') {
return t.node.player;
@@ -2060,22 +2078,22 @@ if (typeof jQuery != 'undefined') {
// attach player to DOM node for reference
t.node.player = t;
}
-
-
+
+
// try to get options from data-mejsoptions
if (typeof o == 'undefined') {
- o = t.$node.data('mejsoptions');
+ o = t.$node.data('mejsoptions');
}
-
+
// extend default options
t.options = $.extend({},mejs.MepDefaults,o);
-
+
// unique ID
t.id = 'mep_' + mejs.mepIndex++;
// add to player array (for focus events)
mejs.players[t.id] = t;
-
+
// start up
t.init();
@@ -2084,11 +2102,11 @@ if (typeof jQuery != 'undefined') {
// actual player
mejs.MediaElementPlayer.prototype = {
-
+
hasFocus: false,
-
+
controlsAreVisible: true,
-
+
init: function() {
var
@@ -2100,19 +2118,19 @@ if (typeof jQuery != 'undefined') {
error: function(e) { t.handleError(e);}
}),
tagName = t.media.tagName.toLowerCase();
-
+
t.isDynamic = (tagName !== 'audio' && tagName !== 'video');
-
- if (t.isDynamic) {
- // get video from src or href?
- t.isVideo = t.options.isVideo;
+
+ if (t.isDynamic) {
+ // get video from src or href?
+ t.isVideo = t.options.isVideo;
} else {
t.isVideo = (tagName !== 'audio' && t.options.isVideo);
}
-
- // use native controls in iPad, iPhone, and Android
+
+ // use native controls in iPad, iPhone, and Android
if ((mf.isiPad && t.options.iPadUseNativeControls) || (mf.isiPhone && t.options.iPhoneUseNativeControls)) {
-
+
// add controls and stop
t.$media.attr('controls', 'controls');
@@ -2122,21 +2140,20 @@ if (typeof jQuery != 'undefined') {
// override Apple's autoplay override for iPads
if (mf.isiPad && t.media.getAttribute('autoplay') !== null) {
- t.media.load();
- t.media.play();
+ t.play();
}
-
+
} else if (mf.isAndroid && t.options.AndroidUseNativeControls) {
-
+
// leave default player
} else {
// DESKTOP: use MediaElementPlayer controls
-
- // remove native controls
- t.$media.removeAttr('controls');
-
+
+ // remove native controls
+ t.$media.removeAttr('controls');
+
// build container
t.container =
$('<div id="' + t.id + '" class="mejs-container ' + (mejs.MediaFeatures.svg ? 'svg' : 'no-svg') + '">'+
@@ -2148,8 +2165,8 @@ if (typeof jQuery != 'undefined') {
'</div>' +
'</div>')
.addClass(t.$media[0].className)
- .insertBefore(t.$media);
-
+ .insertBefore(t.$media);
+
// add classes for user and content
t.container.addClass(
(mf.isAndroid ? 'mejs-android ' : '') +
@@ -2157,91 +2174,89 @@ if (typeof jQuery != 'undefined') {
(mf.isiPad ? 'mejs-ipad ' : '') +
(mf.isiPhone ? 'mejs-iphone ' : '') +
(t.isVideo ? 'mejs-video ' : 'mejs-audio ')
- );
-
+ );
+
// move the <video/video> tag into the right spot
if (mf.isiOS) {
-
+
// sadly, you can't move nodes in iOS, so we have to destroy and recreate it!
var $newMedia = t.$media.clone();
-
+
t.container.find('.mejs-mediaelement').append($newMedia);
-
+
t.$media.remove();
t.$node = t.$media = $newMedia;
t.node = t.media = $newMedia[0]
-
+
} else {
-
+
// normal way of moving it into place (doesn't work on iOS)
t.container.find('.mejs-mediaelement').append(t.$media);
}
-
+
// find parts
t.controls = t.container.find('.mejs-controls');
t.layers = t.container.find('.mejs-layers');
// determine the size
-
+
/* size priority:
- (1) videoWidth (forced),
+ (1) videoWidth (forced),
(2) style="width;height;"
(3) width attribute,
(4) defaultVideoWidth (for unspecified cases)
*/
-
+
var tagType = (t.isVideo ? 'video' : 'audio'),
capsTagName = tagType.substring(0,1).toUpperCase() + tagType.substring(1);
-
-
+
+
if (t.options[tagType + 'Width'] > 0 || t.options[tagType + 'Width'].toString().indexOf('%') > -1) {
t.width = t.options[tagType + 'Width'];
} else if (t.media.style.width !== '' && t.media.style.width !== null) {
- t.width = t.media.style.width;
+ t.width = t.media.style.width;
} else if (t.media.getAttribute('width') !== null) {
t.width = t.$media.attr('width');
} else {
t.width = t.options['default' + capsTagName + 'Width'];
}
-
+
if (t.options[tagType + 'Height'] > 0 || t.options[tagType + 'Height'].toString().indexOf('%') > -1) {
t.height = t.options[tagType + 'Height'];
} else if (t.media.style.height !== '' && t.media.style.height !== null) {
t.height = t.media.style.height;
} else if (t.$media[0].getAttribute('height') !== null) {
- t.height = t.$media.attr('height');
+ t.height = t.$media.attr('height');
} else {
t.height = t.options['default' + capsTagName + 'Height'];
}
// set the size, while we wait for the plugins to load below
t.setPlayerSize(t.width, t.height);
-
+
// create MediaElementShim
- meOptions.pluginWidth = t.height;
- meOptions.pluginHeight = t.width;
+ meOptions.pluginWidth = t.width;
+ meOptions.pluginHeight = t.height;
}
-
-
// create MediaElement shim
mejs.MediaElement(t.$media[0], meOptions);
- if (typeof(t.container) != 'undefined'){
+ if (typeof(t.container) != 'undefined' && t.controlsAreVisible){
// controls are shown when loaded
t.container.trigger('controlsshown');
}
},
-
+
showControls: function(doAnimation) {
var t = this;
-
+
doAnimation = typeof doAnimation == 'undefined' || doAnimation;
-
+
if (t.controlsAreVisible)
return;
-
+
if (doAnimation) {
t.controls
.css('visibility','visible')
@@ -2249,84 +2264,84 @@ if (typeof jQuery != 'undefined') {
t.controlsAreVisible = true;
t.container.trigger('controlsshown');
});
-
+
// any additional controls people might add and want to hide
t.container.find('.mejs-control')
.css('visibility','visible')
- .stop(true, true).fadeIn(200, function() {t.controlsAreVisible = true;});
-
+ .stop(true, true).fadeIn(200, function() {t.controlsAreVisible = true;});
+
} else {
t.controls
.css('visibility','visible')
.css('display','block');
-
+
// any additional controls people might add and want to hide
t.container.find('.mejs-control')
.css('visibility','visible')
.css('display','block');
-
+
t.controlsAreVisible = true;
t.container.trigger('controlsshown');
}
-
+
t.setControlsSize();
-
+
},
hideControls: function(doAnimation) {
var t = this;
-
+
doAnimation = typeof doAnimation == 'undefined' || doAnimation;
-
- if (!t.controlsAreVisible)
+
+ if (!t.controlsAreVisible || t.options.alwaysShowControls)
return;
-
+
if (doAnimation) {
// fade out main controls
t.controls.stop(true, true).fadeOut(200, function() {
$(this)
.css('visibility','hidden')
.css('display','block');
-
+
t.controlsAreVisible = false;
t.container.trigger('controlshidden');
- });
-
+ });
+
// any additional controls people might add and want to hide
t.container.find('.mejs-control').stop(true, true).fadeOut(200, function() {
$(this)
.css('visibility','hidden')
.css('display','block');
- });
+ });
} else {
-
+
// hide main controls
t.controls
.css('visibility','hidden')
- .css('display','block');
-
+ .css('display','block');
+
// hide others
t.container.find('.mejs-control')
.css('visibility','hidden')
.css('display','block');
-
+
t.controlsAreVisible = false;
t.container.trigger('controlshidden');
}
- },
+ },
controlsTimer: null,
startControlsTimer: function(timeout) {
var t = this;
-
+
timeout = typeof timeout != 'undefined' ? timeout : 1500;
t.killControlsTimer('start');
t.controlsTimer = setTimeout(function() {
- //console.log('timer fired');
+ //
t.hideControls();
t.killControlsTimer('hide');
}, timeout);
@@ -2341,31 +2356,31 @@ if (typeof jQuery != 'undefined') {
delete t.controlsTimer;
t.controlsTimer = null;
}
- },
-
+ },
+
controlsEnabled: true,
-
+
disableControls: function() {
var t= this;
-
+
t.killControlsTimer();
t.hideControls(false);
this.controlsEnabled = false;
},
-
+
enableControls: function() {
var t= this;
-
+
t.showControls(false);
-
+
t.controlsEnabled = true;
- },
-
+ },
+
// Sets up all controls and events
- meReady: function(media, domNode) {
-
-
+ meReady: function(media, domNode) {
+
+
var t = this,
mf = mejs.MediaFeatures,
autoplayAttr = domNode.getAttribute('autoplay'),
@@ -2374,16 +2389,17 @@ if (typeof jQuery != 'undefined') {
feature;
// make sure it can't create itself again if a plugin reloads
- if (t.created)
+ if (t.created) {
return;
- else
- t.created = true;
+ } else {
+ t.created = true;
+ }
t.media = media;
t.domNode = domNode;
-
- if (!(mf.isAndroid && t.options.AndroidUseNativeControls) && !(mf.isiPad && t.options.iPadUseNativeControls) && !(mf.isiPhone && t.options.iPhoneUseNativeControls)) {
-
+
+ if (!(mf.isAndroid && t.options.AndroidUseNativeControls) && !(mf.isiPad && t.options.iPadUseNativeControls) && !(mf.isiPhone && t.options.iPhoneUseNativeControls)) {
+
// two built in features
t.buildposter(t, t.controls, t.layers, t.media);
t.buildkeyboard(t, t.controls, t.layers, t.media);
@@ -2401,30 +2417,30 @@ if (typeof jQuery != 'undefined') {
} catch (e) {
// TODO: report control error
//throw e;
- //console.log('error building ' + feature);
- //console.log(e);
+ //
+ //
}
}
}
t.container.trigger('controlsready');
-
+
// reset all layers and controls
t.setPlayerSize(t.width, t.height);
t.setControlsSize();
-
+
// controls fade
if (t.isVideo) {
-
+
if (mejs.MediaFeatures.hasTouch) {
-
+
// for touch devices (iOS, Android)
// show/hide without animation on touch
-
+
t.$media.bind('touchstart', function() {
-
-
+
+
// toggle controls
if (t.controlsAreVisible) {
t.hideControls(false);
@@ -2433,28 +2449,35 @@ if (typeof jQuery != 'undefined') {
t.showControls(false);
}
}
- });
-
+ });
+
} else {
- // click to play/pause
- t.media.addEventListener('click', function() {
- if (t.options.clickToPlayPause) {
- if (t.media.paused) {
- t.media.play();
- } else {
- t.media.pause();
- }
- }
- });
-
+
+ // create callback here since it needs access to current
+ // MediaElement object
+ mejs.MediaElementPlayer.prototype.clickToPlayPauseCallback = function() {
+ //
+
+ if (t.options.clickToPlayPause) {
+ if (t.media.paused) {
+ t.play();
+ } else {
+ t.pause();
+ }
+ }
+ };
+
+ // click to play/pause
+ t.media.addEventListener('click', t.clickToPlayPauseCallback, false);
+
// show/hide controls
t.container
.bind('mouseenter mouseover', function () {
if (t.controlsEnabled) {
- if (!t.options.alwaysShowControls) {
+ if (!t.options.alwaysShowControls) {
t.killControlsTimer('enter');
t.showControls();
- t.startControlsTimer(2500);
+ t.startControlsTimer(2500);
}
}
})
@@ -2472,7 +2495,7 @@ if (typeof jQuery != 'undefined') {
.bind('mouseleave', function () {
if (t.controlsEnabled) {
if (!t.media.paused && !t.options.alwaysShowControls) {
- t.startControlsTimer(1000);
+ t.startControlsTimer(1000);
}
}
});
@@ -2500,25 +2523,25 @@ if (typeof jQuery != 'undefined') {
}, false);
}
}
-
+
// EVENTS
// FOCUS: when a video starts playing, it takes focus from other players (possibily pausing them)
media.addEventListener('play', function() {
- var playerIndex;
-
- // go through all other players
- for (playerIndex in mejs.players) {
- var p = mejs.players[playerIndex];
- if (p.id != t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended) {
- p.pause();
- }
- p.hasFocus = false;
+ var playerIndex;
+
+ // go through all other players
+ for (playerIndex in mejs.players) {
+ var p = mejs.players[playerIndex];
+ if (p.id != t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended) {
+ p.pause();
}
-
- t.hasFocus = true;
+ p.hasFocus = false;
+ }
+
+ t.hasFocus = true;
},false);
-
+
// ended for all
t.media.addEventListener('ended', function (e) {
@@ -2526,23 +2549,25 @@ if (typeof jQuery != 'undefined') {
try{
t.media.setCurrentTime(0);
} catch (exp) {
-
+
}
}
t.media.pause();
-
- if (t.setProgressRail)
+
+ if (t.setProgressRail) {
t.setProgressRail();
- if (t.setCurrentRail)
- t.setCurrentRail();
+ }
+ if (t.setCurrentRail) {
+ t.setCurrentRail();
+ }
if (t.options.loop) {
- t.media.play();
+ t.play();
} else if (!t.options.alwaysShowControls && t.controlsEnabled) {
t.showControls();
}
}, false);
-
+
// resize on the first play
t.media.addEventListener('loadedmetadata', function(e) {
if (t.updateDuration) {
@@ -2551,7 +2576,7 @@ if (typeof jQuery != 'undefined') {
if (t.updateCurrent) {
t.updateCurrent();
}
-
+
if (!t.isFullScreen) {
t.setPlayerSize(t.width, t.height);
t.setControlsSize();
@@ -2564,47 +2589,46 @@ if (typeof jQuery != 'undefined') {
t.setPlayerSize(t.width, t.height);
t.setControlsSize();
}, 50);
-
+
// adjust controls whenever window sizes (used to be in fullscreen only)
t.globalBind('resize', function() {
-
- // don't resize for fullscreen mode
+
+ // don't resize for fullscreen mode
if ( !(t.isFullScreen || (mejs.MediaFeatures.hasTrueNativeFullScreen && document.webkitIsFullScreen)) ) {
t.setPlayerSize(t.width, t.height);
}
-
+
// always adjust controls
t.setControlsSize();
- });
+ });
// TEMP: needs to be moved somewhere else
if (t.media.pluginType == 'youtube') {
- t.container.find('.mejs-overlay-play').hide();
+ t.container.find('.mejs-overlay-play').hide();
}
}
-
+
// force autoplay for HTML5
if (autoplay && media.pluginType == 'native') {
- media.load();
- media.play();
+ t.play();
}
if (t.options.success) {
-
+
if (typeof t.options.success == 'string') {
- window[t.options.success](t.media, t.domNode, t);
+ window[t.options.success](t.media, t.domNode, t);
} else {
- t.options.success(t.media, t.domNode, t);
+ t.options.success(t.media, t.domNode, t);
}
}
},
handleError: function(e) {
var t = this;
-
+
t.controls.hide();
-
+
// Tell user that the file cannot be played
if (t.options.error) {
t.options.error(e);
@@ -2614,27 +2638,29 @@ if (typeof jQuery != 'undefined') {
setPlayerSize: function(width,height) {
var t = this;
- if (typeof width != 'undefined')
+ if (typeof width != 'undefined') {
t.width = width;
-
- if (typeof height != 'undefined')
+ }
+
+ if (typeof height != 'undefined') {
t.height = height;
+ }
+
+ // detect 100% mode - use currentStyle for IE since css() doesn't return percentages
+ if (t.height.toString().indexOf('%') > 0 || t.$node.css('max-width') === '100%' || parseInt(t.$node.css('max-width').replace(/px/,''), 10) / t.$node.offsetParent().width() === 1 || (t.$node[0].currentStyle && t.$node[0].currentStyle.maxWidth === '100%')) {
- // detect 100% mode - use currentStyle for IE since css() doesn't return percentages
- if (t.height.toString().indexOf('%') > 0 || t.$node.css('max-width') === '100%' || (t.$node[0].currentStyle && t.$node[0].currentStyle.maxWidth === '100%')) {
-
// do we have the native dimensions yet?
- var
+ var
nativeWidth = t.isVideo ? ((t.media.videoWidth && t.media.videoWidth > 0) ? t.media.videoWidth : t.options.defaultVideoWidth) : t.options.defaultAudioWidth,
nativeHeight = t.isVideo ? ((t.media.videoHeight && t.media.videoHeight > 0) ? t.media.videoHeight : t.options.defaultVideoHeight) : t.options.defaultAudioHeight,
parentWidth = t.container.parent().closest(':visible').width(),
newHeight = t.isVideo || !t.options.autosizeProgress ? parseInt(parentWidth * nativeHeight/nativeWidth, 10) : nativeHeight;
-
+
if (t.container.parent()[0].tagName.toLowerCase() === 'body') { // && t.container.siblings().count == 0) {
parentWidth = $(window).width();
newHeight = $(window).height();
}
-
+
if ( newHeight != 0 && parentWidth != 0 ) {
// set outer container size
t.container
@@ -2646,31 +2672,39 @@ if (typeof jQuery != 'undefined') {
.width('100%')
.height('100%');
- // if shim is ready, send the size to the embeded plugin
+ // if shim is ready, send the size to the embeded plugin
if (t.isVideo) {
if (t.media.setVideoSize) {
t.media.setVideoSize(parentWidth, newHeight);
}
}
-
+
// set the layers
t.layers.children('.mejs-layer')
.width('100%')
.height('100%');
}
-
-
+
+
} else {
t.container
.width(t.width)
.height(t.height);
-
+
t.layers.children('.mejs-layer')
.width(t.width)
.height(t.height);
-
+
}
+
+ // special case for big play button so it doesn't go over the controls area
+ var playLayer = t.layers.find('.mejs-overlay-play'),
+ playButton = playLayer.find('.mejs-overlay-button');
+
+ playLayer.height(t.container.height() - t.controls.height());
+ playButton.css('margin-top', '-' + (playButton.height()/2 - t.controls.height()/2).toString() + 'px' );
+
},
setControlsSize: function() {
@@ -2682,18 +2716,18 @@ if (typeof jQuery != 'undefined') {
current = t.controls.find('.mejs-time-current'),
loaded = t.controls.find('.mejs-time-loaded'),
others = rail.siblings();
-
+
// allow the size to come from custom CSS
if (t.options && !t.options.autosizeProgress) {
- // Also, frontends devs can be more flexible
+ // Also, frontends devs can be more flexible
// due the opportunity of absolute positioning.
railWidth = parseInt(rail.css('width'));
}
-
+
// attempt to autosize
if (railWidth === 0 || !railWidth) {
-
+
// find the size of all the other controls besides the rail
others.each(function() {
var $this = $(this);
@@ -2701,7 +2735,7 @@ if (typeof jQuery != 'undefined') {
usedWidth += $(this).outerWidth(true);
}
});
-
+
// fit the rail into the remaining space
railWidth = t.controls.width() - usedWidth - (rail.outerWidth(true) - rail.width());
}
@@ -2710,17 +2744,17 @@ if (typeof jQuery != 'undefined') {
rail.width(railWidth);
// dark space
total.width(railWidth - (total.outerWidth(true) - total.width()));
-
+
if (t.setProgressRail)
t.setProgressRail();
if (t.setCurrentRail)
- t.setCurrentRail();
+ t.setCurrentRail();
},
buildposter: function(player, controls, layers, media) {
var t = this,
- poster =
+ poster =
$('<div class="mejs-poster mejs-layer">' +
'</div>')
.appendTo(layers),
@@ -2729,8 +2763,8 @@ if (typeof jQuery != 'undefined') {
// prioriy goes to option (this is useful if you need to support iOS 3.x (iOS completely fails with poster)
if (player.options.poster !== '') {
posterUrl = player.options.poster;
- }
-
+ }
+
// second, try the real poster
if (posterUrl !== '' && posterUrl != null) {
t.setPoster(posterUrl);
@@ -2741,18 +2775,25 @@ if (typeof jQuery != 'undefined') {
media.addEventListener('play',function() {
poster.hide();
}, false);
+
+ if(player.options.showPosterWhenEnded && player.options.autoRewind){
+ media.addEventListener('ended',function() {
+ poster.show();
+ }, false);
+ }
},
-
+
setPoster: function(url) {
var t = this,
posterDiv = t.container.find('.mejs-poster'),
posterImg = posterDiv.find('img');
-
+
if (posterImg.length == 0) {
posterImg = $('<img width="100%" height="100%" />').appendTo(posterDiv);
- }
-
+ }
+
posterImg.attr('src', url);
+ posterDiv.css({'background-image' : 'url(' + url + ')'});
},
buildoverlays: function(player, controls, layers, media) {
@@ -2760,42 +2801,40 @@ if (typeof jQuery != 'undefined') {
if (!player.isVideo)
return;
- var
- loading =
+ var
+ loading =
$('<div class="mejs-overlay mejs-layer">'+
'<div class="mejs-overlay-loading"><span></span></div>'+
'</div>')
.hide() // start out hidden
.appendTo(layers),
- error =
+ error =
$('<div class="mejs-overlay mejs-layer">'+
'<div class="mejs-overlay-error"></div>'+
'</div>')
.hide() // start out hidden
.appendTo(layers),
// this needs to come last so it's on top
- bigPlay =
+ bigPlay =
$('<div class="mejs-overlay mejs-layer mejs-overlay-play">'+
'<div class="mejs-overlay-button"></div>'+
'</div>')
.appendTo(layers)
- .click(function() {
- if (t.options.clickToPlayPause) {
- if (media.paused) {
- media.play();
- } else {
- media.pause();
- }
- }
+ .bind('click touchstart', function() {
+ if (t.options.clickToPlayPause) {
+ if (media.paused) {
+ t.play();
+ }
+ }
});
-
+
/*
if (mejs.MediaFeatures.isiOS || mejs.MediaFeatures.isAndroid) {
bigPlay.remove();
loading.remove();
}
*/
-
+
// show/hide big play button
media.addEventListener('play',function() {
@@ -2803,13 +2842,13 @@ if (typeof jQuery != 'undefined') {
loading.hide();
controls.find('.mejs-time-buffering').hide();
error.hide();
- }, false);
-
+ }, false);
+
media.addEventListener('playing', function() {
bigPlay.hide();
loading.hide();
controls.find('.mejs-time-buffering').hide();
- error.hide();
+ error.hide();
}, false);
media.addEventListener('seeking', function() {
@@ -2821,32 +2860,32 @@ if (typeof jQuery != 'undefined') {
loading.hide();
controls.find('.mejs-time-buffering').hide();
}, false);
-
+
media.addEventListener('pause',function() {
if (!mejs.MediaFeatures.isiPhone) {
bigPlay.show();
}
}, false);
-
+
media.addEventListener('waiting', function() {
- loading.show();
+ loading.show();
controls.find('.mejs-time-buffering').show();
- }, false);
-
-
- // show/hide loading
+ }, false);
+
+
+ // show/hide loading
media.addEventListener('loadeddata',function() {
// for some reason Chrome is firing this event
//if (mejs.MediaFeatures.isChrome && media.getAttribute && media.getAttribute('preload') === 'none')
// return;
-
+
loading.show();
controls.find('.mejs-time-buffering').show();
- }, false);
+ }, false);
media.addEventListener('canplay',function() {
loading.hide();
controls.find('.mejs-time-buffering').hide();
- }, false);
+ }, false);
// error handling
media.addEventListener('error',function() {
@@ -2854,42 +2893,42 @@ if (typeof jQuery != 'undefined') {
controls.find('.mejs-time-buffering').hide();
error.show();
error.find('mejs-overlay-error').html("Error loading this resource");
- }, false);
+ }, false);
},
-
+
buildkeyboard: function(player, controls, layers, media) {
var t = this;
-
+
// listen for key presses
t.globalBind('keydown', function(e) {
-
+
if (player.hasFocus && player.options.enableKeyboard) {
-
+
// find a matching key
for (var i=0, il=player.options.keyActions.length; i<il; i++) {
var keyAction = player.options.keyActions[i];
-
+
for (var j=0, jl=keyAction.keys.length; j<jl; j++) {
if (e.keyCode == keyAction.keys[j]) {
e.preventDefault();
keyAction.action(player, media, e.keyCode);
return false;
- }
+ }
}
}
}
-
+
return true;
});
-
+
// check if someone clicked outside a player region, then kill its focus
t.globalBind('click', function(event) {
if ($(event.target).closest('.mejs-container').length == 0) {
player.hasFocus = false;
}
});
-
+
},
findTracks: function() {
@@ -2899,9 +2938,9 @@ if (typeof jQuery != 'undefined') {
// store for use by plugins
t.tracks = [];
tracktags.each(function(index, track) {
-
+
track = $(track);
-
+
t.tracks.push({
srclang: (track.attr('srclang')) ? track.attr('srclang').toLowerCase() : '',
src: track.attr('src'),
@@ -2918,13 +2957,20 @@ if (typeof jQuery != 'undefined') {
this.setControlsSize();
},
play: function() {
+ this.load();
this.media.play();
},
pause: function() {
- this.media.pause();
+ try {
+ this.media.pause();
+ } catch (e) {}
},
load: function() {
- this.media.load();
+ if (!this.isLoaded) {
+ this.media.load();
+ }
+
+ this.isLoaded = true;
},
setMuted: function(muted) {
this.media.setMuted(muted);
@@ -2946,7 +2992,7 @@ if (typeof jQuery != 'undefined') {
},
remove: function() {
var t = this, featureIndex, feature;
-
+
// invoke features cleanup
for (featureIndex in t.options.features) {
feature = t.options.features[featureIndex];
@@ -2956,33 +3002,31 @@ if (typeof jQuery != 'undefined') {
} catch (e) {
// TODO: report control error
//throw e;
- //console.log('error building ' + feature);
- //console.log(e);
+ //
+ //
}
}
}
- if (t.media.pluginType === 'native') {
+ // grab video and put it back in place
+ if (!t.isDynamic) {
t.$media.prop('controls', true);
+ // detach events from the video
+ // TODO: detach event listeners better than this;
+ // also detach ONLY the events attached by this plugin!
+ t.$node.clone().show().insertBefore(t.container);
+ t.$node.remove();
} else {
- t.media.remove();
+ t.$node.insertBefore(t.container);
}
-
- // grab video and put it back in place
- if (!t.isDynamic) {
- if (t.media.pluginType === 'native') {
- // detach events from the video
- // TODO: detach event listeners better than this;
- // also detach ONLY the events attached by this plugin!
- //t.$node.clone().insertBefore(t.container);
- //t.$node.remove();
- }
- /*else*/ t.$node.insertBefore(t.container)
+
+ if (t.media.pluginType !== 'native') {
+ t.media.remove();
}
// Remove the player from the mejs.players object so that pauseOtherPlayers doesn't blow up when trying to pause a non existance flash api.
delete mejs.players[t.id];
-
+
t.container.remove();
t.globalUnbind();
delete t.node.player;
@@ -2996,7 +3040,14 @@ if (typeof jQuery != 'undefined') {
// add player ID as an event namespace so it's easier to unbind them all later
var ret = {d: [], w: []};
$.each((events || '').split(' '), function(k, v){
- ret[rwindow.test(v) ? 'w' : 'd'].push(v + '.' + id);
+ var eventname = v + '.' + id;
+ if (eventname.indexOf('.') === 0) {
+ ret.d.push(eventname);
+ ret.w.push(eventname);
+ }
+ else {
+ ret[rwindow.test(v) ? 'w' : 'd'].push(eventname);
+ }
});
ret.d = ret.d.join(' ');
ret.w = ret.w.join(' ');
@@ -3038,12 +3089,12 @@ if (typeof jQuery != 'undefined') {
return this;
};
}
-
+
$(document).ready(function() {
// auto enable using JSON attribute
$('.mejs-player').mediaelementplayer();
});
-
+
// push out to window
window.MediaElementPlayer = mejs.MediaElementPlayer;
@@ -3052,7 +3103,7 @@ if (typeof jQuery != 'undefined') {
(function($) {
$.extend(mejs.MepDefaults, {
- playpauseText: 'Play/Pause'
+ playpauseText: mejs.i18n.t('Play/Pause')
});
// PLAY/pause BUTTON
@@ -3309,7 +3360,7 @@ if (typeof jQuery != 'undefined') {
// options
$.extend(mejs.MepDefaults, {
duration: -1,
- timeAndDurationSeparator: ' <span> | </span> '
+ timeAndDurationSeparator: '<span> | </span>'
});
@@ -3388,10 +3439,11 @@ if (typeof jQuery != 'undefined') {
});
})(mejs.$);
+
(function($) {
$.extend(mejs.MepDefaults, {
- muteText: 'Mute Toggle',
+ muteText: mejs.i18n.t('Mute Toggle'),
hideVolumeOnTouchDevices: true,
audioVolume: 'horizontal',
@@ -3628,8 +3680,6 @@ if (typeof jQuery != 'undefined') {
isNativeFullScreen: false,
- docStyleOverflow: null,
-
isInIframe: false,
buildfullscreen: function(player, controls, layers, media) {
@@ -3644,16 +3694,17 @@ if (typeof jQuery != 'undefined') {
// chrome doesn't alays fire this in an iframe
var func = function(e) {
-
- if (mejs.MediaFeatures.isFullScreen()) {
- player.isNativeFullScreen = true;
- // reset the controls once we are fully in full screen
- player.setControlsSize();
- } else {
- player.isNativeFullScreen = false;
- // when a user presses ESC
- // make sure to put the player back into place
- player.exitFullScreen();
+ if (player.isFullScreen) {
+ if (mejs.MediaFeatures.isFullScreen()) {
+ player.isNativeFullScreen = true;
+ // reset the controls once we are fully in full screen
+ player.setControlsSize();
+ } else {
+ player.isNativeFullScreen = false;
+ // when a user presses ESC
+ // make sure to put the player back into place
+ player.exitFullScreen();
+ }
}
};
@@ -3707,7 +3758,7 @@ if (typeof jQuery != 'undefined') {
return !!supports;
})();
- //console.log('supportsPointerEvents', supportsPointerEvents);
+ //
if (supportsPointerEvents && !mejs.MediaFeatures.isOpera) { // opera doesn't allow this :(
@@ -3732,6 +3783,9 @@ if (typeof jQuery != 'undefined') {
fullscreenBtn.css('pointer-events', '');
t.controls.css('pointer-events', '');
+ // prevent clicks from pausing video
+ t.media.removeEventListener('click', t.clickToPlayPauseCallback);
+
// store for later
fullscreenIsDisabled = false;
}
@@ -3747,7 +3801,7 @@ if (typeof jQuery != 'undefined') {
containerWidth = t.container.width(),
containerHeight = t.container.height();
- for (i in hoverDivs) {
+ for (i in hoverDivs) {
hoverDivs[i].css({position: 'absolute', top: 0, left: 0}); //, backgroundColor: '#f00'});
}
@@ -3780,46 +3834,57 @@ if (typeof jQuery != 'undefined') {
positionHoverDivs();
});
- for (i = 0, len = hoverDivNames.length; i < len; i += 1) {
+ for (i = 0, len = hoverDivNames.length; i < len; i++) {
hoverDivs[hoverDivNames[i]] = $('<div class="mejs-fullscreen-hover" />').appendTo(t.container).mouseover(restoreControls).hide();
}
// on hover, kill the fullscreen button's HTML handling, allowing clicks down to Flash
- fullscreenBtn
- .mouseover(function() {
+ fullscreenBtn.on('mouseover',function() {
- if (!t.isFullScreen) {
+ if (!t.isFullScreen) {
- var buttonPos = fullscreenBtn.offset(),
- containerPos = player.container.offset();
+ var buttonPos = fullscreenBtn.offset(),
+ containerPos = player.container.offset();
- // move the button in Flash into place
- media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, false);
+ // move the button in Flash into place
+ media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, false);
- // allows click through
- fullscreenBtn.css('pointer-events', 'none');
- t.controls.css('pointer-events', 'none');
+ // allows click through
+ fullscreenBtn.css('pointer-events', 'none');
+ t.controls.css('pointer-events', 'none');
- // show the divs that will restore things
- for (i in hoverDivs) {
- hoverDivs[i].show();
- }
- positionHoverDivs();
+ // restore click-to-play
+ t.media.addEventListener('click', t.clickToPlayPauseCallback);
- fullscreenIsDisabled = true;
+ // show the divs that will restore things
+ for (i in hoverDivs) {
+ hoverDivs[i].show();
}
- });
+ positionHoverDivs();
+
+ fullscreenIsDisabled = true;
+ }
+
+ });
// restore controls anytime the user enters or leaves fullscreen
media.addEventListener('fullscreenchange', function(e) {
+ t.isFullScreen = !t.isFullScreen;
+ // don't allow plugin click to pause video - messes with
+ // plugin's controls
+ if (t.isFullScreen) {
+ t.media.removeEventListener('click', t.clickToPlayPauseCallback);
+ } else {
+ t.media.addEventListener('click', t.clickToPlayPauseCallback);
+ }
restoreControls();
});
// the mouseout event doesn't work on the fullscren button, because we already killed the pointer-events
// so we use the document.mousemove event to restore controls when the mouse moves outside the fullscreen button
- /*
+
t.globalBind('mousemove', function(e) {
// if the mouse is anywhere but the fullsceen button, then restore it all
@@ -3839,7 +3904,7 @@ if (typeof jQuery != 'undefined') {
}
}
});
- */
+
} else {
@@ -3847,7 +3912,7 @@ if (typeof jQuery != 'undefined') {
// the hover state will show the fullscreen button in Flash to hover up and click
fullscreenBtn
- .mouseover(function() {
+ .on('mouseover', function() {
if (hideTimeout !== null) {
clearTimeout(hideTimeout);
@@ -3860,7 +3925,7 @@ if (typeof jQuery != 'undefined') {
media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, true);
})
- .mouseout(function() {
+ .on('mouseout', function() {
if (hideTimeout !== null) {
clearTimeout(hideTimeout);
@@ -3903,10 +3968,8 @@ if (typeof jQuery != 'undefined') {
return;
}
- // store overflow
- docStyleOverflow = document.documentElement.style.overflow;
// set it to not show scroll bars so 100% will work
- document.documentElement.style.overflow = 'hidden';
+ $(document.documentElement).addClass('mejs-fullscreen');
// store sizing
normalHeight = t.container.height();
@@ -3990,7 +4053,7 @@ if (typeof jQuery != 'undefined') {
}, 500);
//}
- if (t.pluginType === 'native') {
+ if (t.media.pluginType === 'native') {
t.$media
.width('100%')
.height('100%');
@@ -4038,7 +4101,7 @@ if (typeof jQuery != 'undefined') {
}
// restore scroll bars to document
- document.documentElement.style.overflow = docStyleOverflow;
+ $(document.documentElement).removeClass('mejs-fullscreen');
t.container
.removeClass('mejs-container-fullscreen')
@@ -4046,12 +4109,12 @@ if (typeof jQuery != 'undefined') {
.height(normalHeight);
//.css({position: '', left: '', top: '', right: '', bottom: '', overflow: 'inherit', width: normalWidth + 'px', height: normalHeight + 'px', 'z-index': 1});
- if (t.pluginType === 'native') {
+ if (t.media.pluginType === 'native') {
t.$media
.width(normalWidth)
.height(normalHeight);
} else {
- t.container.find('object embed')
+ t.container.find('.mejs-shim')
.width(normalWidth)
.height(normalHeight);
@@ -4080,7 +4143,7 @@ if (typeof jQuery != 'undefined') {
// this will automatically turn on a <track>
startLanguage: '',
- tracksText: 'Captions/Subtitles',
+ tracksText: mejs.i18n.t('Captions/Subtitles'),
// option to remove the [cc] button when no <track kind="subtitles"> are present
hideCaptionsButtonWhenEmpty: true,
@@ -4104,6 +4167,11 @@ if (typeof jQuery != 'undefined') {
i,
options = '';
+ if (t.domNode.textTracks) { // if browser will do native captions, prefer mejs captions, loop through tracks and hide
+ for (var i = t.domNode.textTracks.length - 1; i >= 0; i--) {
+ t.domNode.textTracks[i].mode = "hidden";
+ }
+ }
player.chapters =
$('<div class="mejs-chapters mejs-layer"></div>')
.prependTo(layers).hide();
@@ -4118,7 +4186,7 @@ if (typeof jQuery != 'undefined') {
'<ul>'+
'<li>'+
'<input type="radio" name="' + player.id + '_captions" id="' + player.id + '_captions_none" value="none" checked="checked" />' +
- '<label for="' + player.id + '_captions_none">None</label>'+
+ '<label for="' + player.id + '_captions_none">' + mejs.i18n.t('None') +'</label>'+
'</li>' +
'</ul>'+
'</div>'+
@@ -4449,7 +4517,7 @@ if (typeof jQuery != 'undefined') {
if (!img.is(':visible') && !img.is(':animated')) {
- console.log('showing existing slide');
+ //
img.fadeIn()
.siblings(':visible')
@@ -4766,9 +4834,9 @@ $.extend(mejs.MepDefaults,
return null;
if (player.isFullScreen) {
- return "Turn off Fullscreen";
+ return mejs.i18n.t('Turn off Fullscreen');
} else {
- return "Go Fullscreen";
+ return mejs.i18n.t('Go Fullscreen');
}
},
click: function(player) {
@@ -4784,9 +4852,9 @@ $.extend(mejs.MepDefaults,
{
render: function(player) {
if (player.media.muted) {
- return "Unmute";
+ return mejs.i18n.t('Unmute');
} else {
- return "Mute";
+ return mejs.i18n.t('Mute');
}
},
click: function(player) {
@@ -4805,7 +4873,7 @@ $.extend(mejs.MepDefaults,
// demo of simple download video
{
render: function(player) {
- return "Download Video";
+ return mejs.i18n.t('Download Video');
},
click: function(player) {
window.location.href = player.media.currentSrc;
@@ -4836,7 +4904,7 @@ $.extend(mejs.MepDefaults,
});
player.contextMenu.bind('mouseleave', function() {
- //console.log('context hover out');
+ //
player.startContextMenuTimer();
});
@@ -4856,7 +4924,7 @@ $.extend(mejs.MepDefaults,
contextMenuTimeout: null,
startContextMenuTimer: function() {
- //console.log('startContextMenuTimer');
+ //
var t = this;
@@ -4870,7 +4938,7 @@ $.extend(mejs.MepDefaults,
killContextMenuTimer: function() {
var timer = this.contextMenuTimer;
- //console.log('killContextMenuTimer', timer);
+ //
if (timer != null) {
clearTimeout(timer);
diff --git a/files_videoviewer/js/mediaelement-and-player.min.js b/files_videoviewer/js/mediaelement-and-player.min.js
index 7266fae81..7547c3c7b 100755..100644
--- a/files_videoviewer/js/mediaelement-and-player.min.js
+++ b/files_videoviewer/js/mediaelement-and-player.min.js
@@ -10,49 +10,52 @@
* Copyright 2010-2013, John Dyer (http://j.hn)
* License: MIT
*
-*/var mejs=mejs||{};mejs.version="2.11.3";mejs.meIndex=0;
+*/var mejs=mejs||{};mejs.version="2.13.2";mejs.meIndex=0;
mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo",
"video/x-vimeo"]}]};
-mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",f,g,h=document.getElementsByTagName("script"),l=h.length,j=a.length;b<l;b++){f=h[b].src;c=f.lastIndexOf("/");if(c>-1){g=f.substring(c+
-1);f=f.substring(0,c+1)}else{g=f;f=""}for(c=0;c<j;c++){e=a[c];e=g.indexOf(e);if(e>-1){d=f;break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(f<10?"0"+f:f)+":"+(g<10?"0"+g:g)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d==
-"undefined")d=25;a=a.split(":");b=parseInt(a[0],10);var e=parseInt(a[1],10),f=parseInt(a[2],10),g=0,h=0;if(c)g=parseInt(a[3])/d;return h=b*3600+e*60+f+g},convertSMPTEtoSeconds:function(a){if(typeof a!="string")return false;a=a.replace(",",".");var b=0,c=a.indexOf(".")!=-1?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++){d=1;if(e>0)d=Math.pow(60,e);b+=Number(a[e])*d}return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);if(b&&/object|embed/i.test(b.nodeName))if(mejs.MediaFeatures.isIE){b.style.display=
+mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",g,f,h=document.getElementsByTagName("script"),l=h.length,j=a.length;b<l;b++){g=h[b].src;c=g.lastIndexOf("/");if(c>-1){f=g.substring(c+
+1);g=g.substring(0,c+1)}else{f=g;g=""}for(c=0;c<j;c++){e=a[c];e=f.indexOf(e);if(e>-1){d=g;break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,g=Math.floor(a/60)%60,f=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(g<10?"0"+g:g)+":"+(f<10?"0"+f:f)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d==
+"undefined")d=25;a=a.split(":");b=parseInt(a[0],10);var e=parseInt(a[1],10),g=parseInt(a[2],10),f=0,h=0;if(c)f=parseInt(a[3])/d;return h=b*3600+e*60+g+f},convertSMPTEtoSeconds:function(a){if(typeof a!="string")return false;a=a.replace(",",".");var b=0,c=a.indexOf(".")!=-1?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++){d=1;if(e>0)d=Math.pow(60,e);b+=Number(a[e])*d}return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);if(b&&/object|embed/i.test(b.nodeName))if(mejs.MediaFeatures.isIE){b.style.display=
"none";(function(){b.readyState==4?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)},removeObjectInIE:function(a){if(a=document.getElementById(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}};
-mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],f;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].description)&&
-!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(f=new ActiveXObject(c))e=d(f)}catch(g){}return e}};
+mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],g;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].description)&&
+!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(g=new ActiveXObject(c))e=d(g)}catch(f){}return e}};
mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[];if(a=a.GetVariable("$version")){a=a.split(" ")[1].split(",");b=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]}return b});
-mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,f,g){for(;d.isVersionSupported(e[0]+"."+e[1]+"."+e[2]+"."+e[3]);)e[f]+=g;e[f]-=g};c(a,b,0,1);c(a,b,1,1);c(a,b,2,1E4);c(a,b,2,1E3);c(a,b,2,100);c(a,b,2,10);c(a,b,2,1);c(a,b,3,1);return b});
-mejs.MediaFeatures={init:function(){var a=this,b=document,c=mejs.PluginDetector.nav,d=mejs.PluginDetector.ua.toLowerCase(),e,f=["source","track","audio","video"];a.isiPad=d.match(/ipad/i)!==null;a.isiPhone=d.match(/iphone/i)!==null;a.isiOS=a.isiPhone||a.isiPad;a.isAndroid=d.match(/android/i)!==null;a.isBustedAndroid=d.match(/android 2\.[12]/)!==null;a.isIE=c.appName.toLowerCase().indexOf("microsoft")!=-1;a.isChrome=d.match(/chrome/gi)!==null;a.isFirefox=d.match(/firefox/gi)!==null;a.isWebkit=d.match(/webkit/gi)!==
-null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit;a.isOpera=d.match(/opera/gi)!==null;a.hasTouch="ontouchstart"in window;a.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;for(c=0;c<f.length;c++)e=document.createElement(f[c]);a.supportsMediaTag=typeof e.canPlayType!=="undefined"||a.isBustedAndroid;a.hasSemiNativeFullScreen=typeof e.webkitEnterFullscreen!=="undefined";a.hasWebkitNativeFullScreen=typeof e.webkitRequestFullScreen!=="undefined";
-a.hasMozNativeFullScreen=typeof e.mozRequestFullScreen!=="undefined";a.hasTrueNativeFullScreen=a.hasWebkitNativeFullScreen||a.hasMozNativeFullScreen;a.nativeFullScreenEnabled=a.hasTrueNativeFullScreen;if(a.hasMozNativeFullScreen)a.nativeFullScreenEnabled=e.mozFullScreenEnabled;if(this.isChrome)a.hasSemiNativeFullScreen=false;if(a.hasTrueNativeFullScreen){a.fullScreenEventName=a.hasWebkitNativeFullScreen?"webkitfullscreenchange":"mozfullscreenchange";a.isFullScreen=function(){if(e.mozRequestFullScreen)return b.mozFullScreen;
-else if(e.webkitRequestFullScreen)return b.webkitIsFullScreen};a.requestFullScreen=function(g){if(a.hasWebkitNativeFullScreen)g.webkitRequestFullScreen();else a.hasMozNativeFullScreen&&g.mozRequestFullScreen()};a.cancelFullScreen=function(){if(a.hasWebkitNativeFullScreen)document.webkitCancelFullScreen();else a.hasMozNativeFullScreen&&document.mozCancelFullScreen()}}if(a.hasSemiNativeFullScreen&&d.match(/mac os x 10_5/i)){a.hasNativeFullScreen=false;a.hasSemiNativeFullScreen=false}}};mejs.MediaFeatures.init();
+mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,g,f){for(;d.isVersionSupported(e[0]+"."+e[1]+"."+e[2]+"."+e[3]);)e[g]+=f;e[g]-=f};c(a,b,0,1);c(a,b,1,1);c(a,b,2,1E4);c(a,b,2,1E3);c(a,b,2,100);c(a,b,2,10);c(a,b,2,1);c(a,b,3,1);return b});
+mejs.MediaFeatures={init:function(){var a=this,b=document,c=mejs.PluginDetector.nav,d=mejs.PluginDetector.ua.toLowerCase(),e,g=["source","track","audio","video"];a.isiPad=d.match(/ipad/i)!==null;a.isiPhone=d.match(/iphone/i)!==null;a.isiOS=a.isiPhone||a.isiPad;a.isAndroid=d.match(/android/i)!==null;a.isBustedAndroid=d.match(/android 2\.[12]/)!==null;a.isBustedNativeHTTPS=location.protocol==="https:"&&(d.match(/android [12]\./)!==null||d.match(/macintosh.* version.* safari/)!==null);a.isIE=c.appName.toLowerCase().indexOf("microsoft")!=
+-1||c.appName.toLowerCase().match(/trident/gi)!==null;a.isChrome=d.match(/chrome/gi)!==null;a.isFirefox=d.match(/firefox/gi)!==null;a.isWebkit=d.match(/webkit/gi)!==null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit&&!a.isIE;a.isOpera=d.match(/opera/gi)!==null;a.hasTouch="ontouchstart"in window;a.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;for(c=0;c<g.length;c++)e=document.createElement(g[c]);a.supportsMediaTag=typeof e.canPlayType!==
+"undefined"||a.isBustedAndroid;try{e.canPlayType("video/mp4")}catch(f){a.supportsMediaTag=false}a.hasSemiNativeFullScreen=typeof e.webkitEnterFullscreen!=="undefined";a.hasNativeFullscreen=typeof e.requestFullscreen!=="undefined";a.hasWebkitNativeFullScreen=typeof e.webkitRequestFullScreen!=="undefined";a.hasMozNativeFullScreen=typeof e.mozRequestFullScreen!=="undefined";a.hasMsNativeFullScreen=typeof e.msRequestFullscreen!=="undefined";a.hasTrueNativeFullScreen=a.hasWebkitNativeFullScreen||a.hasMozNativeFullScreen||
+a.hasMsNativeFullScreen;a.nativeFullScreenEnabled=a.hasTrueNativeFullScreen;if(a.hasMozNativeFullScreen)a.nativeFullScreenEnabled=document.mozFullScreenEnabled;else if(a.hasMsNativeFullScreen)a.nativeFullScreenEnabled=document.msFullscreenEnabled;if(a.isChrome)a.hasSemiNativeFullScreen=false;if(a.hasTrueNativeFullScreen){a.fullScreenEventName="";if(a.hasWebkitNativeFullScreen)a.fullScreenEventName="webkitfullscreenchange";else if(a.hasMozNativeFullScreen)a.fullScreenEventName="mozfullscreenchange";
+else if(a.hasMsNativeFullScreen)a.fullScreenEventName="MSFullscreenChange";a.isFullScreen=function(){if(e.mozRequestFullScreen)return b.mozFullScreen;else if(e.webkitRequestFullScreen)return b.webkitIsFullScreen;else if(e.hasMsNativeFullScreen)return b.msFullscreenElement!==null};a.requestFullScreen=function(h){if(a.hasWebkitNativeFullScreen)h.webkitRequestFullScreen();else if(a.hasMozNativeFullScreen)h.mozRequestFullScreen();else a.hasMsNativeFullScreen&&h.msRequestFullscreen()};a.cancelFullScreen=
+function(){if(a.hasWebkitNativeFullScreen)document.webkitCancelFullScreen();else if(a.hasMozNativeFullScreen)document.mozCancelFullScreen();else a.hasMsNativeFullScreen&&document.msExitFullscreen()}}if(a.hasSemiNativeFullScreen&&d.match(/mac os x 10_5/i)){a.hasNativeFullScreen=false;a.hasSemiNativeFullScreen=false}}};mejs.MediaFeatures.init();
mejs.HtmlMediaElement={pluginType:"native",isFullScreen:false,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if(typeof a=="string")this.src=a;else{var c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.src=c.src;break}}}},setVideoSize:function(a,b){this.width=a;this.height=b}};
mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={};this.attributes={}};
mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,tagName:"",muted:false,volume:1,currentTime:0,play:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.playVideo():this.pluginApi.playMedia();this.paused=false}},load:function(){if(this.pluginApi!=null){this.pluginType!="youtube"&&this.pluginApi.loadMedia();this.paused=
false}},pause:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.pauseVideo():this.pluginApi.pauseMedia();this.paused=true}},stop:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.stopVideo():this.pluginApi.stopMedia();this.paused=true}},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++){d=e[b];if(mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably"}return""},
-positionFullscreenButton:function(a,b,c){this.pluginApi!=null&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(a,b,c)},hideFullscreenButton:function(){this.pluginApi!=null&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src));
+positionFullscreenButton:function(a,b,c){this.pluginApi!=null&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){this.pluginApi!=null&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src));
this.src=mejs.Utility.absolutizeUrl(a);break}}}},setCurrentTime:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a);this.currentTime=a}},setVolume:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.setVolume(a*100):this.pluginApi.setVolume(a);this.volume=a}},setMuted:function(a){if(this.pluginApi!=null){if(this.pluginType=="youtube"){a?this.pluginApi.mute():this.pluginApi.unMute();this.muted=a;this.dispatchEvent("volumechange")}else this.pluginApi.setMuted(a);
this.muted=a}},setVideoSize:function(a,b){if(this.pluginElement.style){this.pluginElement.style.width=a+"px";this.pluginElement.style.height=b+"px"}this.pluginApi!=null&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.setFullscreen(true)},exitFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&
this.setFullscreen(false)},addEventListener:function(a,b){this.events[a]=this.events[a]||[];this.events[a].push(b)},removeEventListener:function(a,b){if(!a){this.events={};return true}var c=this.events[a];if(!c)return true;if(!b){this.events[a]=[];return true}for(i=0;i<c.length;i++)if(c[i]===b){this.events[a].splice(i,1);return true}return false},dispatchEvent:function(a){var b,c,d=this.events[a];if(d){c=Array.prototype.slice.call(arguments,1);for(b=0;b<d.length;b++)d[b].apply(null,c)}},hasAttribute:function(a){return a in
this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){if(this.hasAttribute(a))return this.attributes[a];return""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id);mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}};
mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},unregisterPluginElement:function(a){delete this.pluginMediaElements[a];delete this.htmlMediaElements[a]},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement=document.getElementById(b.id);
-b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e;a=this.pluginMediaElements[a];b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}};
-mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,
-pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
-mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),f=e==="audio"||e==="video",g=f?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var h=d.getAttribute("autoplay"),l=d.getAttribute("preload"),j=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];g=typeof g=="undefined"||g===null||g==""?null:g;e=typeof e=="undefined"||e===null?"":e;l=typeof l=="undefined"||l===null||l==="false"?
-"none":l;h=!(typeof h=="undefined"||h===null||h==="false");j=!(typeof j=="undefined"||j===null||j==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,f,g);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},false)}return this.updateNative(k,c,h,l)}else if(k.method!=="")return this.createPlugin(k,c,e,h,l,j);else{this.createErrorMessage(k,c,e);return this}},
-determinePlayback:function(a,b,c,d,e){var f=[],g,h,l,j={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},k;if(typeof b.type!="undefined"&&b.type!=="")if(typeof b.type=="string")f.push({type:b.type,url:e});else for(g=0;g<b.type.length;g++)f.push({type:b.type[g],url:e});else if(e!==null){l=this.formatType(e,a.getAttribute("type"));f.push({type:l,url:e})}else for(g=0;g<a.childNodes.length;g++){h=a.childNodes[g];if(h.nodeType==1&&h.tagName.toLowerCase()=="source"){e=h.getAttribute("src");
-l=this.formatType(e,h.getAttribute("type"));h=h.getAttribute("media");if(!h||!window.matchMedia||window.matchMedia&&window.matchMedia(h).matches)f.push({type:l,url:e})}}if(!d&&f.length>0&&f[0].url!==null&&this.getTypeFromFile(f[0].url).indexOf("audio")>-1)j.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="native")){if(!d){g=document.createElement(j.isVideo?
-"video":"audio");a.parentNode.insertBefore(g,a);a.style.display="none";j.htmlMediaElement=a=g}for(g=0;g<f.length;g++)if(a.canPlayType(f[g].type).replace(/no/,"")!==""||a.canPlayType(f[g].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){j.method="native";j.url=f[g].url;break}if(j.method==="native"){if(j.url!==null)a.src=j.url;if(b.mode!=="auto_plugin")return j}}if(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="shim")for(g=0;g<f.length;g++){l=f[g].type;for(a=0;a<b.plugins.length;a++){e=b.plugins[a];
-h=mejs.plugins[e];for(c=0;c<h.length;c++){k=h[c];if(k.version==null||mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(l==k.types[d]){j.method=e;j.url=f[g].url;return j}}}}if(b.mode==="auto_plugin"&&j.method==="native")return j;if(j.method===""&&f.length>0)j.url=f[0].url;return j},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];a=a.substring(a.lastIndexOf(".")+
-1).toLowerCase();return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+this.getTypeFromExtension(a)},getTypeFromExtension:function(a){switch(a){case "mp4":case "m4v":return"mp4";case "webm":case "webma":case "webmv":return"webm";case "ogg":case "oga":case "ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className="me-cannotplay";try{e.style.width=d.width+"px";e.style.height=d.height+"px"}catch(f){}e.innerHTML=
-c!==""?'<a href="'+a.url+'"><img src="'+c+'" width="100%" height="100%" /></a>':'<a href="'+a.url+'"><span>'+mejs.i18n.t("Download File")+"</span></a>";d.parentNode.insertBefore(e,d);d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,f){c=a.htmlMediaElement;var g=1,h=1,l="me_"+a.method+"_"+mejs.meIndex++,j=new mejs.PluginMediaElement(l,a.method,a.url),k=document.createElement("div"),m;j.tagName=c.tagName;for(m=0;m<c.attributes.length;m++){var n=c.attributes[m];n.specified==true&&j.setAttribute(n.name,
-n.value)}for(m=c.parentNode;m!==null&&m.tagName.toLowerCase()!="body";){if(m.parentNode.tagName.toLowerCase()=="p"){m.parentNode.parentNode.insertBefore(m,m.parentNode);break}m=m.parentNode}if(a.isVideo){g=b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;h=b.videoHeight>0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;g=mejs.Utility.encodeUrl(g);h=mejs.Utility.encodeUrl(h)}else if(b.enablePluginDebug){g=
-320;h=240}j.success=b.success;mejs.MediaPluginBridge.registerPluginElement(l,j,c);k.className="me-plugin";k.id=l+"_container";a.isVideo?c.parentNode.insertBefore(k,c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+l,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+g,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+h,"pseudostreamstart="+b.pseudoStreamingStartQueryParam];if(a.url!==null)a.method==
-"flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");b.enablePseudoStreaming&&d.push("pseudostreaming=true");f&&d.push("controls=true");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){case "silverlight":k.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+l+'" name="'+l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="initParams" value="'+
-d.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){a=document.createElement("div");k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+
-l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else k.innerHTML='<embed id="'+l+'" name="'+l+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+
-b.pluginPath+b.flashName+'" flashvars="'+d.join("&")+'" width="'+g+'" height="'+h+'" class="mejs-shim"></embed>';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:j,pluginId:l,videoId:b,height:h,width:g};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":j.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML=
-'<iframe src="http://player.vimeo.com/video/'+j.vimeoid+'?portrait=0&byline=0&title=0" width="'+g+'" height="'+h+'" frameborder="0" class="mejs-shim"></iframe>'}c.style.display="none";return j},updateNative:function(a,b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}};
+b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e;if(a=this.pluginMediaElements[a]){b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}}};
+mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,httpsBasicAuthSite:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,
+defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
+mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),g=e==="audio"||e==="video",f=g?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var h=d.getAttribute("autoplay"),l=d.getAttribute("preload"),j=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];f=typeof f=="undefined"||f===null||f==""?null:f;e=typeof e=="undefined"||e===null?"":e;l=typeof l=="undefined"||l===null||l==="false"?
+"none":l;h=!(typeof h=="undefined"||h===null||h==="false");j=!(typeof j=="undefined"||j===null||j==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,g,f);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},false)}return this.updateNative(k,c,h,l)}else if(k.method!=="")return this.createPlugin(k,c,e,h,l,j);else{this.createErrorMessage(k,c,e);return this}},
+determinePlayback:function(a,b,c,d,e){var g=[],f,h,l,j={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},k;if(typeof b.type!="undefined"&&b.type!=="")if(typeof b.type=="string")g.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)g.push({type:b.type[f],url:e});else if(e!==null){l=this.formatType(e,a.getAttribute("type"));g.push({type:l,url:e})}else for(f=0;f<a.childNodes.length;f++){h=a.childNodes[f];if(h.nodeType==1&&h.tagName.toLowerCase()=="source"){e=h.getAttribute("src");
+l=this.formatType(e,h.getAttribute("type"));h=h.getAttribute("media");if(!h||!window.matchMedia||window.matchMedia&&window.matchMedia(h).matches)g.push({type:l,url:e})}}if(!d&&g.length>0&&g[0].url!==null&&this.getTypeFromFile(g[0].url).indexOf("audio")>-1)j.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="native")&&!(mejs.MediaFeatures.isBustedNativeHTTPS&&
+b.httpsBasicAuthSite===true)){if(!d){f=document.createElement(j.isVideo?"video":"audio");a.parentNode.insertBefore(f,a);a.style.display="none";j.htmlMediaElement=a=f}for(f=0;f<g.length;f++)if(a.canPlayType(g[f].type).replace(/no/,"")!==""||a.canPlayType(g[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){j.method="native";j.url=g[f].url;break}if(j.method==="native"){if(j.url!==null)a.src=j.url;if(b.mode!=="auto_plugin")return j}}if(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="shim")for(f=
+0;f<g.length;f++){l=g[f].type;for(a=0;a<b.plugins.length;a++){e=b.plugins[a];h=mejs.plugins[e];for(c=0;c<h.length;c++){k=h[c];if(k.version==null||mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(l==k.types[d]){j.method=e;j.url=g[f].url;return j}}}}if(b.mode==="auto_plugin"&&j.method==="native")return j;if(j.method===""&&g.length>0)j.url=g[0].url;return j},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},
+getTypeFromFile:function(a){a=a.split("?")[0];a=a.substring(a.lastIndexOf(".")+1).toLowerCase();return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+this.getTypeFromExtension(a)},getTypeFromExtension:function(a){switch(a){case "mp4":case "m4v":return"mp4";case "webm":case "webma":case "webmv":return"webm";case "ogg":case "oga":case "ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className=
+"me-cannotplay";try{e.style.width=d.width+"px";e.style.height=d.height+"px"}catch(g){}e.innerHTML=b.customError?b.customError:c!==""?'<a href="'+a.url+'"><img src="'+c+'" width="100%" height="100%" /></a>':'<a href="'+a.url+'"><span>'+mejs.i18n.t("Download File")+"</span></a>";d.parentNode.insertBefore(e,d);d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,g){c=a.htmlMediaElement;var f=1,h=1,l="me_"+a.method+"_"+mejs.meIndex++,j=new mejs.PluginMediaElement(l,a.method,a.url),k=document.createElement("div"),
+m;j.tagName=c.tagName;for(m=0;m<c.attributes.length;m++){var n=c.attributes[m];n.specified==true&&j.setAttribute(n.name,n.value)}for(m=c.parentNode;m!==null&&m.tagName.toLowerCase()!="body";){if(m.parentNode.tagName.toLowerCase()=="p"){m.parentNode.parentNode.insertBefore(m,m.parentNode);break}m=m.parentNode}if(a.isVideo){f=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;h=b.pluginHeight>0?b.pluginHeight:b.videoHeight>
+0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;f=mejs.Utility.encodeUrl(f);h=mejs.Utility.encodeUrl(h)}else if(b.enablePluginDebug){f=320;h=240}j.success=b.success;mejs.MediaPluginBridge.registerPluginElement(l,j,c);k.className="me-plugin";k.id=l+"_container";a.isVideo?c.parentNode.insertBefore(k,c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+l,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+
+f,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+h,"pseudostreamstart="+b.pseudoStreamingStartQueryParam];if(a.url!==null)a.method=="flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");b.enablePseudoStreaming&&d.push("pseudostreaming=true");g&&d.push("controls=true");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){case "silverlight":k.innerHTML=
+'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+l+'" name="'+l+'" width="'+f+'" height="'+h+'" class="mejs-shim"><param name="initParams" value="'+d.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){a=
+document.createElement("div");k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+l+'" width="'+f+'" height="'+h+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="scale" value="default" /></object>'}else k.innerHTML=
+'<embed id="'+l+'" name="'+l+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+d.join("&")+'" width="'+f+'" height="'+h+'" scale="default"class="mejs-shim"></embed>';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:j,
+pluginId:l,videoId:b,height:h,width:f};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":j.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML='<iframe src="http://player.vimeo.com/video/'+j.vimeoid+'?portrait=0&byline=0&title=0" width="'+f+'" height="'+h+'" frameborder="0" class="mejs-shim"></iframe>'}c.style.display="none";c.removeAttribute("autoplay");return j},updateNative:function(a,
+b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}};
mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,
{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused;
c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=
@@ -60,9 +63,9 @@ a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid="+a.pluginI
c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=
document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e,c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false;
c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement;
-(function(a,b){var c={locale:{strings:{}},methods:{}};c.locale.getLanguage=function(){return{language:navigator.language}};c.locale.INIT_LANGUAGE=c.locale.getLanguage();c.methods.checkPlain=function(d){var e,f,g={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};d=String(d);for(e in g)if(g.hasOwnProperty(e)){f=RegExp(e,"g");d=d.replace(f,g[e])}return d};c.methods.formatString=function(d,e){for(var f in e){switch(f.charAt(0)){case "@":e[f]=c.methods.checkPlain(e[f]);break;case "!":break;default:e[f]=
-'<em class="placeholder">'+c.methods.checkPlain(e[f])+"</em>"}d=d.replace(f,e[f])}return d};c.methods.t=function(d,e,f){if(c.locale.strings&&c.locale.strings[f.context]&&c.locale.strings[f.context][d])d=c.locale.strings[f.context][d];if(e)d=c.methods.formatString(d,e);return d};c.t=function(d,e,f){if(typeof d==="string"&&d.length>0){var g=c.locale.getLanguage();f=f||{context:g.language};return c.methods.t(d,e,f)}else throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."};
-};b.i18n=c})(document,mejs);(function(a){a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings);(function(a){a.zh={Fullscreen:"\u5168\u87a2\u5e55","Go Fullscreen":"\u5168\u5c4f\u6a21\u5f0f","Turn off Fullscreen":"\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f",Close:"\u95dc\u9589"}})(mejs.i18n.locale.strings);
+(function(a,b){var c={locale:{language:"",strings:{}},methods:{}};c.getLanguage=function(){return(c.locale.language||window.navigator.userLanguage||window.navigator.language).substr(0,2).toLowerCase()};if(typeof mejsL10n!="undefined")c.locale.language=mejsL10n.language;c.methods.checkPlain=function(d){var e,g,f={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};d=String(d);for(e in f)if(f.hasOwnProperty(e)){g=RegExp(e,"g");d=d.replace(g,f[e])}return d};c.methods.t=function(d,e){if(c.locale.strings&&
+c.locale.strings[e.context]&&c.locale.strings[e.context][d])d=c.locale.strings[e.context][d];return c.methods.checkPlain(d)};c.t=function(d,e){if(typeof d==="string"&&d.length>0){var g=c.getLanguage();e=e||{context:g};return c.methods.t(d,e)}else throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."};};b.i18n=c})(document,mejs);(function(a){if(typeof mejsL10n!="undefined")a[mejsL10n.language]=mejsL10n.strings})(mejs.i18n.locale.strings);
+(function(a){if(typeof a.de==="undefined")a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings);(function(a){if(typeof a.zh==="undefined")a.zh={Fullscreen:"\u5168\u87a2\u5e55","Go Fullscreen":"\u5168\u5c4f\u6a21\u5f0f","Turn off Fullscreen":"\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f",Close:"\u95dc\u9589"}})(mejs.i18n.locale.strings);
/*!
* MediaElementPlayer
@@ -71,97 +74,100 @@ c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=fals
* Creates a controller bar for HTML5 <video> add <audio> tags
* using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
*
- * Copyright 2010-2012, John Dyer (http://j.hn/)
+ * Copyright 2010-2013, John Dyer (http://j.hn/)
* License: MIT
*
*/if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
-(function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,autoRewind:true,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,hideVideoControlsOnLoad:false,
-clickToPlayPause:true,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math.max(b.volume-0.1,0))}},{keys:[37,227],action:function(a,
-b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){if(typeof a.enterFullScreen!="undefined")a.isFullScreen?
-a.exitFullScreen():a.enterFullScreen()}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(a,b){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,b);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof b=="undefined")b=this.$node.data("mejsoptions");this.options=f.extend({},mejs.MepDefaults,b);this.id="mep_"+mejs.mepIndex++;mejs.players[this.id]=
-this;this.init();return this};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(e,g){a.meReady(e,g)},error:function(e){a.handleError(e)}}),d=a.media.tagName.toLowerCase();a.isDynamic=d!=="audio"&&d!=="video";a.isVideo=a.isDynamic?a.options.isVideo:d!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls",
-"controls");if(b.isiPad&&a.media.getAttribute("autoplay")!==null){a.media.load();a.media.play()}}else if(!(b.isAndroid&&a.options.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.container=f('<div id="'+a.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?"svg":"no-svg")+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className).insertBefore(a.$media);
-a.container.addClass((b.isAndroid?"mejs-android ":"")+(b.isiOS?"mejs-ios ":"")+(b.isiPad?"mejs-ipad ":"")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio";d=b.substring(0,
-1).toUpperCase()+b.substring(1);a.width=a.options[b+"Width"]>0||a.options[b+"Width"].toString().indexOf("%")>-1?a.options[b+"Width"]:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options["default"+d+"Width"];a.height=a.options[b+"Height"]>0||a.options[b+"Height"].toString().indexOf("%")>-1?a.options[b+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!==
-null?a.$media.attr("height"):a.options["default"+d+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.height;c.pluginHeight=a.width}mejs.MediaElement(a.$media[0],c);typeof a.container!="undefined"&&a.container.trigger("controlsshown")},showControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!b.controlsAreVisible){if(a){b.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true;b.container.trigger("controlsshown")});b.container.find(".mejs-control").css("visibility",
-"visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility","visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true;b.container.trigger("controlsshown")}b.setControlsSize()}},hideControls:function(a){var b=this;a=typeof a=="undefined"||a;if(b.controlsAreVisible)if(a){b.controls.stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display",
-"block");b.controlsAreVisible=false;b.container.trigger("controlshidden")});b.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")}},controlsTimer:null,startControlsTimer:function(a){var b=this;a=typeof a!="undefined"?
-a:1500;b.killControlsTimer("start");b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);this.controlsEnabled=true},meReady:function(a,b){var c=this,
-d=mejs.MediaFeatures,e=b.getAttribute("autoplay");e=!(typeof e=="undefined"||e===null||e==="false");var g;if(!c.created){c.created=true;c.media=a;c.domNode=b;if(!(d.isAndroid&&c.options.AndroidUseNativeControls)&&!(d.isiPad&&c.options.iPadUseNativeControls)&&!(d.isiPhone&&c.options.iPhoneUseNativeControls)){c.buildposter(c,c.controls,c.layers,c.media);c.buildkeyboard(c,c.controls,c.layers,c.media);c.buildoverlays(c,c.controls,c.layers,c.media);c.findTracks();for(g in c.options.features){d=c.options.features[g];
-if(c["build"+d])try{c["build"+d](c,c.controls,c.layers,c.media)}catch(k){}}c.container.trigger("controlsready");c.setPlayerSize(c.width,c.height);c.setControlsSize();if(c.isVideo){if(mejs.MediaFeatures.hasTouch)c.$media.bind("touchstart",function(){if(c.controlsAreVisible)c.hideControls(false);else c.controlsEnabled&&c.showControls(false)});else{c.media.addEventListener("click",function(){if(c.options.clickToPlayPause)c.media.paused?c.media.play():c.media.pause()});c.container.bind("mouseenter mouseover",
-function(){if(c.controlsEnabled)if(!c.options.alwaysShowControls){c.killControlsTimer("enter");c.showControls();c.startControlsTimer(2500)}}).bind("mousemove",function(){if(c.controlsEnabled){c.controlsAreVisible||c.showControls();c.options.alwaysShowControls||c.startControlsTimer(2500)}}).bind("mouseleave",function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControls&&c.startControlsTimer(1E3)})}c.options.hideVideoControlsOnLoad&&c.hideControls(false);e&&!c.options.alwaysShowControls&&
-c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(j){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(j.target.videoHeight)){c.setPlayerSize(j.target.videoWidth,j.target.videoHeight);c.setControlsSize();c.media.setVideoSize(j.target.videoWidth,j.target.videoHeight)}},false)}a.addEventListener("play",function(){for(var j in mejs.players){var l=mejs.players[j];l.id!=c.id&&c.options.pauseOtherPlayers&&!l.paused&&!l.ended&&l.pause();
-l.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){if(c.options.autoRewind)try{c.media.setCurrentTime(0)}catch(j){}c.media.pause();c.setProgressRail&&c.setProgressRail();c.setCurrentRail&&c.setCurrentRail();if(c.options.loop)c.media.play();else!c.options.alwaysShowControls&&c.controlsEnabled&&c.showControls()},false);c.media.addEventListener("loadedmetadata",function(){c.updateDuration&&c.updateDuration();c.updateCurrent&&c.updateCurrent();if(!c.isFullScreen){c.setPlayerSize(c.width,
-c.height);c.setControlsSize()}},false);setTimeout(function(){c.setPlayerSize(c.width,c.height);c.setControlsSize()},50);c.globalBind("resize",function(){c.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||c.setPlayerSize(c.width,c.height);c.setControlsSize()});c.media.pluginType=="youtube"&&c.container.find(".mejs-overlay-play").hide()}if(e&&a.pluginType=="native"){a.load();a.play()}if(c.options.success)typeof c.options.success=="string"?window[c.options.success](c.media,
-c.domNode,c):c.options.success(c.media,c.domNode,c)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a,b){if(typeof a!="undefined")this.width=a;if(typeof b!="undefined")this.height=b;if(this.height.toString().indexOf("%")>0||this.$node.css("max-width")==="100%"||this.$node[0].currentStyle&&this.$node[0].currentStyle.maxWidth==="100%"){var c=this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth:
-this.options.defaultAudioWidth,d=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight:this.options.defaultAudioHeight,e=this.container.parent().closest(":visible").width();c=this.isVideo||!this.options.autosizeProgress?parseInt(e*d/c,10):d;if(this.container.parent()[0].tagName.toLowerCase()==="body"){e=f(window).width();c=f(window).height()}if(c!=0&&e!=0){this.container.width(e).height(c);this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%");
-this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(e,c);this.layers.children(".mejs-layer").width("100%").height("100%")}}else{this.container.width(this.width).height(this.height);this.layers.children(".mejs-layer").width(this.width).height(this.height)}},setControlsSize:function(){var a=0,b=0,c=this.controls.find(".mejs-time-rail"),d=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");var e=c.siblings();if(this.options&&
-!this.options.autosizeProgress)b=parseInt(c.css("width"));if(b===0||!b){e.each(function(){var g=f(this);if(g.css("position")!="absolute"&&g.is(":visible"))a+=f(this).outerWidth(true)});b=this.controls.width()-a-(c.outerWidth(true)-c.width())}c.width(b);d.width(b-(d.outerWidth(true)-d.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,b,c,d){var e=f('<div class="mejs-poster mejs-layer"></div>').appendTo(c);b=a.$media.attr("poster");
-if(a.options.poster!=="")b=a.options.poster;b!==""&&b!=null?this.setPoster(b):e.hide();d.addEventListener("play",function(){e.hide()},false)},setPoster:function(a){var b=this.container.find(".mejs-poster"),c=b.find("img");if(c.length==0)c=f('<img width="100%" height="100%" />').appendTo(b);c.attr("src",a)},buildoverlays:function(a,b,c,d){var e=this;if(a.isVideo){var g=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(c),k=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(c),
-j=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(c).click(function(){if(e.options.clickToPlayPause)d.paused?d.play():d.pause()});d.addEventListener("play",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);d.addEventListener("playing",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);d.addEventListener("seeking",function(){g.show();b.find(".mejs-time-buffering").show()},
-false);d.addEventListener("seeked",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||j.show()},false);d.addEventListener("waiting",function(){g.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("loadeddata",function(){g.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("canplay",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener("error",function(){g.hide();
-b.find(".mejs-time-buffering").hide();k.show();k.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,d){this.globalBind("keydown",function(e){if(a.hasFocus&&a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g<k;g++)for(var j=a.options.keyActions[g],l=0,q=j.keys.length;l<q;l++)if(e.keyCode==j.keys[l]){e.preventDefault();j.action(a,d,e.keyCode);return false}return true});this.globalBind("click",function(e){if(f(e.target).closest(".mejs-container").length==
-0)a.hasFocus=false})},findTracks:function(){var a=this,b=a.$media.find("track");a.tracks=[];b.each(function(c,d){d=f(d);a.tracks.push({srclang:d.attr("srclang")?d.attr("srclang").toLowerCase():"",src:d.attr("src"),kind:d.attr("kind"),label:d.attr("label")||"",entries:[],isLoaded:false})})},changeSkin:function(a){this.container[0].className="mejs-container "+a;this.setPlayerSize(this.width,this.height);this.setControlsSize()},play:function(){this.media.play()},pause:function(){this.media.pause()},
-load:function(){this.media.load()},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b;for(a in this.options.features){b=this.options.features[a];if(this["clean"+b])try{this["clean"+b](this)}catch(c){}}this.media.pluginType==="native"?
-this.$media.prop("controls",true):this.media.remove();this.isDynamic||this.$node.insertBefore(this.container);delete mejs.players[this.id];this.container.remove();this.globalUnbind();delete this.node.player}};(function(){function a(c,d){var e={d:[],w:[]};f.each((c||"").split(" "),function(g,k){e[b.test(k)?"w":"d"].push(k+"."+d)});e.d=e.d.join(" ");e.w=e.w.join(" ");return e}var b=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=
-function(c,d,e){c=a(c,this.id);c.d&&f(document).bind(c.d,d,e);c.w&&f(window).bind(c.w,d,e)};mejs.MediaElementPlayer.prototype.globalUnbind=function(c,d){c=a(c,this.id);c.d&&f(document).unbind(c.d,d);c.w&&f(window).unbind(c.w,d)}})();if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){a===false?this.each(function(){var b=jQuery(this).data("mediaelementplayer");b&&b.remove();jQuery(this).removeData("mediaelementplayer")}):this.each(function(){jQuery(this).data("mediaelementplayer",
-new mejs.MediaElementPlayer(this,a))});return this};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{playpauseText:"Play/Pause"});f.extend(MediaElementPlayer.prototype,{buildplaypause:function(a,b,c,d){var e=f('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+this.id+'" title="'+this.options.playpauseText+'" aria-label="'+this.options.playpauseText+'"></button></div>').appendTo(b).click(function(g){g.preventDefault();d.paused?d.play():d.pause();return false});d.addEventListener("play",function(){e.removeClass("mejs-play").addClass("mejs-pause")},
-false);d.addEventListener("playing",function(){e.removeClass("mejs-play").addClass("mejs-pause")},false);d.addEventListener("pause",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false);d.addEventListener("paused",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,d){f('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+this.id+'" title="'+this.options.stopText+'" aria-label="'+this.options.stopText+'"></button></div>').appendTo(b).click(function(){d.paused||d.pause();if(d.currentTime>0){d.setCurrentTime(0);d.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left",
+(function(f){mejs.MepDefaults={poster:"",showPosterWhenEnded:false,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,autoRewind:true,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,
+hideVideoControlsOnLoad:false,clickToPlayPause:true,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?a.play():a.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math.max(b.volume-
+0.1,0))}},{keys:[37,227],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){if(typeof a.enterFullScreen!=
+"undefined")a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(a,b){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,b);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof b=="undefined")b=this.$node.data("mejsoptions");this.options=f.extend({},mejs.MepDefaults,b);this.id="mep_"+mejs.mepIndex++;
+mejs.players[this.id]=this;this.init();return this};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(d,g){a.meReady(d,g)},error:function(d){a.handleError(d)}}),e=a.media.tagName.toLowerCase();a.isDynamic=e!=="audio"&&e!=="video";a.isVideo=a.isDynamic?a.options.isVideo:e!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls",
+"controls");b.isiPad&&a.media.getAttribute("autoplay")!==null&&a.play()}else if(!(b.isAndroid&&a.options.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.container=f('<div id="'+a.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?"svg":"no-svg")+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className).insertBefore(a.$media);a.container.addClass((b.isAndroid?
+"mejs-android ":"")+(b.isiOS?"mejs-ios ":"")+(b.isiPad?"mejs-ipad ":"")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio";e=b.substring(0,1).toUpperCase()+b.substring(1);
+a.width=a.options[b+"Width"]>0||a.options[b+"Width"].toString().indexOf("%")>-1?a.options[b+"Width"]:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options["default"+e+"Width"];a.height=a.options[b+"Height"]>0||a.options[b+"Height"].toString().indexOf("%")>-1?a.options[b+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!==null?a.$media.attr("height"):
+a.options["default"+e+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.width;c.pluginHeight=a.height}mejs.MediaElement(a.$media[0],c);typeof a.container!="undefined"&&a.controlsAreVisible&&a.container.trigger("controlsshown")},showControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!b.controlsAreVisible){if(a){b.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true;b.container.trigger("controlsshown")});b.container.find(".mejs-control").css("visibility",
+"visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility","visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true;b.container.trigger("controlsshown")}b.setControlsSize()}},hideControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!(!b.controlsAreVisible||b.options.alwaysShowControls))if(a){b.controls.stop(true,true).fadeOut(200,function(){f(this).css("visibility",
+"hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")});b.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")}},controlsTimer:null,startControlsTimer:function(a){var b=
+this;a=typeof a!="undefined"?a:1500;b.killControlsTimer("start");b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);this.controlsEnabled=true},
+meReady:function(a,b){var c=this,e=mejs.MediaFeatures,d=b.getAttribute("autoplay");d=!(typeof d=="undefined"||d===null||d==="false");var g;if(!c.created){c.created=true;c.media=a;c.domNode=b;if(!(e.isAndroid&&c.options.AndroidUseNativeControls)&&!(e.isiPad&&c.options.iPadUseNativeControls)&&!(e.isiPhone&&c.options.iPhoneUseNativeControls)){c.buildposter(c,c.controls,c.layers,c.media);c.buildkeyboard(c,c.controls,c.layers,c.media);c.buildoverlays(c,c.controls,c.layers,c.media);c.findTracks();for(g in c.options.features){e=
+c.options.features[g];if(c["build"+e])try{c["build"+e](c,c.controls,c.layers,c.media)}catch(k){}}c.container.trigger("controlsready");c.setPlayerSize(c.width,c.height);c.setControlsSize();if(c.isVideo){if(mejs.MediaFeatures.hasTouch)c.$media.bind("touchstart",function(){if(c.controlsAreVisible)c.hideControls(false);else c.controlsEnabled&&c.showControls(false)});else{mejs.MediaElementPlayer.prototype.clickToPlayPauseCallback=function(){if(c.options.clickToPlayPause)c.media.paused?c.play():c.pause()};
+c.media.addEventListener("click",c.clickToPlayPauseCallback,false);c.container.bind("mouseenter mouseover",function(){if(c.controlsEnabled)if(!c.options.alwaysShowControls){c.killControlsTimer("enter");c.showControls();c.startControlsTimer(2500)}}).bind("mousemove",function(){if(c.controlsEnabled){c.controlsAreVisible||c.showControls();c.options.alwaysShowControls||c.startControlsTimer(2500)}}).bind("mouseleave",function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControls&&c.startControlsTimer(1E3)})}c.options.hideVideoControlsOnLoad&&
+c.hideControls(false);d&&!c.options.alwaysShowControls&&c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(j){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(j.target.videoHeight)){c.setPlayerSize(j.target.videoWidth,j.target.videoHeight);c.setControlsSize();c.media.setVideoSize(j.target.videoWidth,j.target.videoHeight)}},false)}a.addEventListener("play",function(){for(var j in mejs.players){var m=mejs.players[j];m.id!=c.id&&
+c.options.pauseOtherPlayers&&!m.paused&&!m.ended&&m.pause();m.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){if(c.options.autoRewind)try{c.media.setCurrentTime(0)}catch(j){}c.media.pause();c.setProgressRail&&c.setProgressRail();c.setCurrentRail&&c.setCurrentRail();if(c.options.loop)c.play();else!c.options.alwaysShowControls&&c.controlsEnabled&&c.showControls()},false);c.media.addEventListener("loadedmetadata",function(){c.updateDuration&&c.updateDuration();c.updateCurrent&&
+c.updateCurrent();if(!c.isFullScreen){c.setPlayerSize(c.width,c.height);c.setControlsSize()}},false);setTimeout(function(){c.setPlayerSize(c.width,c.height);c.setControlsSize()},50);c.globalBind("resize",function(){c.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||c.setPlayerSize(c.width,c.height);c.setControlsSize()});c.media.pluginType=="youtube"&&c.container.find(".mejs-overlay-play").hide()}d&&a.pluginType=="native"&&c.play();if(c.options.success)typeof c.options.success==
+"string"?window[c.options.success](c.media,c.domNode,c):c.options.success(c.media,c.domNode,c)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a,b){if(typeof a!="undefined")this.width=a;if(typeof b!="undefined")this.height=b;if(this.height.toString().indexOf("%")>0||this.$node.css("max-width")==="100%"||parseInt(this.$node.css("max-width").replace(/px/,""),10)/this.$node.offsetParent().width()===1||this.$node[0].currentStyle&&this.$node[0].currentStyle.maxWidth===
+"100%"){var c=this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth:this.options.defaultAudioWidth,e=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight:this.options.defaultAudioHeight,d=this.container.parent().closest(":visible").width();c=this.isVideo||!this.options.autosizeProgress?parseInt(d*e/c,10):e;if(this.container.parent()[0].tagName.toLowerCase()==="body"){d=f(window).width();
+c=f(window).height()}if(c!=0&&d!=0){this.container.width(d).height(c);this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%");this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(d,c);this.layers.children(".mejs-layer").width("100%").height("100%")}}else{this.container.width(this.width).height(this.height);this.layers.children(".mejs-layer").width(this.width).height(this.height)}d=this.layers.find(".mejs-overlay-play");c=d.find(".mejs-overlay-button");d.height(this.container.height()-
+this.controls.height());c.css("margin-top","-"+(c.height()/2-this.controls.height()/2).toString()+"px")},setControlsSize:function(){var a=0,b=0,c=this.controls.find(".mejs-time-rail"),e=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");var d=c.siblings();if(this.options&&!this.options.autosizeProgress)b=parseInt(c.css("width"));if(b===0||!b){d.each(function(){var g=f(this);if(g.css("position")!="absolute"&&g.is(":visible"))a+=f(this).outerWidth(true)});
+b=this.controls.width()-a-(c.outerWidth(true)-c.width())}c.width(b);e.width(b-(e.outerWidth(true)-e.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,b,c,e){var d=f('<div class="mejs-poster mejs-layer"></div>').appendTo(c);b=a.$media.attr("poster");if(a.options.poster!=="")b=a.options.poster;b!==""&&b!=null?this.setPoster(b):d.hide();e.addEventListener("play",function(){d.hide()},false);a.options.showPosterWhenEnded&&a.options.autoRewind&&
+e.addEventListener("ended",function(){d.show()},false)},setPoster:function(a){var b=this.container.find(".mejs-poster"),c=b.find("img");if(c.length==0)c=f('<img width="100%" height="100%" />').appendTo(b);c.attr("src",a);b.css({"background-image":"url("+a+")"})},buildoverlays:function(a,b,c,e){var d=this;if(a.isVideo){var g=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(c),k=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(c),
+j=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(c).bind("click touchstart",function(){d.options.clickToPlayPause&&e.paused&&d.play()});e.addEventListener("play",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);e.addEventListener("playing",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);e.addEventListener("seeking",function(){g.show();b.find(".mejs-time-buffering").show()},
+false);e.addEventListener("seeked",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||j.show()},false);e.addEventListener("waiting",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("loadeddata",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("canplay",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("error",function(){g.hide();
+b.find(".mejs-time-buffering").hide();k.show();k.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,e){this.globalBind("keydown",function(d){if(a.hasFocus&&a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g<k;g++)for(var j=a.options.keyActions[g],m=0,q=j.keys.length;m<q;m++)if(d.keyCode==j.keys[m]){d.preventDefault();j.action(a,e,d.keyCode);return false}return true});this.globalBind("click",function(d){if(f(d.target).closest(".mejs-container").length==
+0)a.hasFocus=false})},findTracks:function(){var a=this,b=a.$media.find("track");a.tracks=[];b.each(function(c,e){e=f(e);a.tracks.push({srclang:e.attr("srclang")?e.attr("srclang").toLowerCase():"",src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label")||"",entries:[],isLoaded:false})})},changeSkin:function(a){this.container[0].className="mejs-container "+a;this.setPlayerSize(this.width,this.height);this.setControlsSize()},play:function(){this.load();this.media.play()},pause:function(){try{this.media.pause()}catch(a){}},
+load:function(){this.isLoaded||this.media.load();this.isLoaded=true},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b;for(a in this.options.features){b=this.options.features[a];if(this["clean"+b])try{this["clean"+b](this)}catch(c){}}if(this.isDynamic)this.$node.insertBefore(this.container);
+else{this.$media.prop("controls",true);this.$node.clone().show().insertBefore(this.container);this.$node.remove()}this.media.pluginType!=="native"&&this.media.remove();delete mejs.players[this.id];this.container.remove();this.globalUnbind();delete this.node.player}};(function(){function a(c,e){var d={d:[],w:[]};f.each((c||"").split(" "),function(g,k){var j=k+"."+e;if(j.indexOf(".")===0){d.d.push(j);d.w.push(j)}else d[b.test(k)?"w":"d"].push(j)});d.d=d.d.join(" ");d.w=d.w.join(" ");return d}var b=
+/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,e,d){c=a(c,this.id);c.d&&f(document).bind(c.d,e,d);c.w&&f(window).bind(c.w,e,d)};mejs.MediaElementPlayer.prototype.globalUnbind=function(c,e){c=a(c,this.id);c.d&&f(document).unbind(c.d,e);c.w&&f(window).unbind(c.w,e)}})();if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){a===false?this.each(function(){var b=jQuery(this).data("mediaelementplayer");
+b&&b.remove();jQuery(this).removeData("mediaelementplayer")}):this.each(function(){jQuery(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,a))});return this};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
+(function(f){f.extend(mejs.MepDefaults,{playpauseText:mejs.i18n.t("Play/Pause")});f.extend(MediaElementPlayer.prototype,{buildplaypause:function(a,b,c,e){var d=f('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+this.id+'" title="'+this.options.playpauseText+'" aria-label="'+this.options.playpauseText+'"></button></div>').appendTo(b).click(function(g){g.preventDefault();e.paused?e.play():e.pause();return false});e.addEventListener("play",function(){d.removeClass("mejs-play").addClass("mejs-pause")},
+false);e.addEventListener("playing",function(){d.removeClass("mejs-play").addClass("mejs-pause")},false);e.addEventListener("pause",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false);e.addEventListener("paused",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);
+(function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,e){f('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+this.id+'" title="'+this.options.stopText+'" aria-label="'+this.options.stopText+'"></button></div>').appendTo(b).click(function(){e.paused||e.pause();if(e.currentTime>0){e.setCurrentTime(0);e.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left",
"0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$);
-(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,d){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(b);b.find(".mejs-time-buffering").hide();var e=
-this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),l=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.pageX;var m=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(d.duration){if(h<m.left)h=m.left;else if(h>r+m.left)h=r+m.left;o=h-m.left;n=o/r;n=n<=0.02?0:n*d.duration;t&&n!==d.currentTime&&d.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){l.css("left",o);q.html(mejs.Utility.secondsToTimeCode(n));
-l.show()}}},t=false;g.bind("mousedown",function(h){if(h.which===1){t=true;p(h);e.globalBind("mousemove.dur",function(m){p(m)});e.globalBind("mouseup.dur",function(){t=false;l.hide();e.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){e.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||l.show()}).bind("mouseleave",function(){if(!t){e.globalUnbind(".dur");l.hide()}});d.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);
-d.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);e.loaded=c;e.total=g;e.current=k;e.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1,
+(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,e){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(b);b.find(".mejs-time-buffering").hide();var d=
+this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),m=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.pageX;var l=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(e.duration){if(h<l.left)h=l.left;else if(h>r+l.left)h=r+l.left;o=h-l.left;n=o/r;n=n<=0.02?0:n*e.duration;t&&n!==e.currentTime&&e.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){m.css("left",o);q.html(mejs.Utility.secondsToTimeCode(n));
+m.show()}}},t=false;g.bind("mousedown",function(h){if(h.which===1){t=true;p(h);d.globalBind("mousemove.dur",function(l){p(l)});d.globalBind("mouseup.dur",function(){t=false;m.hide();d.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){d.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||m.show()}).bind("mouseleave",function(){if(!t){d.globalUnbind(".dur");m.hide()}});e.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);
+e.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);d.loaded=c;d.total=g;d.current=k;d.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1,
Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()*c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=Math.round(this.total.width()*this.media.currentTime/this.media.duration),b=a-Math.round(this.handle.outerWidth(true)/2);this.current.width(a);this.handle.css("left",b)}}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" <span> | </span> "});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,d){f('<div class="mejs-time"><span class="mejs-currenttime">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");d.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a,
-b,c,d){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+'<span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span>").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");
-f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span></div>").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");d.addEventListener("timeupdate",function(){a.updateDuration()},
+(function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,e){f('<div class="mejs-time"><span class="mejs-currenttime">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");e.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a,b,
+c,e){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+'<span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span>").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");
+f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span></div>").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");e.addEventListener("timeupdate",function(){a.updateDuration()},
false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600);if(this.durationD&&(this.options.duration>0||this.media.duration))this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration:
this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{muteText:"Mute Toggle",hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,d){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var e=this,g=e.isVideo?e.options.videoVolume:e.options.audioVolume,k=g=="horizontal"?f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+e.id+'" title="'+e.options.muteText+
-'" aria-label="'+e.options.muteText+'"></button></div><div class="mejs-horizontal-volume-slider"><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></div>').appendTo(b):f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+e.id+'" title="'+e.options.muteText+'" aria-label="'+e.options.muteText+'"></button><div class="mejs-volume-slider"><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></div></div>').appendTo(b),
-j=e.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),l=e.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=e.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=e.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass("mejs-unmute").addClass("mejs-mute");
-if(g=="vertical"){var s=l.height(),u=l.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=l.width();u=l.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=l.offset();if(g=="vertical"){o=l.height();parseInt(l.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=l.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o);o==0?d.setMuted(true):
-d.setMuted(false);d.setVolume(o)},m=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!m&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);e.globalBind("mousemove.vol",function(o){h(o)});e.globalBind("mouseup.vol",function(){m=false;e.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});m=true;return false});k.find("button").click(function(){d.setMuted(!d.muted)});d.addEventListener("volumechange",function(){if(!m)if(d.muted){t(0);
-k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(d.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(e.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&d.setMuted(true);d.pluginType==="native"&&d.setVolume(a.options.startVolume)}}}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,docStyleOverflow:null,isInIframe:false,buildfullscreen:function(a,b,c,d){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen=
-false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var e=this,g=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+e.id+'" title="'+e.options.fullscreenText+'" aria-label="'+e.options.fullscreenText+'"></button></div>').appendTo(b);if(e.media.pluginType==="native"||!e.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&
-mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),m=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";m.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";m.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,l=function(){if(j){for(var h in q)q[h].hide();g.css("pointer-events",
-"");e.controls.css("pointer-events","");j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-e.container.offset().left,m=g.offset().top-e.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=e.container.width(),s=e.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(m);q.left.width(h).height(n).css({top:m});q.right.width(o-h-r).height(n).css({top:m,left:h+r});q.bottom.width(o).height(s-n-m).css({top:m+
-n})};e.globalBind("resize",function(){t()});p=0;for(c=b.length;p<c;p+=1)q[b[p]]=f('<div class="mejs-fullscreen-hover" />').appendTo(e.container).mouseover(l).hide();g.mouseover(function(){if(!e.isFullScreen){var h=g.offset(),m=a.container.offset();d.positionFullscreenButton(h.left-m.left,h.top-m.top,false);g.css("pointer-events","none");e.controls.css("pointer-events","none");for(p in q)q[p].show();t();j=true}});d.addEventListener("fullscreenchange",function(){l()})}else g.mouseover(function(){if(k!==
-null){clearTimeout(k);delete k}var h=g.offset(),m=a.container.offset();d.positionFullscreenButton(h.left-m.left,h.top-m.top,true)}).mouseout(function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){d.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;e.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||e.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()},containerSizeTimeout:null,
-enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){docStyleOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen)f(window).width()!==
+(function(f){f.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,e){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var d=this,g=d.isVideo?d.options.videoVolume:d.options.audioVolume,k=g=="horizontal"?f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+
+'" aria-label="'+d.options.muteText+'"></button></div><div class="mejs-horizontal-volume-slider"><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></div>').appendTo(b):f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+'" aria-label="'+d.options.muteText+'"></button><div class="mejs-volume-slider"><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></div></div>').appendTo(b),
+j=d.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),m=d.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=d.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=d.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass("mejs-unmute").addClass("mejs-mute");
+if(g=="vertical"){var s=m.height(),u=m.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=m.width();u=m.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=m.offset();if(g=="vertical"){o=m.height();parseInt(m.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=m.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o);o==0?e.setMuted(true):
+e.setMuted(false);e.setVolume(o)},l=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!l&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);d.globalBind("mousemove.vol",function(o){h(o)});d.globalBind("mouseup.vol",function(){l=false;d.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});l=true;return false});k.find("button").click(function(){e.setMuted(!e.muted)});e.addEventListener("volumechange",function(){if(!l)if(e.muted){t(0);
+k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(e.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(d.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&e.setMuted(true);e.pluginType==="native"&&e.setVolume(a.options.startVolume)}}}})})(mejs.$);
+(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,isInIframe:false,buildfullscreen:function(a,b,c,e){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(a.isFullScreen)if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen=
+false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var d=this,g=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+d.id+'" title="'+d.options.fullscreenText+'" aria-label="'+d.options.fullscreenText+'"></button></div>').appendTo(b);if(d.media.pluginType==="native"||!d.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&
+mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),l=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";l.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";l.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,m=function(){if(j){for(var h in q)q[h].hide();g.css("pointer-events",
+"");d.controls.css("pointer-events","");d.media.removeEventListener("click",d.clickToPlayPauseCallback);j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-d.container.offset().left,l=g.offset().top-d.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=d.container.width(),s=d.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(l);q.left.width(h).height(n).css({top:l});q.right.width(o-h-r).height(n).css({top:l,
+left:h+r});q.bottom.width(o).height(s-n-l).css({top:l+n})};d.globalBind("resize",function(){t()});p=0;for(c=b.length;p<c;p++)q[b[p]]=f('<div class="mejs-fullscreen-hover" />').appendTo(d.container).mouseover(m).hide();g.on("mouseover",function(){if(!d.isFullScreen){var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,false);g.css("pointer-events","none");d.controls.css("pointer-events","none");d.media.addEventListener("click",d.clickToPlayPauseCallback);for(p in q)q[p].show();
+t();j=true}});e.addEventListener("fullscreenchange",function(){d.isFullScreen=!d.isFullScreen;d.isFullScreen?d.media.removeEventListener("click",d.clickToPlayPauseCallback):d.media.addEventListener("click",d.clickToPlayPauseCallback);m()});d.globalBind("mousemove",function(h){if(j){var l=g.offset();if(h.pageY<l.top||h.pageY>l.top+g.outerHeight(true)||h.pageX<l.left||h.pageX>l.left+g.outerWidth(true)){g.css("pointer-events","");d.controls.css("pointer-events","");j=false}}})}else g.on("mouseover",
+function(){if(k!==null){clearTimeout(k);delete k}var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,true)}).on("mouseout",function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){e.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;d.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||d.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()},
+containerSizeTimeout:null,enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){f(document.documentElement).addClass("mejs-fullscreen");normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen)f(window).width()!==
screen.width?a.exitFullScreen():setTimeout(c,500)},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}},250);else{a.pause();window.open(b,a.id,
-"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%");a.media.setVideoSize(f(window).width(),f(window).height())}a.layers.children("div").width("100%").height("100%");
-a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();document.documentElement.style.overflow=docStyleOverflow;
-this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find("object embed").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");this.setControlsSize();this.isFullScreen=false}}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:"Captions/Subtitles",hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,d){if(a.tracks.length!=0){a.chapters=f('<div class="mejs-chapters mejs-layer"></div>').prependTo(c).hide();a.captions=f('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover"><span class="mejs-captions-text"></span></div></div>').prependTo(c).hide();
-a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+this.options.tracksText+'" aria-label="'+this.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+a.id+'_captions" id="'+a.id+'_captions_none" value="none" checked="checked" /><label for="'+a.id+'_captions_none">None</label></li></ul></div></div>').appendTo(b);for(b=c=0;b<
-a.tracks.length;b++)a.tracks[b].kind=="subtitles"&&c++;this.options.toggleCaptionsButtonWhenOnlyOne&&c==1?a.captionsButton.on("click",function(){a.setTrack(a.selectedTrack==null?a.tracks[0].srclang:"none")}):a.captionsButton.hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},function(){f(this).find(".mejs-captions-selector").css("visibility","hidden")}).on("click","input[type=radio]",function(){lang=this.value;a.setTrack(lang)});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):
-a.container.bind("controlsshown",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){d.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(b=0;b<a.tracks.length;b++)a.tracks[b].kind=="subtitles"&&a.addTrackButton(a.tracks[b].srclang,a.tracks[b].label);a.loadNextTrack();d.addEventListener("timeupdate",function(){a.displayCaptions()},
-false);if(a.options.slidesSelector!=""){a.slidesContainer=f(a.options.slidesSelector);d.addEventListener("timeupdate",function(){a.displaySlides()},false)}d.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility","visible");a.chapters.fadeIn(200).height(a.chapters.find(".mejs-chapter").outerHeight())}},function(){a.hasChapters&&!d.paused&&a.chapters.fadeOut(200,function(){f(this).css("visibility","hidden");
-f(this).css("display","block")})});a.node.getAttribute("autoplay")!==null&&a.chapters.css("visibility","hidden")}},setTrack:function(a){var b;if(a=="none"){this.selectedTrack=null;this.captionsButton.removeClass("mejs-captions-enabled")}else for(b=0;b<this.tracks.length;b++)if(this.tracks[b].srclang==a){this.selectedTrack==null&&this.captionsButton.addClass("mejs-captions-enabled");this.selectedTrack=this.tracks[b];this.captions.attr("lang",this.selectedTrack.srclang);this.displayCaptions();break}},
-loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else{this.isLoadingTrack=false;this.checkForTracks()}},loadTrack:function(a){var b=this,c=b.tracks[a];f.ajax({url:c.src,dataType:"text",success:function(d){c.entries=typeof d=="string"&&/<tt\s+xml/ig.exec(d)?mejs.TrackFormatParser.dfxp.parse(d):mejs.TrackFormatParser.webvvt.parse(d);c.isLoaded=true;b.enableTrackButton(c.srclang,c.label);b.loadNextTrack();c.kind==
-"chapters"&&b.media.addEventListener("play",function(){b.media.duration>0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b);this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||
-a;this.captionsButton.find("ul").append(f('<li><input type="radio" name="'+this.id+'_captions" id="'+this.id+"_captions_"+a+'" value="'+a+'" disabled="disabled" /><label for="'+this.id+"_captions_"+a+'">'+b+" (loading)</label></li>"));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+
-this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i<this.tracks.length;i++)if(this.tracks[i].kind=="subtitles"){a=true;break}if(!a){this.captionsButton.hide();this.setControlsSize()}}},displayCaptions:function(){if(typeof this.tracks!="undefined"){var a,b=this.selectedTrack;if(b!=null&&b.isLoaded)for(a=0;a<b.entries.times.length;a++)if(this.media.currentTime>=b.entries.times[a].start&&
-this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer=="undefined")){var b=this,c=b.slides.entries.text[a],d=b.slides.entries.imgs[a];if(typeof d=="undefined"||typeof d.fadeIn=="undefined")b.slides.entries.imgs[a]=
-d=f('<img src="'+c+'">').on("load",function(){d.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else if(!d.is(":visible")&&!d.is(":animated")){console.log("showing existing slide");d.fadeIn().siblings(":visible").fadeOut()}}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b<a.entries.times.length;b++)if(this.media.currentTime>=a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}},
-displayChapters:function(){var a;for(a=0;a<this.tracks.length;a++)if(this.tracks[a].kind=="chapters"&&this.tracks[a].isLoaded){this.drawChapters(this.tracks[a]);this.hasChapters=true;break}},drawChapters:function(a){var b=this,c,d,e=d=0;b.chapters.empty();for(c=0;c<a.entries.times.length;c++){d=a.entries.times[c].stop-a.entries.times[c].start;d=Math.floor(d/b.media.duration*100);if(d+e>100||c==a.entries.times.length-1&&d+e<100)d=100-e;b.chapters.append(f('<div class="mejs-chapter" rel="'+a.entries.times[c].start+
-'" style="left: '+e.toString()+"%;width: "+d.toString()+'%;"><div class="mejs-chapter-block'+(c==a.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+a.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"&ndash;"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"</span></div></div>"));e+=d}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel")));b.media.paused&&
-b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",
-lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
-parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},d,e;b<a.length;b++)if(this.pattern_identifier.exec(a[b])){b++;if((d=this.pattern_timecode.exec(a[b]))&&b<a.length){b++;e=a[b];for(b++;a[b]!==""&&b<a.length;){e=e+"\n"+a[b];b++}e=f.trim(e).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");c.text.push(e);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(d[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(d[1]),
-stop:mejs.Utility.convertSMPTEtoSeconds(d[3]),settings:d[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var d,e;a={text:[],times:[]};if(b.length){e=b.removeAttr("id").get(0).attributes;if(e.length){d={};for(b=0;b<e.length;b++)d[e[b].name.split(":")[1]]=e[b].value}}for(b=0;b<c.length;b++){var g;e={start:null,stop:null,style:null};if(c.eq(b).attr("begin"))e.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("begin"));
-if(!e.start&&c.eq(b-1).attr("end"))e.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b-1).attr("end"));if(c.eq(b).attr("end"))e.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("end"));if(!e.stop&&c.eq(b+1).attr("begin"))e.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b+1).attr("begin"));if(d){g="";for(var k in d)g+=k+":"+d[k]+";"}if(g)e.style=g;if(e.start==0)e.start=0.2;a.times.push(e);e=f.trim(c.eq(b).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,
-"<a href='$1' target='_blank'>$1</a>");a.text.push(e);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],d="",e;for(e=0;e<a.length;e++){d+=a.substring(e,e+1);if(b.test(d)){c.push(d.replace(b,""));d=""}}c.push(d);return c}})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?"Turn off Fullscreen":"Go Fullscreen"},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?"Unmute":"Mute"},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return"Download Video"},click:function(a){window.location.href=a.media.currentSrc}}]});
-f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},isContextMenuEnabled:true,
-enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,b){for(var c=
-this,d="",e=c.options.contextMenuItems,g=0,k=e.length;g<k;g++)if(e[g].isSeparator)d+='<div class="mejs-contextmenu-separator"></div>';else{var j=e[g].render(c);if(j!=null)d+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+Math.random()*1E6+'">'+j+"</div>"}c.contextMenu.empty().append(f(d)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var l=f(this),q=parseInt(l.data("itemindex"),10),p=c.options.contextMenuItems[q];typeof p.show!="undefined"&&
-p.show(l,c);l.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
-(function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var d=this.container.find('link[rel="postroll"]').attr("href");if(typeof d!=="undefined"){a.postroll=f('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+this.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(c).hide();this.media.addEventListener("ended",
-function(){f.ajax({dataType:"html",url:d,success:function(e){c.find(".mejs-postroll-layer-content").html(e)}});a.postroll.show()},false)}}})})(mejs.$);
+"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.media.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%");a.media.setVideoSize(f(window).width(),
+f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();
+f(document.documentElement).removeClass("mejs-fullscreen");this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.media.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find(".mejs-shim").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");
+this.setControlsSize();this.isFullScreen=false}}})})(mejs.$);
+(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,e){if(a.tracks.length!=0){var d;if(this.domNode.textTracks)for(d=this.domNode.textTracks.length-1;d>=0;d--)this.domNode.textTracks[d].mode="hidden";a.chapters=f('<div class="mejs-chapters mejs-layer"></div>').prependTo(c).hide();a.captions=
+f('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover"><span class="mejs-captions-text"></span></div></div>').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+this.options.tracksText+'" aria-label="'+this.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+
+a.id+'_captions" id="'+a.id+'_captions_none" value="none" checked="checked" /><label for="'+a.id+'_captions_none">'+mejs.i18n.t("None")+"</label></li></ul></div></div>").appendTo(b);for(d=b=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&b++;this.options.toggleCaptionsButtonWhenOnlyOne&&b==1?a.captionsButton.on("click",function(){a.setTrack(a.selectedTrack==null?a.tracks[0].srclang:"none")}):a.captionsButton.hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},
+function(){f(this).find(".mejs-captions-selector").css("visibility","hidden")}).on("click","input[type=radio]",function(){lang=this.value;a.setTrack(lang)});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("controlsshown",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});
+a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(d=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&a.addTrackButton(a.tracks[d].srclang,a.tracks[d].label);a.loadNextTrack();e.addEventListener("timeupdate",function(){a.displayCaptions()},false);if(a.options.slidesSelector!=""){a.slidesContainer=f(a.options.slidesSelector);e.addEventListener("timeupdate",function(){a.displaySlides()},false)}e.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility",
+"visible");a.chapters.fadeIn(200).height(a.chapters.find(".mejs-chapter").outerHeight())}},function(){a.hasChapters&&!e.paused&&a.chapters.fadeOut(200,function(){f(this).css("visibility","hidden");f(this).css("display","block")})});a.node.getAttribute("autoplay")!==null&&a.chapters.css("visibility","hidden")}},setTrack:function(a){var b;if(a=="none"){this.selectedTrack=null;this.captionsButton.removeClass("mejs-captions-enabled")}else for(b=0;b<this.tracks.length;b++)if(this.tracks[b].srclang==a){this.selectedTrack==
+null&&this.captionsButton.addClass("mejs-captions-enabled");this.selectedTrack=this.tracks[b];this.captions.attr("lang",this.selectedTrack.srclang);this.displayCaptions();break}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else{this.isLoadingTrack=false;this.checkForTracks()}},loadTrack:function(a){var b=this,c=b.tracks[a];f.ajax({url:c.src,dataType:"text",success:function(e){c.entries=typeof e=="string"&&
+/<tt\s+xml/ig.exec(e)?mejs.TrackFormatParser.dfxp.parse(e):mejs.TrackFormatParser.webvvt.parse(e);c.isLoaded=true;b.enableTrackButton(c.srclang,c.label);b.loadNextTrack();c.kind=="chapters"&&b.media.addEventListener("play",function(){b.media.duration>0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b);
+this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('<li><input type="radio" name="'+this.id+'_captions" id="'+this.id+"_captions_"+a+'" value="'+a+'" disabled="disabled" /><label for="'+this.id+"_captions_"+a+'">'+b+" (loading)</label></li>"));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},
+adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i<this.tracks.length;i++)if(this.tracks[i].kind=="subtitles"){a=true;break}if(!a){this.captionsButton.hide();this.setControlsSize()}}},displayCaptions:function(){if(typeof this.tracks!=
+"undefined"){var a,b=this.selectedTrack;if(b!=null&&b.isLoaded)for(a=0;a<b.entries.times.length;a++)if(this.media.currentTime>=b.entries.times[a].start&&this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer==
+"undefined")){var b=this,c=b.slides.entries.text[a],e=b.slides.entries.imgs[a];if(typeof e=="undefined"||typeof e.fadeIn=="undefined")b.slides.entries.imgs[a]=e=f('<img src="'+c+'">').on("load",function(){e.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else!e.is(":visible")&&!e.is(":animated")&&e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b<a.entries.times.length;b++)if(this.media.currentTime>=
+a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}},displayChapters:function(){var a;for(a=0;a<this.tracks.length;a++)if(this.tracks[a].kind=="chapters"&&this.tracks[a].isLoaded){this.drawChapters(this.tracks[a]);this.hasChapters=true;break}},drawChapters:function(a){var b=this,c,e,d=e=0;b.chapters.empty();for(c=0;c<a.entries.times.length;c++){e=a.entries.times[c].stop-a.entries.times[c].start;e=Math.floor(e/b.media.duration*100);if(e+d>100||c==a.entries.times.length-
+1&&e+d<100)e=100-d;b.chapters.append(f('<div class="mejs-chapter" rel="'+a.entries.times[c].start+'" style="left: '+d.toString()+"%;width: "+e.toString()+'%;"><div class="mejs-chapter-block'+(c==a.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+a.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"&ndash;"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"</span></div></div>"));d+=e}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel")));
+b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",
+ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
+parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d;b<a.length;b++)if(this.pattern_identifier.exec(a[b])){b++;if((e=this.pattern_timecode.exec(a[b]))&&b<a.length){b++;d=a[b];for(b++;a[b]!==""&&b<a.length;){d=d+"\n"+a[b];b++}d=f.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");c.text.push(d);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(e[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]),
+stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b<d.length;b++)e[d[b].name.split(":")[1]]=d[b].value}}for(b=0;b<c.length;b++){var g;d={start:null,stop:null,style:null};if(c.eq(b).attr("begin"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("begin"));
+if(!d.start&&c.eq(b-1).attr("end"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b-1).attr("end"));if(c.eq(b).attr("end"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("end"));if(!d.stop&&c.eq(b+1).attr("begin"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b+1).attr("begin"));if(e){g="";for(var k in e)g+=k+":"+e[k]+";"}if(g)d.style=g;if(d.start==0)d.start=0.2;a.times.push(d);d=f.trim(c.eq(b).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,
+"<a href='$1' target='_blank'>$1</a>");a.text.push(d);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d<a.length;d++){e+=a.substring(d,d+1);if(b.test(e)){c.push(e.replace(b,""));e=""}}c.push(e);return c}})(mejs.$);
+(function(f){f.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?mejs.i18n.t("Turn off Fullscreen"):mejs.i18n.t("Go Fullscreen")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?mejs.i18n.t("Unmute"):mejs.i18n.t("Mute")},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return mejs.i18n.t("Download Video")},
+click:function(a){window.location.href=a.media.currentSrc}}]});f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},
+isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,
+b){for(var c=this,e="",d=c.options.contextMenuItems,g=0,k=d.length;g<k;g++)if(d[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var j=d[g].render(c);if(j!=null)e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+Math.random()*1E6+'">'+j+"</div>"}c.contextMenu.empty().append(f(e)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var m=f(this),q=parseInt(m.data("itemindex"),10),p=c.options.contextMenuItems[q];typeof p.show!=
+"undefined"&&p.show(m,c);m.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
+(function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var e=this.container.find('link[rel="postroll"]').attr("href");if(typeof e!=="undefined"){a.postroll=f('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+this.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(c).hide();this.media.addEventListener("ended",
+function(){f.ajax({dataType:"html",url:e,success:function(d){c.find(".mejs-postroll-layer-content").html(d)}});a.postroll.show()},false)}}})})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/Builder.py b/files_videoviewer/mediaelement/src/Builder.py
deleted file mode 100755
index d65f0df27..000000000
--- a/files_videoviewer/mediaelement/src/Builder.py
+++ /dev/null
@@ -1,137 +0,0 @@
-import sys
-import os
-import shutil
-
-me_filename = 'mediaelement'
-mep_filename = 'mediaelementplayer'
-combined_filename = 'mediaelement-and-player'
-
-# BUILD MediaElement (single file)
-
-print('building MediaElement.js')
-me_files = []
-me_files.append('me-header.js')
-me_files.append('me-namespace.js')
-me_files.append('me-utility.js')
-me_files.append('me-plugindetector.js')
-me_files.append('me-featuredetection.js')
-me_files.append('me-mediaelements.js')
-me_files.append('me-shim.js')
-me_files.append('me-i18n.js')
-me_files.append('me-i18n-locale-de.js')
-me_files.append('me-i18n-locale-zh.js')
-
-code = ''
-
-for item in me_files:
- src_file = open('js/' + item,'r')
- code += src_file.read() + "\n"
-
-tmp_file = open('../build/' + me_filename + '.js','w')
-tmp_file.write(code)
-tmp_file.close()
-
-# BUILD MediaElementPlayer (single file)
-print('building MediaElementPlayer.js')
-mep_files = []
-mep_files.append('mep-header.js')
-mep_files.append('mep-library.js')
-mep_files.append('mep-player.js')
-mep_files.append('mep-feature-playpause.js')
-mep_files.append('mep-feature-stop.js')
-mep_files.append('mep-feature-progress.js')
-mep_files.append('mep-feature-time.js')
-mep_files.append('mep-feature-volume.js')
-mep_files.append('mep-feature-fullscreen.js')
-mep_files.append('mep-feature-tracks.js')
-mep_files.append('mep-feature-contextmenu.js')
-mep_files.append('mep-feature-postroll.js')
-# mep_files.append('mep-feature-sourcechooser.js')
-
-code = ''
-
-for item in mep_files:
- src_file = open('js/' + item,'r')
- code += src_file.read() + "\n"
-
-tmp_file = open('../build/' + mep_filename + '.js','w')
-tmp_file.write(code)
-tmp_file.close()
-
-# MINIFY both scripts
-
-print('Minifying JavaScript')
-# os.system("java -jar yuicompressor-2.4.2.jar ../build/" + me_filename + ".js -o ../build/" + me_filename + ".min.js --charset utf-8 -v")
-# os.system("java -jar yuicompressor-2.4.2.jar ../build/" + mep_filename + ".js -o ../build/" + mep_filename + ".min.js --charset utf-8 -v")
-os.system("java -jar compiler.jar --js ../build/" + me_filename + ".js --js_output_file ../build/" + me_filename + ".min.js")
-os.system("java -jar compiler.jar --js ../build/" + mep_filename + ".js --js_output_file ../build/" + mep_filename + ".min.js")
-
-# PREPEND intros
-def addHeader(headerFilename, filename):
-
- # get the header text
- tmp_file = open(headerFilename)
- header_txt = tmp_file.read();
- tmp_file.close()
-
- # read the current contents of the file
- tmp_file = open(filename)
- file_txt = tmp_file.read()
- tmp_file.close()
-
- # open the file again for writing
- tmp_file = open(filename, 'w')
- tmp_file.write(header_txt)
- # write the original contents
- tmp_file.write(file_txt)
- tmp_file.close()
-
-addHeader('js/me-header.js', '../build/' + me_filename + '.min.js')
-addHeader('js/mep-header.js', '../build/' + mep_filename + '.min.js')
-
-
-# COMBINE into single script
-print('Combining scripts')
-code = ''
-src_file = open('../build/' + me_filename + '.js','r')
-code += src_file.read() + "\n"
-src_file = open('../build/' + mep_filename + '.js','r')
-code += src_file.read() + "\n"
-
-tmp_file = open('../build/' + combined_filename + '.js','w')
-tmp_file.write(code)
-tmp_file.close()
-
-code = ''
-src_file = open('../build/' + me_filename + '.min.js','r')
-code += src_file.read() + "\n"
-src_file = open('../build/' + mep_filename + '.min.js','r')
-code += src_file.read() + "\n"
-
-tmp_file = open('../build/' + combined_filename + '.min.js','w')
-tmp_file.write(code)
-tmp_file.close()
-
-
-# MINIFY CSS
-print('Minifying CSS')
-src_file = open('css/mediaelementplayer.css','r')
-tmp_file = open('../build/mediaelementplayer.css','w')
-tmp_file.write(src_file.read())
-tmp_file.close()
-os.system("java -jar yuicompressor-2.4.2.jar ../build/mediaelementplayer.css -o ../build/mediaelementplayer.min.css --charset utf-8 -v")
-
-#COPY skin files
-print('Copying Skin Files')
-shutil.copy2('css/controls.png','../build/controls.png')
-shutil.copy2('css/controls.svg','../build/controls.svg')
-shutil.copy2('css/bigplay.png','../build/bigplay.png')
-shutil.copy2('css/bigplay.svg','../build/bigplay.svg')
-shutil.copy2('css/loading.gif','../build/loading.gif')
-
-shutil.copy2('css/mejs-skins.css','../build/mejs-skins.css')
-shutil.copy2('css/controls-ted.png','../build/controls-ted.png')
-shutil.copy2('css/controls-wmp.png','../build/controls-wmp.png')
-shutil.copy2('css/controls-wmp-bg.png','../build/controls-wmp-bg.png')
-
-print('DONE!')
diff --git a/files_videoviewer/mediaelement/src/compiler.jar b/files_videoviewer/mediaelement/src/compiler.jar
deleted file mode 100755
index 4dfa5ad0b..000000000
--- a/files_videoviewer/mediaelement/src/compiler.jar
+++ /dev/null
Binary files differ
diff --git a/files_videoviewer/mediaelement/src/css/background.png b/files_videoviewer/mediaelement/src/css/background.png
deleted file mode 100644
index 7a4da4ec0..000000000
--- a/files_videoviewer/mediaelement/src/css/background.png
+++ /dev/null
Binary files differ
diff --git a/files_videoviewer/mediaelement/src/css/bigplay.fw.png b/files_videoviewer/mediaelement/src/css/bigplay.fw.png
deleted file mode 100644
index bae9adafb..000000000
--- a/files_videoviewer/mediaelement/src/css/bigplay.fw.png
+++ /dev/null
Binary files differ
diff --git a/files_videoviewer/mediaelement/src/css/bigplay.png b/files_videoviewer/mediaelement/src/css/bigplay.png
deleted file mode 100644
index be190caf6..000000000
--- a/files_videoviewer/mediaelement/src/css/bigplay.png
+++ /dev/null
Binary files differ
diff --git a/files_videoviewer/mediaelement/src/css/bigplay.svg b/files_videoviewer/mediaelement/src/css/bigplay.svg
deleted file mode 100644
index 7e07babdd..000000000
--- a/files_videoviewer/mediaelement/src/css/bigplay.svg
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
-<svg style="background-color:#ffffff00" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" height="200px" width="100px" version="1.1" y="0px" x="0px" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 200">
- <defs>
- <radialGradient id="b">
- <stop stop-color="#222" stop-opacity="0" offset=".7"/>
- <stop stop-color="#222" stop-opacity=".0118" offset=".70202"/>
- <stop stop-color="#333" offset=".85"/>
- <stop stop-color="#333" stop-opacity="0" offset="1"/>
- </radialGradient>
- <radialGradient id="a">
- <stop stop-color="#bbb" stop-opacity="0" offset=".7"/>
- <stop stop-color="#bbb" stop-opacity=".0118" offset=".70202"/>
- <stop stop-color="#bbb" offset=".85"/>
- <stop stop-color="#bbb" stop-opacity="0" offset="1"/>
- </radialGradient>
- <filter id="d" y="-100%" x="-100%" height="300%" width="300%">
- <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.251 0" type="matrix" result="out" in="SourceGraphic"/>
- <feMorphology operator="dilate" radius="3" result="out" in="out"/>
- <feGaussianBlur stdDeviation="1.5" result="out" in="out"/>
- <feBlend result="Glow1" mode="normal" in2="out" in="SourceGraphic"/>
- </filter>
- <filter id="c" y="-100%" x="-100%" height="300%" width="300%">
- <feColorMatrix values="0 0 0 0.8667 0 0 0 0 0.8667 0 0 0 0 0.8667 0 0 0 0 0.251 0" type="matrix" result="out" in="SourceGraphic"/>
- <feMorphology operator="dilate" radius="3" result="out" in="out"/>
- <feGaussianBlur stdDeviation="1.5" result="out" in="out"/>
- <feBlend result="Glow2" mode="normal" in2="out" in="SourceGraphic"/>
- </filter>
- </defs>
- <path d="m22 50c0-15.464 12.536-28 28-28s28 12.536 28 28-12.536 28-28 28-28-12.536-28-28zm-17 0c0 24.853 20.147 45 45 45s45-20.147 45-45-20.147-45-45-45-45 20.147-45 45z" fill="url(#b)"/>
- <path d="m22 150c0-15.46 12.536-28 28-28s28 12.54 28 28-12.536 28-28 28-28-12.54-28-28zm-17 0c0 24.85 20.147 45 45 45s45-20.15 45-45-20.147-45-45-45-45 20.15-45 45z" fill="url(#a)"/>
- <path filter="url(#d)" fill="#fff" d="m72.5 49.5l-33.75 19.486v-38.972l33.75 19.486z"/>
- <path stroke="#fff" stroke-width="5" fill="none" d="m13 50.5c0-20.711 16.789-37.5 37.5-37.5s37.5 16.789 37.5 37.5-16.789 37.5-37.5 37.5-37.5-16.789-37.5-37.5z"/>
- <path filter="url(#c)" fill="#fff" d="m72.5 149.5l-33.75 19.49v-38.98l33.75 19.49z"/>
- <path stroke="#fff" stroke-width="5" fill="none" d="m13 150.5c0-20.71 16.789-37.5 37.5-37.5s37.5 16.79 37.5 37.5-16.789 37.5-37.5 37.5-37.5-16.79-37.5-37.5z"/>
-</svg>
diff --git a/files_videoviewer/mediaelement/src/css/controls-ted.png b/files_videoviewer/mediaelement/src/css/controls-ted.png
deleted file mode 100755
index 3aac05aa8..000000000
--- a/files_videoviewer/mediaelement/src/css/controls-ted.png
+++ /dev/null
Binary files differ
diff --git a/files_videoviewer/mediaelement/src/css/controls-wmp-bg.png b/files_videoviewer/mediaelement/src/css/controls-wmp-bg.png
deleted file mode 100755
index 89bb9b956..000000000
--- a/files_videoviewer/mediaelement/src/css/controls-wmp-bg.png
+++ /dev/null
Binary files differ
diff --git a/files_videoviewer/mediaelement/src/css/controls-wmp.png b/files_videoviewer/mediaelement/src/css/controls-wmp.png
deleted file mode 100755
index 4775ef5b0..000000000
--- a/files_videoviewer/mediaelement/src/css/controls-wmp.png
+++ /dev/null
Binary files differ
diff --git a/files_videoviewer/mediaelement/src/css/controls.fw.png b/files_videoviewer/mediaelement/src/css/controls.fw.png
deleted file mode 100644
index f1729a0d8..000000000
--- a/files_videoviewer/mediaelement/src/css/controls.fw.png
+++ /dev/null
Binary files differ
diff --git a/files_videoviewer/mediaelement/src/css/controls.png b/files_videoviewer/mediaelement/src/css/controls.png
deleted file mode 100644
index dfac76410..000000000
--- a/files_videoviewer/mediaelement/src/css/controls.png
+++ /dev/null
Binary files differ
diff --git a/files_videoviewer/mediaelement/src/css/controls.svg b/files_videoviewer/mediaelement/src/css/controls.svg
deleted file mode 100644
index 4b93d8f9e..000000000
--- a/files_videoviewer/mediaelement/src/css/controls.svg
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
-<svg style="background-color:#ffffff00" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" height="32px" width="144px" version="1.1" y="0px" x="0px" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 144 32">
- <defs>
- <radialGradient id="l">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#f2f2f2" stop-opacity=".2" offset="1"/>
- </radialGradient>
- <linearGradient id="f" y1="-7.8652%" x2="50%" x1="50%" y2="249.66%">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#c8c8c8" offset="1"/>
- </linearGradient>
- <linearGradient id="b" x2="50%" x1="50%" y2="238.75%">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#c8c8c8" offset="1"/>
- </linearGradient>
- <linearGradient id="a" x2="50%" x1="50%" y2="100%">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#c8c8c8" offset="1"/>
- </linearGradient>
- <linearGradient id="c" y1="-33.333%" x2="50%" x1="50%" y2="152.08%">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#c8c8c8" offset="1"/>
- </linearGradient>
- <linearGradient id="k" y1="-140%" x2="40%" x1="40%" y2="98.75%">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#c8c8c8" offset="1"/>
- </linearGradient>
- <linearGradient id="j" y1="-140%" x2="60%" x1="60%" y2="98.75%">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#c8c8c8" offset="1"/>
- </linearGradient>
- <linearGradient id="i" x2="50%" x1="50%" y2="298.44%">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#c8c8c8" offset="1"/>
- </linearGradient>
- <linearGradient id="h" y1="-200%" x2="50%" x1="50%" y2="100%">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#c8c8c8" offset="1"/>
- </linearGradient>
- <linearGradient id="g" y1="-200%" x2="50%" x1="50%" y2="110.94%">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#c8c8c8" offset="1"/>
- </linearGradient>
- <linearGradient id="e" x2="55%" x1="55%" y2="100%">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#c8c8c8" offset="1"/>
- </linearGradient>
- <linearGradient id="d" x2="50%" x1="50%" y2="100%">
- <stop stop-color="#fff" offset="0"/>
- <stop stop-color="#c8c8c8" offset=".99444"/>
- </linearGradient>
- </defs>
- <g stroke="#fff" fill="none">
- <path d="m98.5 7.5h11"/>
- <path d="m98.5 3.5h11"/>
- <path d="m98.5 11.5h11"/></g><g fill="#fff">
- <path d="m108 11.5c0-0.828 0.45-1.5 1-1.5s1 0.672 1 1.5-0.45 1.5-1 1.5-1-0.672-1-1.5z"/>
- <path d="m104 7.5c0-0.8284 0.45-1.5 1-1.5s1 0.6716 1 1.5-0.45 1.5-1 1.5-1-0.6716-1-1.5z"/>
- <path d="m108 3.5c0-0.8284 0.45-1.5 1-1.5s1 0.6716 1 1.5-0.45 1.5-1 1.5-1-0.6716-1-1.5z"/>
- </g>
- <rect height="6" width="10" stroke="#fff" y="21" x="83" fill="#333"/>
- <path fill="url(#l)" d="m81 8c0-2.7615 3.134-5 7-5s7 2.2385 7 5c0 2.762-3.134 5-7 5s-7-2.238-7-5z"/>
- <rect height="6" width="10" stroke="#fff" y="5" x="83" fill="#333"/>
- <path d="m73.795 4.205c1.421 0.6735 2.405 2.1184 2.405 3.795 0 2.32-1.88 4.2-4.2 4.2s-4.2-1.88-4.2-4.2c0-1.6766 0.984-3.1215 2.405-3.795l-1.33-1.33c-1.725 1.0539-2.875 2.9556-2.875 5.125 0 3.314 2.686 6 6 6s6-2.686 6-6c0-2.1694-1.15-4.0711-2.875-5.125l-1.33 1.33z" fill="url(#f)"/>
- <path d="m71 2h-5l5 5v-5z" fill="url(#b)"/>
- <g fill="#a8a8b7">
- <path d="m73.795 20.205c1.421 0.673 2.405 2.118 2.405 3.795 0 2.32-1.88 4.2-4.2 4.2s-4.2-1.88-4.2-4.2c0-1.677 0.984-3.122 2.405-3.795l-1.33-1.33c-1.725 1.054-2.875 2.956-2.875 5.125 0 3.314 2.686 6 6 6s6-2.686 6-6c0-2.169-1.15-4.071-2.875-5.125l-1.33 1.33z"/>
- <path d="m71 18h-5l5 5v-5z"/>
- </g>
- <rect visibility="hidden" height="12" width="14" stroke="#b0b0b0" y="2" x="49" fill="none"/>
- <text style="color:#ffffff;text-align:center" font-size="10px" visibility="hidden" width="14" y="17" x="49" font-family="Arial" fill="#ffffff"><tspan><![CDATA[cc]]></tspan></text>
- <path stroke="#fff" d="m55 7c-4.719-3.2187-4.937 5.94 0 3" fill="none"/>
- <path stroke="#fff" d="m60 7c-4.719-3.2187-4.937 5.94 0 3" fill="none"/>
- <path d="m50 3h12v10h-12v-10zm-1-1v12h14v-12h-14z" fill="url(#a)"/>
- <rect y="2" x="49" height="12" fill="none" width="14"/>
- <rect y="5" x="17" height="6" fill="url(#c)" width="5"/>
- <path d="m21 5l4-3v12l-4-2.938v-6.062z" fill="url(#a)"/>
- <rect y="21" x="17" height="6" fill="url(#c)" width="5"/>
- <path d="m21 21l4-3v12l-4-2.938v-6.062z" fill="url(#a)"/>
- <path stroke="#fff" d="m27 18s3.062-0.625 3 6-3 6-3 6" fill="none"/>
- <path stroke="#fff" d="m26 21.008s2.041-0.312 1.999 2.992c-0.041 3.304-1.999 2.992-1.999 2.992" fill="none"/>
- <path fill="url(#a)" d="m14 8.5l-11 5.5v-11l11 5.5z"/>
- <g fill="url(#a)">
- <rect y="18" x="3" height="12" width="3"/>
- <rect y="18" x="10" height="12" width="3"/>
- </g>
- <path d="m34 2h5l-5 5v-5z" fill="url(#b)"/>
- <path d="m34 14h5l-5-5v5z" fill="url(#k)"/>
- <path d="m46 2h-5l5 5v-5z" fill="url(#b)"/>
- <path d="m46 14h-5l5-5v5z" fill="url(#j)"/>
- <path d="m42 22h4l-4-4v4z" fill="url(#i)"/>
- <path d="m38 22v-4l-4 4h4z" fill="url(#b)"/>
- <path d="m38 26h-4l4 4v-4z" fill="url(#h)"/>
- <path d="m42 26v4l4-4h-4z" fill="url(#g)"/>
- <rect y="3" x="115" height="10" fill="url(#e)" width="10"/>
- <path d="m135.23 6.1522c1.03-0.4227 2.2 0.0619 2.62 1.0824s-0.06 2.1904-1.08 2.6132c-1.03 0.4222-2.2-0.0619-2.62-1.0824s0.06-2.1905 1.08-2.6132zm-1.96-4.7346l2.73 2.5878 2.73-2.5878 0.09 3.7578 3.76 0.0981-2.59 2.7265 2.59 2.726-3.76 0.099-0.09 3.757-2.73-2.587-2.73 2.587-0.09-3.757-3.76-0.099 2.59-2.726-2.59-2.7265 3.76-0.0981 0.09-3.7578z" fill="url(#d)"/>
-</svg>
diff --git a/files_videoviewer/mediaelement/src/css/loading.gif b/files_videoviewer/mediaelement/src/css/loading.gif
deleted file mode 100755
index 612222be5..000000000
--- a/files_videoviewer/mediaelement/src/css/loading.gif
+++ /dev/null
Binary files differ
diff --git a/files_videoviewer/mediaelement/src/css/mediaelementplayer.css b/files_videoviewer/mediaelement/src/css/mediaelementplayer.css
deleted file mode 100755
index 8b9116ac2..000000000
--- a/files_videoviewer/mediaelement/src/css/mediaelementplayer.css
+++ /dev/null
@@ -1,850 +0,0 @@
-.mejs-container {
- position: relative;
- background: #000;
- font-family: Helvetica, Arial;
- text-align: left;
- vertical-align: top;
- text-indent: 0;
-}
-
-.me-plugin {
- position: absolute;
-}
-
-.mejs-embed, .mejs-embed body {
- width: 100%;
- height: 100%;
- margin: 0;
- padding: 0;
- background: #000;
- overflow: hidden;
-}
-
-.mejs-container-fullscreen {
- position: fixed;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- overflow: hidden;
- z-index: 1000;
-}
-.mejs-container-fullscreen .mejs-mediaelement,
-.mejs-container-fullscreen video {
- width: 100%;
- height: 100%;
-}
-
-/* Start: LAYERS */
-.mejs-background {
- position: absolute;
- top: 0;
- left: 0;
-}
-.mejs-mediaelement {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
-}
-.mejs-poster {
- position: absolute;
- top: 0;
- left: 0;
-}
-.mejs-poster img {
- border: 0;
- padding: 0;
- border: 0;
- display: block;
-}
-.mejs-overlay {
- position: absolute;
- top: 0;
- left: 0;
-}
-.mejs-overlay-play {
- cursor: pointer;
-}
-.mejs-overlay-button {
- position: absolute;
- top: 50%;
- left: 50%;
- width: 100px;
- height: 100px;
- margin: -50px 0 0 -50px;
- background: url(bigplay.svg) no-repeat;
-}
-.no-svg .mejs-overlay-button {
- background-image: url(bigplay.png);
-}
-.mejs-overlay:hover .mejs-overlay-button {
- background-position: 0 -100px ;
-}
-.mejs-overlay-loading {
- position: absolute;
- top: 50%;
- left: 50%;
- width: 80px;
- height: 80px;
- margin: -40px 0 0 -40px;
- background: #333;
- background: url(background.png);
- background: rgba(0, 0, 0, 0.9);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.9)), to(rgba(0,0,0,0.9)));
- background: -webkit-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
- background: -moz-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
- background: -o-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
- background: -ms-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
- background: linear-gradient(rgba(50,50,50,0.9), rgba(0,0,0,0.9));
-}
-.mejs-overlay-loading span {
- display: block;
- width: 80px;
- height: 80px;
- background: transparent url(loading.gif) 50% 50% no-repeat;
-}
-
-/* End: LAYERS */
-
-/* Start: CONTROL BAR */
-.mejs-container .mejs-controls {
- position: absolute;
- background: none;
- list-style-type: none;
- margin: 0;
- padding: 0;
- bottom: 0;
- left: 0;
- background: url(background.png);
- background: rgba(0, 0, 0, 0.7);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.7)), to(rgba(0,0,0,0.7)));
- background: -webkit-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
- background: -moz-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
- background: -o-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
- background: -ms-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
- background: linear-gradient(rgba(50,50,50,0.7), rgba(0,0,0,0.7));
- height: 30px;
- width: 100%;
-}
-.mejs-container .mejs-controls div {
- list-style-type: none;
- background-image: none;
- display: block;
- float: left;
- margin: 0;
- padding: 0;
- width: 26px;
- height: 26px;
- font-size: 11px;
- line-height: 11px;
- background: 0;
- font-family: Helvetica, Arial;
- border: 0;
-}
-
-.mejs-controls .mejs-button button {
- cursor: pointer;
- display: block;
- font-size: 0;
- line-height: 0;
- text-decoration: none;
- margin: 7px 5px;
- padding: 0;
- position: absolute;
- height: 16px;
- width: 16px;
- border: 0;
- background: transparent url(controls.svg) no-repeat;
-}
-
-.no-svg .mejs-controls .mejs-button button {
- background-image: url(controls.png);
-}
-
-/* :focus for accessibility */
-.mejs-controls .mejs-button button:focus {
- outline: solid 1px yellow;
-}
-
-/* End: CONTROL BAR */
-
-/* Start: Time (current / duration) */
-.mejs-container .mejs-controls .mejs-time {
- color: #fff;
- display: block;
- height: 17px;
- width: auto;
- padding: 8px 3px 0 3px ;
- overflow: hidden;
- text-align: center;
- padding: auto 4px;
- -moz-box-sizing: content-box;
- -webkit-box-sizing: content-box;
- box-sizing: content-box;
-}
-.mejs-container .mejs-controls .mejs-time span {
- font-size: 11px;
- color: #fff;
- line-height: 12px;
- display: block;
- float: left;
- margin: 1px 2px 0 0;
- width: auto;
-}
-/* End: Time (current / duration) */
-
-
-/* Start: Play/pause */
-.mejs-controls .mejs-play button {
- background-position: 0 0;
-}
-.mejs-controls .mejs-pause button {
- background-position: 0 -16px;
-}
-/* End: Play/pause */
-
-
-/* Stop */
-.mejs-controls .mejs-stop button {
- background-position: -112px 0;
-}
-/* End: Play/pause */
-
-/* Start: Progress bar */
-.mejs-controls div.mejs-time-rail {
- width: 200px;
- padding-top: 5px;
-}
-.mejs-controls .mejs-time-rail span {
- display: block;
- position: absolute;
- width: 180px;
- height: 10px;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
- cursor: pointer;
-}
-.mejs-controls .mejs-time-rail .mejs-time-total {
- margin: 5px;
- background: #333;
- background: rgba(50,50,50,0.8);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
- background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
- background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
- background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
- background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
- background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-}
-.mejs-controls .mejs-time-rail .mejs-time-buffering {
- width: 100%;
- background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
- background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- -webkit-background-size: 15px 15px;
- -moz-background-size: 15px 15px;
- -o-background-size: 15px 15px;
- background-size: 15px 15px;
- -webkit-animation: buffering-stripes 2s linear infinite;
- -moz-animation: buffering-stripes 2s linear infinite;
- -ms-animation: buffering-stripes 2s linear infinite;
- -o-animation: buffering-stripes 2s linear infinite;
- animation: buffering-stripes 2s linear infinite;
-}
-
-@-webkit-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
-@-moz-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
-@-ms-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
-@-o-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
-@keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
-
-.mejs-controls .mejs-time-rail .mejs-time-loaded {
- background: #3caac8;
- background: rgba(60,170,200,0.8);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(44,124,145,0.8)), to(rgba(78,183,212,0.8)));
- background: -webkit-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
- background: -moz-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
- background: -o-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
- background: -ms-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8));
- background: linear-gradient(rgba(44,124,145,0.8), rgba(78,183,212,0.8));
- width: 0;
-}
-.mejs-controls .mejs-time-rail .mejs-time-current {
- width: 0;
- background: #fff;
- background: rgba(255,255,255,0.8);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,255,255,0.9)), to(rgba(200,200,200,0.8)));
- background: -webkit-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
- background: -moz-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
- background: -o-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
- background: -ms-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
- background: linear-gradient(rgba(255,255,255,0.9), rgba(200,200,200,0.8));
-}
-
-.mejs-controls .mejs-time-rail .mejs-time-handle {
- display: none;
- position: absolute;
- margin: 0;
- width: 10px;
- background: #fff;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- cursor: pointer;
- border: solid 2px #333;
- top: -2px;
- text-align: center;
-}
-
-.mejs-controls .mejs-time-rail .mejs-time-float {
- position: absolute;
- display: none;
- background: #eee;
- width: 36px;
- height: 17px;
- border: solid 1px #333;
- top: -26px;
- margin-left: -18px;
- text-align: center;
- color: #111;
-}
-
-.mejs-controls .mejs-time-rail .mejs-time-float-current {
- margin: 2px;
- width: 30px;
- display: block;
- text-align: center;
- left: 0;
-}
-
-.mejs-controls .mejs-time-rail .mejs-time-float-corner {
- position: absolute;
- display: block;
- width: 0;
- height: 0;
- line-height: 0;
- border: solid 5px #eee;
- border-color: #eee transparent transparent transparent;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
- top: 15px;
- left: 13px;
-}
-
-.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float {
- width: 48px;
-}
-
-.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current {
- width: 44px;
-}
-
-.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner {
- left: 18px;
-}
-
-
-
-/*
-.mejs-controls .mejs-time-rail:hover .mejs-time-handle {
- visibility:visible;
-}
-*/
-/* End: Progress bar */
-
-/* Start: Fullscreen */
-.mejs-controls .mejs-fullscreen-button button {
- background-position: -32px 0;
-}
-.mejs-controls .mejs-unfullscreen button {
- background-position: -32px -16px;
-}
-/* End: Fullscreen */
-
-
-/* Start: Mute/Volume */
-.mejs-controls .mejs-volume-button {
-}
-
-.mejs-controls .mejs-mute button {
- background-position: -16px -16px;
-}
-
-.mejs-controls .mejs-unmute button {
- background-position: -16px 0;
-}
-
-.mejs-controls .mejs-volume-button {
- position: relative;
-}
-
-.mejs-controls .mejs-volume-button .mejs-volume-slider {
- display: none;
- height: 115px;
- width: 25px;
- background: url(background.png);
- background: rgba(50, 50, 50, 0.7);
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
- top: -115px;
- left: 0;
- z-index: 1;
- position: absolute;
- margin: 0;
-}
-.mejs-controls .mejs-volume-button:hover {
- -webkit-border-radius: 0 0 4px 4px;
- -moz-border-radius: 0 0 4px 4px;
- border-radius: 0 0 4px 4px;
-}
-/*
-.mejs-controls .mejs-volume-button:hover .mejs-volume-slider {
- display: block;
-}
-*/
-
-.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total {
- position: absolute;
- left: 11px;
- top: 8px;
- width: 2px;
- height: 100px;
- background: #ddd;
- background: rgba(255, 255, 255, 0.5);
- margin: 0;
-}
-
-.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current {
- position: absolute;
- left: 11px;
- top: 8px;
- width: 2px;
- height: 100px;
- background: #ddd;
- background: rgba(255, 255, 255, 0.9);
- margin: 0;
-}
-
-.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle {
- position: absolute;
- left: 4px;
- top: -3px;
- width: 16px;
- height: 6px;
- background: #ddd;
- background: rgba(255, 255, 255, 0.9);
- cursor: N-resize;
- -webkit-border-radius: 1px;
- -moz-border-radius: 1px;
- border-radius: 1px;
- margin: 0;
-}
-
-
-/* horizontal version */
-
-.mejs-controls div.mejs-horizontal-volume-slider {
- height: 26px;
- width: 60px;
- position: relative;
-}
-
-.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
- position: absolute;
- left: 0;
- top: 11px;
- width: 50px;
- height: 8px;
- margin: 0;
- padding: 0;
- font-size: 1px;
-
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-
- background: #333;
- background: rgba(50,50,50,0.8);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8)));
- background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
- background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
- background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
- background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
- background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
-
-}
-
-.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
- position: absolute;
- left: 0;
- top: 11px;
- width: 50px;
- height: 8px;
- margin: 0;
- padding: 0;
- font-size: 1px;
-
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-
- background: #fff;
- background: rgba(255,255,255,0.8);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,255,255,0.9)), to(rgba(200,200,200,0.8)));
- background: -webkit-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
- background: -moz-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
- background: -o-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
- background: -ms-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8));
- background: linear-gradient(rgba(255,255,255,0.9), rgba(200,200,200,0.8));
-
-}
-
-
-.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle {
- display: none;
-}
-
-/* End: Mute/Volume */
-
-
-
-
-/* Start: TRACK (Captions and Chapters) */
-.mejs-controls .mejs-captions-button {
- position: relative;
-}
-
-.mejs-controls .mejs-captions-button button {
- background-position: -48px 0;
-}
-.mejs-controls .mejs-captions-button .mejs-captions-selector {
- visibility: hidden;
- position: absolute;
- bottom: 26px;
- right: -10px;
- width: 130px;
- height: 100px;
- background: url(background.png);
- background: rgba(50,50,50,0.7);
- border: solid 1px transparent;
- padding: 10px;
- overflow: hidden;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-/*
-.mejs-controls .mejs-captions-button:hover .mejs-captions-selector {
- visibility: visible;
-}
-*/
-
-.mejs-controls .mejs-captions-button .mejs-captions-selector ul {
- margin: 0;
- padding: 0;
- display: block;
- list-style-type: none !important;
- overflow: hidden;
-}
-.mejs-controls .mejs-captions-button .mejs-captions-selector ul li {
- margin: 0 0 6px 0;
- padding: 0;
- list-style-type: none !important;
- display: block;
- color: #fff;
- overflow: hidden;
-}
-.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input {
- clear: both;
- float: left;
- margin: 3px 3px 0 5px;
-}
-.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label {
- width: 100px;
- float: left;
- padding: 4px 0 0 0;
- line-height: 15px;
- font-family: helvetica, arial;
- font-size: 10px;
-}
-
-.mejs-controls .mejs-captions-button .mejs-captions-translations {
- font-size: 10px;
- margin: 0 0 5px 0;
-}
-
-
-.mejs-chapters {
- position: absolute;
- top: 0;
- left: 0;
- -xborder-right: solid 1px #fff;
- width: 10000px;
- z-index: 1;
-}
-.mejs-chapters .mejs-chapter {
- position: absolute;
- float: left;
- background: #222;
- background: rgba(0, 0, 0, 0.7);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.7)), to(rgba(0,0,0,0.7)));
- background: -webkit-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
- background: -moz-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
- background: -o-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
- background: -ms-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7));
- background: linear-gradient(rgba(50,50,50,0.7), rgba(0,0,0,0.7));
- filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#323232,endColorstr=#000000);
- overflow: hidden;
- border: 0;
-}
-.mejs-chapters .mejs-chapter .mejs-chapter-block {
- font-size: 11px;
- color: #fff;
- padding: 5px;
- display: block;
- border-right: solid 1px #333;
- border-bottom: solid 1px #333;
- cursor: pointer;
-}
-.mejs-chapters .mejs-chapter .mejs-chapter-block-last {
- border-right: none;
-}
-
-.mejs-chapters .mejs-chapter .mejs-chapter-block:hover {
- /*background: #333;*/
- background: #666;
- background: rgba(102,102,102, 0.7);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(102,102,102,0.7)), to(rgba(50,50,50,0.6)));
- background: -webkit-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
- background: -moz-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
- background: -o-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
- background: -ms-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6));
- background: linear-gradient(rgba(102,102,102,0.7), rgba(50,50,50,0.6));
- filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#666666,endColorstr=#323232);
-}
-.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title {
- font-size: 12px;
- font-weight: bold;
- display: block;
- white-space: nowrap;
- text-overflow: ellipsis;
- margin: 0 0 3px 0;
- line-height: 12px;
-}
-.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan {
- font-size: 12px;
- line-height: 12px;
- margin: 3px 0 4px 0;
- display: block;
- white-space: nowrap;
- text-overflow: ellipsis;
-}
-
-
-.mejs-captions-layer {
- position: absolute;
- bottom: 0;
- left: 0;
- text-align:center;
- /*font-weight: bold;*/
- line-height: 22px;
- font-size: 12px;
- color: #fff;
-}
-.mejs-captions-layer a {
- color: #fff;
- text-decoration: underline;
-}
-.mejs-captions-layer[lang=ar] {
- font-size: 20px;
- font-weight: normal;
-}
-
-.mejs-captions-position {
- position: absolute;
- width: 100%;
- bottom: 15px;
- left: 0;
-}
-
-.mejs-captions-position-hover {
- bottom: 45px;
-}
-
-.mejs-captions-text {
- padding: 3px 5px;
- background: url(background.png);
- background: rgba(20, 20, 20, 0.8);
-
-}
-/* End: TRACK (Captions and Chapters) */
-
-
-
-.mejs-clear {
- clear: both;
-}
-
-/* Start: ERROR */
-.me-cannotplay {
-}
-.me-cannotplay a {
- color: #fff;
- font-weight: bold;
-}
-.me-cannotplay span {
- padding: 15px;
- display: block;
-}
-/* End: ERROR */
-
-
-/* Start: Loop */
-.mejs-controls .mejs-loop-off button {
- background-position: -64px -16px;
-}
-.mejs-controls .mejs-loop-on button {
- background-position: -64px 0;
-}
-/* End: Loop */
-
-/* Start: backlight */
-.mejs-controls .mejs-backlight-off button {
- background-position: -80px -16px;
-}
-.mejs-controls .mejs-backlight-on button {
- background-position: -80px 0;
-}
-/* End: backlight */
-
-
-/* Start: picture controls */
-.mejs-controls .mejs-picturecontrols-button {
- background-position: -96px 0;
-}
-/* End: picture controls */
-
-
-/* context menu */
-.mejs-contextmenu {
- position: absolute;
- width: 150px;
- padding: 10px;
- border-radius: 4px;
- top: 0;
- left: 0;
- background: #fff;
- border: solid 1px #999;
- z-index: 1001; /* make sure it shows on fullscreen */
-}
-.mejs-contextmenu .mejs-contextmenu-separator {
- height: 1px;
- font-size: 0;
- margin: 5px 6px;
- background: #333;
-}
-
-.mejs-contextmenu .mejs-contextmenu-item {
- font-family: Helvetica, Arial;
- font-size: 12px;
- padding: 4px 6px;
- cursor: pointer;
- color: #333;
-}
-.mejs-contextmenu .mejs-contextmenu-item:hover {
- background: #2C7C91;
- color: #fff;
-}
-
-
-/* Start: SourceChooser */
-.mejs-controls .mejs-sourcechooser-button {
- position: relative;
-}
-
-.mejs-controls .mejs-sourcechooser-button button {
- background-position: -128px 0;
-}
-.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector {
- visibility: hidden;
- position: absolute;
- bottom: 26px;
- right: -10px;
- width: 130px;
- height: 100px;
- background: url(background.png);
- background: rgba(50,50,50,0.7);
- border: solid 1px transparent;
- padding: 10px;
- overflow: hidden;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-
-.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul {
- margin: 0;
- padding: 0;
- display: block;
- list-style-type: none !important;
- overflow: hidden;
-}
-.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li {
- margin: 0 0 6px 0;
- padding: 0;
- list-style-type: none !important;
- display: block;
- color: #fff;
- overflow: hidden;
-}
-.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input {
- clear: both;
- float: left;
- margin: 3px 3px 0 5px;
-}
-.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label {
- width: 100px;
- float: left;
- padding: 4px 0 0 0;
- line-height: 15px;
- font-family: helvetica, arial;
- font-size: 10px;
-}
-/* End: SourceChooser */
-
-
-/* Start: Postroll */
-.mejs-postroll-layer {
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: url(background.png);
- background: rgba(50,50,50,0.7);
- z-index: 1000;
- overflow: hidden;
-}
-.mejs-postroll-layer-content {
- width: 100%;
- height: 100%;
-}
-.mejs-postroll-close {
- position: absolute;
- right: 0;
- top: 0;
- background: url(background.png);
- background: rgba(50,50,50,0.7);
- color: #fff;
- padding: 4px;
- z-index: 100;
- cursor: pointer;
-}
-/* End: Postroll */
diff --git a/files_videoviewer/mediaelement/src/css/mejs-skins.css b/files_videoviewer/mediaelement/src/css/mejs-skins.css
deleted file mode 100755
index 814b9d4f0..000000000
--- a/files_videoviewer/mediaelement/src/css/mejs-skins.css
+++ /dev/null
@@ -1,283 +0,0 @@
-/* TED player */
-.mejs-container.mejs-ted {
-
-}
-.mejs-ted .mejs-controls {
- background: #eee;
- height: 65px;
-}
-
-.mejs-ted .mejs-button,
-.mejs-ted .mejs-time {
- position: absolute;
- background: #ddd;
-}
-.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-total {
- background-color: none;
- background: url(controls-ted.png) repeat-x 0 -52px;
- height: 6px;
-}
-.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-loaded {
- background-color: none;
- background: url(controls-ted.png) repeat-x 0 -52px;
- width: 0;
- height: 6px;
-}
-.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-current {
- width: 0;
- height: 6px;
- background-color: none;
- background: url(controls-ted.png) repeat-x 0 -59px;
-}
-.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-handle {
- display: block;
- margin: 0;
- width: 14px;
- height: 21px;
- top: -7px;
- border: 0;
- background: url(controls-ted.png) no-repeat 0 0;
-}
-.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-float {
- display: none;
-}
-.mejs-ted .mejs-controls .mejs-playpause-button {
- top: 29px;
- left: 9px;
- width: 49px;
- height: 28px;
-}
-.mejs-ted .mejs-controls .mejs-playpause-button button {
- width: 49px;
- height: 28px;
- background: url(controls-ted.png) no-repeat -50px -23px;
- margin: 0;
- padding: 0;
-}
-.mejs-ted .mejs-controls .mejs-pause button {
- background-position: 0 -23px;
-}
-
-.mejs-ted .mejs-controls .mejs-fullscreen-button {
- top: 34px;
- right: 9px;
- width: 17px;
- height: 15px;
- background : none;
-}
-.mejs-ted .mejs-controls .mejs-fullscreen-button button {
- width: 19px;
- height: 17px;
- background: transparent url(controls-ted.png) no-repeat 0 -66px;
- margin: 0;
- padding: 0;
-}
-.mejs-ted .mejs-controls .mejs-unfullscreen button {
- background: transparent url(controls-ted.png) no-repeat -21px -66px;
- margin: 0;
- padding: 0;
-}
-.mejs-ted .mejs-controls .mejs-volume-button {
- top: 30px;
- right: 35px;
- width: 24px;
- height: 22px;
-}
-.mejs-ted .mejs-controls .mejs-mute button {
- background: url(controls-ted.png) no-repeat -15px 0;
- width: 24px;
- height: 22px;
- margin: 0;
- padding: 0;
-}
-.mejs-ted .mejs-controls .mejs-unmute button {
- background: url(controls-ted.png) no-repeat -40px 0;
- width: 24px;
- height: 22px;
- margin: 0;
- padding: 0;
-}
-.mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-slider {
- background: #fff;
- border: solid 1px #aaa;
- border-width: 1px 1px 0 1px;
- width: 22px;
- height: 65px;
- top: -65px;
-}
-.mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-total {
- background: url(controls-ted.png) repeat-y -41px -66px;
- left: 8px;
- width: 6px;
- height: 50px;
-}
-.mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-current {
- left: 8px;
- width: 6px;
- background: url(controls-ted.png) repeat-y -48px -66px;
- height: 50px;
-}
-
-.mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-handle {
- display: none;
-}
-
-.mejs-ted .mejs-controls .mejs-time span {
- color: #333;
-}
-.mejs-ted .mejs-controls .mejs-currenttime-container {
- position: absolute;
- top: 32px;
- right: 100px;
- border: solid 1px #999;
- background: #fff;
- color: #333;
- padding-top: 2px;
- border-radius: 3px;
- color: #333;
-}
-.mejs-ted .mejs-controls .mejs-duration-container {
-
- position: absolute;
- top: 32px;
- right: 65px;
- border: solid 1px #999;
- background: #fff;
- color: #333;
- padding-top: 2px;
- border-radius: 3px;
- color: #333;
-}
-
-.mejs-ted .mejs-controls .mejs-time button{
- color: #333;
-}
-.mejs-ted .mejs-controls .mejs-captions-button {
- display: none;
-}
-/* END: TED player */
-
-
-/* WMP player */
-.mejs-container.mejs-wmp {
-
-}
-.mejs-wmp .mejs-controls {
- background: transparent url(controls-wmp-bg.png) center 16px no-repeat;
- height: 65px;
-}
-
-.mejs-wmp .mejs-button,
-.mejs-wmp .mejs-time {
- position: absolute;
- background: transparent;
-}
-.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-total {
- background-color: transparent;
- border: solid 1px #ccc;
- height: 3px;
-}
-.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-loaded {
- background-color: rgba(255,255,255,0.3);
- width: 0;
- height: 3px;
-}
-.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-current {
- width: 0;
- height: 1px;
- background-color: #014CB6;
- border: solid 1px #7FC9FA;
- border-width: 1px 0;
- border-color: #7FC9FA #fff #619FF2 #fff;
-}
-.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-handle {
- display: block;
- margin: 0;
- width: 16px;
- height: 9px;
- top: -3px;
- border: 0;
- background: url(controls-wmp.png) no-repeat 0 -80px;
-}
-.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-float {
- display: none;
-}
-.mejs-wmp .mejs-controls .mejs-playpause-button {
- top: 10px;
- left: 50%;
- margin: 10px 0 0 -20px;
- width: 40px;
- height: 40px;
-
-}
-.mejs-wmp .mejs-controls .mejs-playpause-button button {
- width: 40px;
- height: 40px;
- background: url(controls-wmp.png) no-repeat 0 0;
- margin: 0;
- padding: 0;
-}
-.mejs-wmp .mejs-controls .mejs-pause button {
- background-position: 0 -40px;
-}
-
-.mejs-wmp .mejs-controls .mejs-currenttime-container {
- position: absolute;
- top: 25px;
- left: 50%;
- margin-left: -93px;
-}
-.mejs-wmp .mejs-controls .mejs-duration-container {
- position: absolute;
- top: 25px;
- left: 50%;
- margin-left: -58px;
-}
-
-
-.mejs-wmp .mejs-controls .mejs-volume-button {
- top: 32px;
- right: 50%;
- margin-right: -55px;
- width: 20px;
- height: 15px;
-}
-.mejs-wmp .mejs-controls .mejs-volume-button button {
- margin: 0;
- padding: 0;
- background: url(controls-wmp.png) no-repeat -42px -17px;
- width: 20px;
- height: 15px;
-}
-.mejs-wmp .mejs-controls .mejs-unmute button {
- margin: 0;
- padding: 0;
- background: url(controls-wmp.png) no-repeat -42px 0;
- width: 20px;
- height: 15px;
-}
-.mejs-wmp .mejs-controls .mejs-volume-button .mejs-volume-slider {
- background: rgba(102,102,102,0.6);
-}
-
-.mejs-wmp .mejs-controls .mejs-fullscreen-button {
- top: 32px;
- right: 50%;
- margin-right: -82px;
- width: 15px;
- height: 14px;
-}
-.mejs-wmp .mejs-controls .mejs-fullscreen-button button {
- margin: 0;
- padding: 0;
- background: url(controls-wmp.png) no-repeat -63px 0;
- width: 15px;
- height: 14px;
-}
-.mejs-wmp .mejs-controls .mejs-captions-button {
- display: none;
-}
-/* END: WMP player */
-
-
-
diff --git a/files_videoviewer/mediaelement/src/flash/FlashMediaElement.as b/files_videoviewer/mediaelement/src/flash/FlashMediaElement.as
deleted file mode 100755
index d644aa787..000000000
--- a/files_videoviewer/mediaelement/src/flash/FlashMediaElement.as
+++ /dev/null
@@ -1 +0,0 @@
-package { import flash.display.*; import flash.events.*; import flash.media.*; import flash.net.*; import flash.text.*; import flash.system.*; import flash.media.Video; import flash.net.NetConnection; import flash.net.NetStream; import flash.geom.ColorTransform; import flash.filters.DropShadowFilter; import flash.utils.Timer; import flash.external.ExternalInterface; import flash.geom.Rectangle; import htmlelements.IMediaElement; import htmlelements.VideoElement; import htmlelements.AudioElement; import htmlelements.YouTubeElement; public class FlashMediaElement extends MovieClip { private var _mediaUrl:String; private var _autoplay:Boolean; private var _preload:String; private var _debug:Boolean; private var _isVideo:Boolean; private var _video:DisplayObject; private var _timerRate:Number; private var _stageWidth:Number; private var _stageHeight:Number; private var _enableSmoothing:Boolean; private var _allowedPluginDomain:String; private var _isFullScreen:Boolean = false; private var _startVolume:Number; private var _controlStyle:String; private var _autoHide:Boolean = true; private var _streamer:String = ""; private var _enablePseudoStreaming:Boolean; private var _pseudoStreamingStartQueryParam:String; // native video size (from meta data) private var _nativeVideoWidth:Number = 0; private var _nativeVideoHeight:Number = 0; // visual elements private var _output:TextField; private var _fullscreenButton:SimpleButton; // media private var _mediaElement:IMediaElement; // connection to fullscreen private var _connection:LocalConnection; private var _connectionName:String; //private var fullscreen_btn:SimpleButton; // CONTROLS private var _alwaysShowControls:Boolean; private var _controlBar:MovieClip; private var _controlBarBg:MovieClip; private var _scrubBar:MovieClip; private var _scrubTrack:MovieClip; private var _scrubOverlay:MovieClip; private var _scrubLoaded:MovieClip; private var _hoverTime:MovieClip; private var _hoverTimeText:TextField; private var _playButton:SimpleButton; private var _pauseButton:SimpleButton; private var _duration:TextField; private var _currentTime:TextField; private var _fullscreenIcon:SimpleButton; private var _volumeMuted:SimpleButton; private var _volumeUnMuted:SimpleButton; private var _scrubTrackColor:String; private var _scrubBarColor:String; private var _scrubLoadedColor:String; // IDLE Timer for mouse for showing/hiding controls private var _inactiveTime:int; private var _timer:Timer; private var _idleTime:int; private var _isMouseActive:Boolean private var _isOverStage:Boolean = false; // security checkes private var securityIssue:Boolean = false; // When SWF parameters contain illegal characters private var directAccess:Boolean = false; // When SWF visited directly with no parameters (or when security issue detected) public function FlashMediaElement() { // show allow this player to be called from a different domain than the HTML page hosting the player Security.allowDomain("*"); // check for security issues (borrowed from jPLayer) checkFlashVars(loaderInfo.parameters); // add debug output _output = new TextField(); _output.textColor = 0xeeeeee; _output.width = stage.stageWidth - 100; _output.height = stage.stageHeight; _output.multiline = true; _output.wordWrap = true; _output.border = false; _output.filters = [new DropShadowFilter(1, 0x000000, 45, 1, 2, 2, 1)]; _output.text = "Initializing...\n"; addChild(_output); _output.visible = securityIssue; if (securityIssue) { _output.text = "WARNING: Security issue detected. Player stopped."; return; } // get parameters var params:Object = LoaderInfo(this.root.loaderInfo).parameters; _mediaUrl = (params['file'] != undefined) ? String(params['file']) : ""; _autoplay = (params['autoplay'] != undefined) ? (String(params['autoplay']) == "true") : false; _debug = (params['debug'] != undefined) ? (String(params['debug']) == "true") : false; _isVideo = (params['isvideo'] != undefined) ? ((String(params['isvideo']) == "false") ? false : true ) : true; _timerRate = (params['timerrate'] != undefined) ? (parseInt(params['timerrate'], 10)) : 250; _alwaysShowControls = (params['controls'] != undefined) ? (String(params['controls']) == "true") : false; _enableSmoothing = (params['smoothing'] != undefined) ? (String(params['smoothing']) == "true") : false; _startVolume = (params['startvolume'] != undefined) ? (parseFloat(params['startvolume'])) : 0.8; _preload = (params['preload'] != undefined) ? params['preload'] : "none"; _controlStyle = (params['controlstyle'] != undefined) ? (String(params['controlstyle'])) : ""; // blank or "floating" _autoHide = (params['autohide'] != undefined) ? (String(params['autohide'])) : true; _scrubTrackColor = (params['scrubtrackcolor'] != undefined) ? (String(params['scrubtrackcolor'])) : "0x333333"; _scrubBarColor = (params['scrubbarcolor'] != undefined) ? (String(params['scrubbarcolor'])) : "0xefefef"; _scrubLoadedColor = (params['scrubloadedcolor'] != undefined) ? (String(params['scrubloadedcolor'])) : "0x3CACC8"; _enablePseudoStreaming = (params['pseudostreaming'] != undefined) ? (String(params['pseudostreaming']) == "true") : false; _pseudoStreamingStartQueryParam = (params['pseudostreamstart'] != undefined) ? (String(params['pseudostreamstart'])) : "start"; _streamer = (params['flashstreamer'] != undefined) ? (String(params['flashstreamer'])) : ""; _output.visible = _debug; if (isNaN(_timerRate)) _timerRate = 250; // setup stage and player sizes/scales stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; _stageWidth = stage.stageWidth; _stageHeight = stage.stageHeight; //_autoplay = true; //_mediaUrl = "http://mediafiles.dts.edu/chapel/mp4/20100609.mp4"; //_alwaysShowControls = true; //_mediaUrl = "../media/Parades-PastLives.mp3"; //_mediaUrl = "../media/echo-hereweare.mp4"; //_mediaUrl = "http://video.ted.com/talks/podcast/AlGore_2006_480.mp4"; //_mediaUrl = "rtmp://stream2.france24.yacast.net/france24_live/en/f24_liveen"; //_mediaUrl = "http://www.youtube.com/watch?feature=player_embedded&v=yyWWXSwtPP0"; // hosea //_mediaUrl = "http://www.youtube.com/watch?feature=player_embedded&v=m5VDDJlsD6I"; // railer with notes //_alwaysShowControls = true; //_debug=true; // position and hide _fullscreenButton = getChildByName("fullscreen_btn") as SimpleButton; //_fullscreenButton.visible = false; _fullscreenButton.alpha = 0; _fullscreenButton.addEventListener(MouseEvent.CLICK, fullscreenClick, false); _fullscreenButton.x = stage.stageWidth - _fullscreenButton.width; _fullscreenButton.y = stage.stageHeight - _fullscreenButton.height; // create media element if (_isVideo) { if (_mediaUrl.indexOf("youtube.com") > -1 || _mediaUrl.indexOf("youtu.be") > -1) { //Security.allowDomain("http://www.youtube.com"); _mediaElement = new YouTubeElement(this, _autoplay, _preload, _timerRate, _startVolume); _video = (_mediaElement as YouTubeElement).player; // these are set and then used once the player is loaded (_mediaElement as YouTubeElement).initWidth = _stageWidth; (_mediaElement as YouTubeElement).initHeight = _stageHeight; } else { _mediaElement = new VideoElement(this, _autoplay, _preload, _timerRate, _startVolume, _streamer); _video = (_mediaElement as VideoElement).video; _video.width = _stageWidth; _video.height = _stageHeight; (_video as Video).smoothing = _enableSmoothing; (_mediaElement as VideoElement).setReference(this); (_mediaElement as VideoElement).setPseudoStreaming(_enablePseudoStreaming); (_mediaElement as VideoElement).setPseudoStreamingStartParam(_pseudoStreamingStartQueryParam); //_video.scaleMode = VideoScaleMode.MAINTAIN_ASPECT_RATIO; addChild(_video); } } else { //var player2:AudioDecoder = new com.automatastudios.audio.audiodecoder.AudioDecoder(); _mediaElement = new AudioElement(this, _autoplay, _preload, _timerRate, _startVolume); } // controls! _controlBar = getChildByName("controls_mc") as MovieClip; _controlBarBg = _controlBar.getChildByName("controls_bg_mc") as MovieClip; _scrubTrack = _controlBar.getChildByName("scrubTrack") as MovieClip; _scrubBar = _controlBar.getChildByName("scrubBar") as MovieClip; _scrubOverlay = _controlBar.getChildByName("scrubOverlay") as MovieClip; _scrubLoaded = _controlBar.getChildByName("scrubLoaded") as MovieClip; _scrubOverlay.buttonMode = true; _scrubOverlay.useHandCursor = true applyColor(_scrubTrack, _scrubTrackColor); applyColor(_scrubBar, _scrubBarColor); applyColor(_scrubLoaded, _scrubLoadedColor); _fullscreenIcon = _controlBar.getChildByName("fullscreenIcon") as SimpleButton; // New fullscreenIcon for new fullscreen floating controls //if(_alwaysShowControls && _controlStyle.toUpperCase()=="FLOATING") { _fullscreenIcon.addEventListener(MouseEvent.CLICK, fullScreenIconClick, false); //} _volumeMuted = _controlBar.getChildByName("muted_mc") as SimpleButton; _volumeUnMuted = _controlBar.getChildByName("unmuted_mc") as SimpleButton; _volumeMuted.addEventListener(MouseEvent.CLICK, toggleVolume, false); _volumeUnMuted.addEventListener(MouseEvent.CLICK, toggleVolume, false); _playButton = _controlBar.getChildByName("play_btn") as SimpleButton; _playButton.addEventListener(MouseEvent.CLICK, function(e:MouseEvent) { _mediaElement.play(); }); _pauseButton = _controlBar.getChildByName("pause_btn") as SimpleButton; _pauseButton.addEventListener(MouseEvent.CLICK, function(e:MouseEvent) { _mediaElement.pause(); }); _pauseButton.visible = false; _duration = _controlBar.getChildByName("duration_txt") as TextField; _currentTime = _controlBar.getChildByName("currentTime_txt") as TextField; _hoverTime = _controlBar.getChildByName("hoverTime") as MovieClip; _hoverTimeText = _hoverTime.getChildByName("hoverTime_txt") as TextField; _hoverTime.visible=false; _hoverTime.y=(_hoverTime.height/2)+1; _hoverTime.x=0; // Add new timeline scrubber events _scrubOverlay.addEventListener(MouseEvent.MOUSE_MOVE, scrubMove); _scrubOverlay.addEventListener(MouseEvent.CLICK, scrubClick); _scrubOverlay.addEventListener(MouseEvent.MOUSE_OVER, scrubOver); _scrubOverlay.addEventListener(MouseEvent.MOUSE_OUT, scrubOut); if (_autoHide) { // && _alwaysShowControls) { // Add mouse activity for show/hide of controls stage.addEventListener(Event.MOUSE_LEAVE, mouseActivityLeave); stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseActivityMove); _inactiveTime = 2500; _timer = new Timer(_inactiveTime) _timer.addEventListener(TimerEvent.TIMER, idleTimer); _timer.start(); // set } if(_alwaysShowControls) { if(_startVolume<=0) { trace("INITIAL VOLUME: "+_startVolume+" MUTED"); _volumeMuted.visible=true; _volumeUnMuted.visible=false; } else { trace("INITIAL VOLUME: "+_startVolume+" UNMUTED"); _volumeMuted.visible=false; _volumeUnMuted.visible=true; } } _controlBar.visible = _alwaysShowControls; setControlDepth(); _output.appendText("stage: " + stage.stageWidth + "x" + stage.stageHeight + "\n"); _output.appendText("file: " + _mediaUrl + "\n"); _output.appendText("autoplay: " + _autoplay.toString() + "\n"); _output.appendText("preload: " + _preload.toString() + "\n"); _output.appendText("isvideo: " + _isVideo.toString() + "\n"); _output.appendText("smoothing: " + _enableSmoothing.toString() + "\n"); _output.appendText("timerrate: " + _timerRate.toString() + "\n"); _output.appendText("displayState: " +(stage.hasOwnProperty("displayState")).toString() + "\n"); // attach javascript _output.appendText("ExternalInterface.available: " + ExternalInterface.available.toString() + "\n"); _output.appendText("ExternalInterface.objectID: " + ((ExternalInterface.objectID != null)? ExternalInterface.objectID.toString() : "null") + "\n"); if (_mediaUrl != "") { _mediaElement.setSrc(_mediaUrl); } positionControls(); // Fire this once just to set the width on some dynamically sized scrub bar items; _scrubBar.scaleX=0; _scrubLoaded.scaleX=0; if (ExternalInterface.available) { // && !_alwaysShowControls _output.appendText("Adding callbacks...\n"); try { if (ExternalInterface.objectID != null && ExternalInterface.objectID.toString() != "") { // add HTML media methods ExternalInterface.addCallback("playMedia", playMedia); ExternalInterface.addCallback("loadMedia", loadMedia); ExternalInterface.addCallback("pauseMedia", pauseMedia); ExternalInterface.addCallback("stopMedia", stopMedia); ExternalInterface.addCallback("setSrc", setSrc); ExternalInterface.addCallback("setCurrentTime", setCurrentTime); ExternalInterface.addCallback("setVolume", setVolume); ExternalInterface.addCallback("setMuted", setMuted); ExternalInterface.addCallback("setFullscreen", setFullscreen); ExternalInterface.addCallback("setVideoSize", setVideoSize); ExternalInterface.addCallback("positionFullscreenButton", positionFullscreenButton); ExternalInterface.addCallback("hideFullscreenButton", hideFullscreenButton); // fire init method ExternalInterface.call("mejs.MediaPluginBridge.initPlugin", ExternalInterface.objectID); } _output.appendText("Success...\n"); } catch (error:SecurityError) { _output.appendText("A SecurityError occurred: " + error.message + "\n"); } catch (error:Error) { _output.appendText("An Error occurred: " + error.message + "\n"); } } if (_preload != "none") { _mediaElement.load(); if (_autoplay) { _mediaElement.play(); } } else if (_autoplay) { _mediaElement.load(); _mediaElement.play(); } // listen for resize stage.addEventListener(Event.RESIZE, resizeHandler); // send click events up to javascript stage.addEventListener(MouseEvent.CLICK, stageClicked); // resize stage.addEventListener(FullScreenEvent.FULL_SCREEN, stageFullScreenChanged); } public function setControlDepth():void { // put these on top addChild(_output); addChild(_controlBar); addChild(_fullscreenButton); } // borrowed from jPLayer // https://github.com/happyworm/jPlayer/blob/e8ca190f7f972a6a421cb95f09e138720e40ed6d/actionscript/Jplayer.as#L228 private function checkFlashVars(p:Object):void { var i:Number = 0; for each (var s:String in p) { if (isIllegalChar(s)) { securityIssue = true; // Illegal char found } i++; } if(i === 0 || securityIssue) { directAccess = true; } } private function isIllegalChar(s:String):Boolean { var illegals:String = "' \" ( ) { } * + \\ < >"; if(Boolean(s)) { // Otherwise exception if parameter null. for each (var illegal:String in illegals.split(' ')) { if(s.indexOf(illegal) >= 0) { return true; // Illegal char found } } } return false; } // START: Controls and events function mouseActivityMove(event:MouseEvent):void { // if mouse is in the video area if (_autoHide && (mouseX>=0 && mouseX<=stage.stageWidth) && (mouseY>=0 && mouseY<=stage.stageHeight)) { // This could be move to a nice fade at some point... _controlBar.visible = (_alwaysShowControls || _isFullScreen); _isMouseActive = true; _idleTime = 0; _timer.reset(); _timer.start() } } function mouseActivityLeave(event:Event):void { if (_autoHide) { _isOverStage = false; // This could be move to a nice fade at some point... _controlBar.visible = false; _isMouseActive = false; _idleTime = 0; _timer.reset(); _timer.stop(); } } function idleTimer(event:TimerEvent):void { if (_autoHide) { // This could be move to a nice fade at some point... _controlBar.visible = false; _isMouseActive = false; _idleTime += _inactiveTime; _idleTime = 0; _timer.reset(); _timer.stop(); } } function scrubMove(event:MouseEvent):void { //if (_alwaysShowControls) { if (_hoverTime.visible) { var seekBarPosition:Number = ((event.localX / _scrubTrack.width) *_mediaElement.duration())*_scrubTrack.scaleX; var hoverPos:Number = (seekBarPosition / _mediaElement.duration()) *_scrubTrack.scaleX; if (_isFullScreen) { _hoverTime.x=event.target.parent.mouseX; } else { _hoverTime.x=mouseX; } _hoverTime.y = _scrubBar.y - (_hoverTime.height/2); _hoverTimeText.text = secondsToTimeCode(seekBarPosition); } //} //trace(event); } function scrubOver(event:MouseEvent):void { _hoverTime.y = _scrubBar.y-(_hoverTime.height/2)+1; _hoverTime.visible = true; trace(event); } function scrubOut(event:MouseEvent):void { _hoverTime.y = _scrubBar.y+(_hoverTime.height/2)+1; _hoverTime.visible = false; //_hoverTime.x=0; //trace(event); } function scrubClick(event:MouseEvent):void { //trace(event); var seekBarPosition:Number = ((event.localX / _scrubTrack.width) *_mediaElement.duration())*_scrubTrack.scaleX; var tmp:Number = (_mediaElement.currentTime()/_mediaElement.duration())*_scrubTrack.width; var canSeekToPosition:Boolean = _scrubLoaded.scaleX > (seekBarPosition / _mediaElement.duration()) *_scrubTrack.scaleX; //var canSeekToPosition:Boolean = true; /* amountLoaded = ns.bytesLoaded / ns.bytesTotal; loader.loadbar._width = amountLoaded * 208.9; loader.scrub._x = ns.time / duration * 208.9; */ trace("seekBarPosition:"+seekBarPosition, "CanSeekToPosition: "+canSeekToPosition); if (seekBarPosition>0 && seekBarPosition<_mediaElement.duration() && canSeekToPosition) { _mediaElement.setCurrentTime(seekBarPosition); } } function toggleVolume(event:MouseEvent):void { trace(event.currentTarget.name); switch(event.currentTarget.name) { case "muted_mc": setMuted(false); break; case "unmuted_mc": setMuted(true); break; } } function toggleVolumeIcons(volume:Number) { if(volume<=0) { _volumeMuted.visible = true; _volumeUnMuted.visible = false; } else { _volumeMuted.visible = false; _volumeUnMuted.visible = true; } } public function positionControls(forced:Boolean=false) { if ( _controlStyle.toUpperCase() == "FLOATING" && _isFullScreen) { trace("CONTROLS: floating"); _hoverTime.y=(_hoverTime.height/2)+1; _hoverTime.x=0; _controlBarBg.width = 300; _controlBarBg.height = 93; //_controlBarBg.x = (stage.stageWidth/2) - (_controlBarBg.width/2); //_controlBarBg.y = stage.stageHeight - 300; _pauseButton.scaleX = _playButton.scaleX=3.5; _pauseButton.scaleY= _playButton.scaleY=3.5; // center the play button and make it big and at the top _pauseButton.x = _playButton.x = (_controlBarBg.width/2)-(_playButton.width/2)+7; _pauseButton.y = _playButton.y = _controlBarBg.height-_playButton.height-(14) _controlBar.x = (stage.stageWidth/2) -150; _controlBar.y = stage.stageHeight - _controlBar.height-100; // reposition the time and duration items _duration.x = _controlBarBg.width - _duration.width - 10; _duration.y = _controlBarBg.height - _duration.height -7; //_currentTime.x = _controlBarBg.width - _duration.width - 10 - _currentTime.width - 10; _currentTime.x = 5 _currentTime.y= _controlBarBg.height - _currentTime.height-7; _fullscreenIcon.x = _controlBarBg.width - _fullscreenIcon.width - 7; _fullscreenIcon.y = 7; _volumeMuted.x = _volumeUnMuted.x = 7; _volumeMuted.y = _volumeUnMuted.y = 7; _scrubLoaded.x = _scrubBar.x = _scrubOverlay.x = _scrubTrack.x =_currentTime.x+_currentTime.width+7; _scrubLoaded.y = _scrubBar.y = _scrubOverlay.y = _scrubTrack.y=_controlBarBg.height-_scrubTrack.height-10; _scrubBar.width = _scrubOverlay.width = _scrubTrack.width = (_duration.x-_duration.width-14); } else { trace("CONTROLS: normal, original"); /* // Original style bottom display _hoverTime.y=(_hoverTime.height/2)+1; _hoverTime.x=0; _controlBarBg.width = stage.stageWidth; _controlBar.y = stage.stageHeight - _controlBar.height; _duration.x = stage.stageWidth - _duration.width - 10; //_currentTime.x = stage.stageWidth - _duration.width - 10 - _currentTime.width - 10; _currentTime.x = _playButton.x+_playButton.width; _scrubTrack.width = (_duration.x-_duration.width-10)-_duration.width+10; _scrubOverlay.width = _scrubTrack.width; _scrubBar.width = _scrubTrack.width; */ // FLOATING MODE BOTTOM DISPLAY - similar to normal trace("THAT WAY!"); _hoverTime.y=(_hoverTime.height/2)+1; _hoverTime.x=0; _controlBarBg.width = stage.stageWidth; _controlBarBg.height = 30; _controlBarBg.y=0; _controlBarBg.x=0; // _controlBarBg.x = 0; // _controlBarBg.y = stage.stageHeight - _controlBar.height; _pauseButton.scaleX = _playButton.scaleX=1; _pauseButton.scaleY = _playButton.scaleY=1; _pauseButton.x = _playButton.x = 7; _pauseButton.y = _playButton.y = _controlBarBg.height-_playButton.height-2; //_currentTime.x = stage.stageWidth - _duration.width - 10 - _currentTime.width - 10; _currentTime.x = _playButton.x+_playButton.width; _fullscreenIcon.x = _controlBarBg.width - _fullscreenIcon.width - 7; _fullscreenIcon.y = 8; _volumeMuted.x = _volumeUnMuted.x = _fullscreenIcon.x - _volumeMuted.width - 10; _volumeMuted.y = _volumeUnMuted.y = 10; _duration.x = _volumeMuted.x - _volumeMuted.width - _duration.width + 5; _duration.y = _currentTime.y = _controlBarBg.height - _currentTime.height - 7; _scrubLoaded.x = _scrubBar.x = _scrubOverlay.x = _scrubTrack.x = _currentTime.x + _currentTime.width + 10; _scrubLoaded.y = _scrubBar.y = _scrubOverlay.y = _scrubTrack.y = _controlBarBg.height - _scrubTrack.height - 9; _scrubBar.width = _scrubOverlay.width = _scrubTrack.width = (_duration.x-_duration.width-10)-_duration.width+5; _controlBar.x = 0; _controlBar.y = stage.stageHeight - _controlBar.height; } } // END: Controls function stageClicked(e:MouseEvent):void { //_output.appendText("click: " + e.stageX.toString() +","+e.stageY.toString() + "\n"); if (e.target == stage) { sendEvent("click", ""); } } function resizeHandler(e:Event):void { //_video.scaleX = stage.stageWidth / _stageWidth; //_video.scaleY = stage.stageHeight / _stageHeight; //positionControls(); repositionVideo(); } // START: Fullscreen function enterFullscreen() { _output.appendText("enterFullscreen()\n"); var screenRectangle:Rectangle = new Rectangle(0, 0, flash.system.Capabilities.screenResolutionX, flash.system.Capabilities.screenResolutionY); stage.fullScreenSourceRect = screenRectangle; stage.displayState = StageDisplayState.FULL_SCREEN; repositionVideo(true); positionControls(); updateControls(HtmlMediaEvent.FULLSCREENCHANGE); _controlBar.visible = true; _isFullScreen = true; } function exitFullscreen() { stage.displayState = StageDisplayState.NORMAL; _controlBar.visible = false; _isFullScreen = false; } function setFullscreen(gofullscreen:Boolean) { _output.appendText("setFullscreen: " + gofullscreen.toString() + "\n"); try { //_fullscreenButton.visible = false; if (gofullscreen) { enterFullscreen(); } else { exitFullscreen(); } } catch (error:Error) { // show the button when the security error doesn't let it work //_fullscreenButton.visible = true; _fullscreenButton.alpha = 1; _isFullScreen = false; _output.appendText("error setting fullscreen: " + error.message.toString() + "\n"); } } // control bar button/icon function fullScreenIconClick(e:MouseEvent) { try { _controlBar.visible = true; setFullscreen(!_isFullScreen); repositionVideo(_isFullScreen); } catch (error:Error) { } } // special floating fullscreen icon function fullscreenClick(e:MouseEvent) { //_fullscreenButton.visible = false; _fullscreenButton.alpha = 0 try { _controlBar.visible = true; setFullscreen(true); repositionVideo(true); positionControls(); } catch (error:Error) { } } function stageFullScreenChanged(e:FullScreenEvent) { _output.appendText("fullscreen event: " + e.fullScreen.toString() + "\n"); //_fullscreenButton.visible = false; _fullscreenButton.alpha = 0; _isFullScreen = e.fullScreen; sendEvent(HtmlMediaEvent.FULLSCREENCHANGE, "isFullScreen:" + e.fullScreen ); if (!e.fullScreen) { _controlBar.visible = _alwaysShowControls; } } // END: Fullscreen // START: external interface function playMedia() { _output.appendText("play\n"); _mediaElement.play(); } function loadMedia() { _output.appendText("load\n"); _mediaElement.load(); } function pauseMedia() { _output.appendText("pause\n"); _mediaElement.pause(); } function setSrc(url:String) { _output.appendText("setSrc: " + url + "\n"); _mediaElement.setSrc(url); } function stopMedia() { _output.appendText("stop\n"); _mediaElement.stop(); } function setCurrentTime(time:Number) { _output.appendText("seek: " + time.toString() + "\n"); _mediaElement.setCurrentTime(time); } function setVolume(volume:Number) { _output.appendText("volume: " + volume.toString() + "\n"); _mediaElement.setVolume(volume); toggleVolumeIcons(volume); } function setMuted(muted:Boolean) { _output.appendText("muted: " + muted.toString() + "\n"); _mediaElement.setMuted(muted); toggleVolumeIcons(_mediaElement.getVolume()); } function setVideoSize(width:Number, height:Number) { _output.appendText("setVideoSize: " + width.toString() + "," + height.toString() + "\n"); _stageWidth = width; _stageHeight = height; if (_video != null) { repositionVideo(); positionControls(); //_fullscreenButton.x = stage.stageWidth - _fullscreenButton.width - 10; _output.appendText("result: " + _video.width.toString() + "," + _video.height.toString() + "\n"); } } function positionFullscreenButton(x:Number, y:Number, visibleAndAbove:Boolean ) { _output.appendText("position FS: " + x.toString() + "x" + y.toString() + "\n"); // bottom corner /* _fullscreenButton.x = stage.stageWidth - _fullscreenButton.width _fullscreenButton.y = stage.stageHeight - _fullscreenButton.height; */ // position just above if (visibleAndAbove) { _fullscreenButton.x = x+1; _fullscreenButton.y = y - _fullscreenButton.height+1; } else { _fullscreenButton.x = x; _fullscreenButton.y = y; } // check for oversizing if ((_fullscreenButton.x + _fullscreenButton.width) > stage.stageWidth) _fullscreenButton.x = stage.stageWidth - _fullscreenButton.width; // show it! if (visibleAndAbove) { _fullscreenButton.alpha = 1; } } function hideFullscreenButton() { //_fullscreenButton.visible = false; _fullscreenButton.alpha = 0; } // END: external interface function repositionVideo(fullscreen:Boolean = false):void { _output.appendText("positioning video\n"); if (_mediaElement is VideoElement) { if (isNaN(_nativeVideoWidth) || isNaN(_nativeVideoHeight) || _nativeVideoWidth <= 0 || _nativeVideoHeight <= 0) { _output.appendText("ERR: I dont' have the native dimension\n"); return; } // calculate ratios var stageRatio, nativeRatio; _video.x = 0; _video.y = 0; if(fullscreen == true) { stageRatio = flash.system.Capabilities.screenResolutionX/flash.system.Capabilities.screenResolutionY; nativeRatio = _nativeVideoWidth/_nativeVideoHeight; // adjust size and position if (nativeRatio > stageRatio) { _mediaElement.setSize(flash.system.Capabilities.screenResolutionX, _nativeVideoHeight * flash.system.Capabilities.screenResolutionX / _nativeVideoWidth); _video.y = flash.system.Capabilities.screenResolutionY/2 - _video.height/2; } else if (stageRatio > nativeRatio) { _mediaElement.setSize(_nativeVideoWidth * flash.system.Capabilities.screenResolutionY / _nativeVideoHeight, flash.system.Capabilities.screenResolutionY); _video.x = flash.system.Capabilities.screenResolutionX/2 - _video.width/2; } else if (stageRatio == nativeRatio) { _mediaElement.setSize(flash.system.Capabilities.screenResolutionX, flash.system.Capabilities.screenResolutionY); } } else { stageRatio = _stageWidth/_stageHeight; nativeRatio = _nativeVideoWidth/_nativeVideoHeight; // adjust size and position if (nativeRatio > stageRatio) { _mediaElement.setSize(_stageWidth, _nativeVideoHeight * _stageWidth / _nativeVideoWidth); _video.y = _stageHeight/2 - _video.height/2; } else if (stageRatio > nativeRatio) { _mediaElement.setSize( _nativeVideoWidth * _stageHeight / _nativeVideoHeight, _stageHeight); _video.x = _stageWidth/2 - _video.width/2; } else if (stageRatio == nativeRatio) { _mediaElement.setSize(_stageWidth, _stageHeight); } } } else if (_mediaElement is YouTubeElement) { if(fullscreen == true) { _mediaElement.setSize(flash.system.Capabilities.screenResolutionX, flash.system.Capabilities.screenResolutionY); } else { _mediaElement.setSize(_stageWidth, _stageHeight); } } positionControls(); } // SEND events to JavaScript public function sendEvent(eventName:String, eventValues:String) { // special video event if (eventName == HtmlMediaEvent.LOADEDMETADATA && _isVideo) { _output.appendText("METADATA RECEIVED: "); try { if (_mediaElement is VideoElement) { _nativeVideoWidth = (_mediaElement as VideoElement).videoWidth; _nativeVideoHeight = (_mediaElement as VideoElement).videoHeight; } } catch (e:Error) { _output.appendText(e.toString() + "\n"); } _output.appendText(_nativeVideoWidth.toString() + "x" + _nativeVideoHeight.toString() + "\n"); if(stage.displayState == "fullScreen" ) { setVideoSize(_nativeVideoWidth, _nativeVideoHeight); repositionVideo(true); } else { repositionVideo(); } } updateControls(eventName); //trace((_mediaElement.duration()*1).toString() + " / " + (_mediaElement.currentTime()*1).toString()); //trace("CurrentProgress:"+_mediaElement.currentProgress()); if (ExternalInterface.objectID != null && ExternalInterface.objectID.toString() != "") { //_output.appendText("event:" + eventName + " : " + eventValues); //trace("event", eventName, eventValues); if (eventValues == null) eventValues == ""; if (_isVideo) { eventValues += (eventValues != "" ? "," : "") + "isFullScreen:" + _isFullScreen; } eventValues = "{" + eventValues + "}"; /* OLD DIRECT METHOD ExternalInterface.call( "function(id, name) { mejs.MediaPluginBridge.fireEvent(id,name," + eventValues + "); }", ExternalInterface.objectID, eventName); */ // use set timeout for performance reasons //if (!_alwaysShowControls) { ExternalInterface.call("setTimeout", "mejs.MediaPluginBridge.fireEvent('" + ExternalInterface.objectID + "','" + eventName + "'," + eventValues + ")",0); //} } } function updateControls(eventName:String):void { //trace("updating controls"); try { // update controls switch (eventName) { case "pause": case "paused": case "ended": _playButton.visible = true; _pauseButton.visible = false; break; case "play": case "playing": _playButton.visible = false; _pauseButton.visible = true; break; } if (eventName == HtmlMediaEvent.TIMEUPDATE || eventName == HtmlMediaEvent.PROGRESS || eventName == HtmlMediaEvent.FULLSCREENCHANGE) { //_duration.text = (_mediaElement.duration()*1).toString(); _duration.text = secondsToTimeCode(_mediaElement.duration()); //_currentTime.text = (_mediaElement.currentTime()*1).toString(); _currentTime.text = secondsToTimeCode(_mediaElement.currentTime()); var pct:Number = (_mediaElement.currentTime() / _mediaElement.duration()) *_scrubTrack.scaleX; _scrubBar.scaleX = pct; _scrubLoaded.scaleX = (_mediaElement.currentProgress()*_scrubTrack.scaleX)/100; } } catch (error:Error) { trace("error: " + error.toString()); } } // START: utility function secondsToTimeCode(seconds:Number):String { var timeCode:String = ""; seconds = Math.round(seconds); var minutes:Number = Math.floor(seconds / 60); timeCode = (minutes >= 10) ? minutes.toString() : "0" + minutes.toString(); seconds = Math.floor(seconds % 60); timeCode += ":" + ((seconds >= 10) ? seconds.toString() : "0" + seconds.toString()); return timeCode; //minutes.toString() + ":" + seconds.toString(); } function applyColor(item:Object, color:String):void { var myColor:ColorTransform = item.transform.colorTransform; myColor.color = Number(color); item.transform.colorTransform = myColor; } // END: utility } } \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/flash/FlashMediaElement.fla b/files_videoviewer/mediaelement/src/flash/FlashMediaElement.fla
deleted file mode 100755
index b39f581e6..000000000
--- a/files_videoviewer/mediaelement/src/flash/FlashMediaElement.fla
+++ /dev/null
Binary files differ
diff --git a/files_videoviewer/mediaelement/src/flash/HtmlMediaEvent.as b/files_videoviewer/mediaelement/src/flash/HtmlMediaEvent.as
deleted file mode 100755
index d12c0fedf..000000000
--- a/files_videoviewer/mediaelement/src/flash/HtmlMediaEvent.as
+++ /dev/null
@@ -1,29 +0,0 @@
-package {
-
- public class HtmlMediaEvent {
-
- public static var LOADED_DATA:String = "loadeddata";
- public static var PROGRESS:String = "progress";
- public static var TIMEUPDATE:String = "timeupdate";
- public static var SEEKED:String = "seeked";
- public static var PLAY:String = "play";
- public static var PLAYING:String = "playing";
- public static var PAUSE:String = "pause";
- public static var LOADEDMETADATA:String = "loadedmetadata";
- public static var ENDED:String = "ended";
- public static var VOLUMECHANGE:String = "volumechange";
- public static var STOP:String = "stop";
-
- // new : 2/15/2011
- public static var LOADSTART:String = "loadstart";
- public static var CANPLAY:String = "canplay";
- // new : 3/3/2011
- public static var LOADEDDATA:String = "loadeddata";
-
- // new : 4/12/2011
- public static var SEEKING:String = "seeking";
-
- // new : 1/2/2012
- public static var FULLSCREENCHANGE:String = "fullscreenchange";
- }
-}
diff --git a/files_videoviewer/mediaelement/src/flash/htmlelements/AudioElement.as b/files_videoviewer/mediaelement/src/flash/htmlelements/AudioElement.as
deleted file mode 100755
index 750599d4a..000000000
--- a/files_videoviewer/mediaelement/src/flash/htmlelements/AudioElement.as
+++ /dev/null
@@ -1,332 +0,0 @@
-
-package htmlelements
-{
- import flash.events.Event;
- import flash.events.IOErrorEvent;
- import flash.events.ProgressEvent;
- import flash.events.TimerEvent;
- import flash.media.ID3Info;
- import flash.media.Sound;
- import flash.media.SoundChannel;
- import flash.media.SoundLoaderContext;
- import flash.media.SoundTransform;
- import flash.net.URLRequest;
- import flash.utils.Timer;
-
-
-
- /**
- * ...
- * @author DefaultUser (Tools -> Custom Arguments...)
- */
- public class AudioElement implements IMediaElement
- {
-
- private var _sound:Sound;
- private var _soundTransform:SoundTransform;
- private var _soundChannel:SoundChannel;
- private var _soundLoaderContext:SoundLoaderContext;
-
- private var _volume:Number = 1;
- private var _preMuteVolume:Number = 0;
- private var _isMuted:Boolean = false;
- private var _isPaused:Boolean = true;
- private var _isEnded:Boolean = false;
- private var _isLoaded:Boolean = false;
- private var _currentTime:Number = 0;
- private var _duration:Number = 0;
- private var _bytesLoaded:Number = 0;
- private var _bytesTotal:Number = 0;
- private var _bufferedTime:Number = 0;
- private var _bufferingChanged:Boolean = false;
-
- private var _currentUrl:String = "";
- private var _autoplay:Boolean = true;
- private var _preload:String = "";
-
- private var _element:FlashMediaElement;
- private var _timer:Timer;
- private var _firedCanPlay:Boolean = false;
-
- public function setSize(width:Number, height:Number):void {
- // do nothing!
- }
-
- public function duration():Number {
- return _duration;
- }
-
- public function currentTime():Number {
- return _currentTime;
- }
-
- public function currentProgress():Number {
- return Math.round(_bytesLoaded/_bytesTotal*100);
- }
-
- public function AudioElement(element:FlashMediaElement, autoplay:Boolean, preload:String, timerRate:Number, startVolume:Number)
- {
- _element = element;
- _autoplay = autoplay;
- _volume = startVolume;
- _preload = preload;
-
- _timer = new Timer(timerRate);
- _timer.addEventListener(TimerEvent.TIMER, timerEventHandler);
-
- _soundTransform = new SoundTransform(_volume);
- _soundLoaderContext = new SoundLoaderContext();
- }
-
- // events
- function progressHandler(e:ProgressEvent):void {
-
- _bytesLoaded = e.bytesLoaded;
- _bytesTotal = e.bytesTotal;
-
- // this happens too much to send every time
- //sendEvent(HtmlMediaEvent.PROGRESS);
-
- // so now we just trigger a flag and send with the timer
- _bufferingChanged = true;
- }
-
- function id3Handler(e:Event):void {
- sendEvent(HtmlMediaEvent.LOADEDMETADATA);
-
- try {
- var id3:ID3Info = _sound.id3;
- var obj = {
- type:'id3',
- album:id3.album,
- artist:id3.artist,
- comment:id3.comment,
- genre:id3.genre,
- songName:id3.songName,
- track:id3.track,
- year:id3.year
- }
- } catch (err:Error) {}
-
-
- }
-
- function timerEventHandler(e:TimerEvent) {
- _currentTime = _soundChannel.position/1000;
-
- // calculate duration
- var duration = Math.round(_sound.length * _sound.bytesTotal/_sound.bytesLoaded/100) / 10;
-
- // check to see if the estimated duration changed
- if (_duration != duration && !isNaN(duration)) {
-
- _duration = duration;
- sendEvent(HtmlMediaEvent.LOADEDMETADATA);
- }
-
- // check for progress
- if (_bufferingChanged) {
-
- sendEvent(HtmlMediaEvent.PROGRESS);
-
- _bufferingChanged = false;
- }
-
- // send timeupdate
- sendEvent(HtmlMediaEvent.TIMEUPDATE);
-
- // sometimes the ended event doesn't fire, here's a fake one
- if (_duration > 0 && _currentTime >= _duration-0.2) {
- handleEnded();
- }
- }
-
- function soundCompleteHandler(e:Event) {
- handleEnded();
- }
-
- function handleEnded():void {
- _timer.stop();
- _currentTime = 0;
- _isEnded = true;
-
- sendEvent(HtmlMediaEvent.ENDED);
- }
-
- //events
-
-
- // METHODS
- public function setSrc(url:String):void {
- _currentUrl = url;
- _isLoaded = false;
- }
-
-
- public function load():void {
-
- if (_currentUrl == "")
- return;
-
- _sound = new Sound();
- //sound.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);
- _sound.addEventListener(ProgressEvent.PROGRESS,progressHandler);
- _sound.addEventListener(Event.ID3,id3Handler);
- _sound.load(new URLRequest(_currentUrl));
- _currentTime = 0;
-
- sendEvent(HtmlMediaEvent.LOADSTART);
-
- _isLoaded = true;
-
- sendEvent(HtmlMediaEvent.LOADEDDATA);
- sendEvent(HtmlMediaEvent.CANPLAY);
- _firedCanPlay = true;
-
- if (_playAfterLoading) {
- _playAfterLoading = false;
- play();
- }
- }
-
- private var _playAfterLoading:Boolean= false;
-
- public function play():void {
-
- if (!_isLoaded) {
- _playAfterLoading = true;
- load();
- return;
- }
-
- _timer.stop();
-
- _soundChannel = _sound.play(_currentTime*1000, 0, _soundTransform);
- _soundChannel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
- _soundChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
-
- _timer.start();
-
- didStartPlaying();
- }
-
- public function pause():void {
-
- _timer.stop();
- if (_soundChannel != null) {
- _currentTime = _soundChannel.position/1000;
- _soundChannel.stop();
- }
-
- _isPaused = true;
- sendEvent(HtmlMediaEvent.PAUSE);
- }
-
-
- public function stop():void {
- if (_timer != null) {
- _timer.stop();
- }
- if (_soundChannel != null) {
- _soundChannel.stop();
- _sound.close();
- }
- unload();
- sendEvent(HtmlMediaEvent.STOP);
- }
-
- public function setCurrentTime(pos:Number):void {
- sendEvent(HtmlMediaEvent.SEEKING);
- _timer.stop();
- _currentTime = pos;
- _soundChannel.stop();
- _sound.length
- _soundChannel = _sound.play(_currentTime * 1000, 0, _soundTransform);
- sendEvent(HtmlMediaEvent.SEEKED);
-
- _timer.start();
-
- didStartPlaying();
- }
-
- private function didStartPlaying():void {
- _isPaused = false;
- sendEvent(HtmlMediaEvent.PLAY);
- sendEvent(HtmlMediaEvent.PLAYING);
- if (!_firedCanPlay) {
- sendEvent(HtmlMediaEvent.LOADEDDATA);
- sendEvent(HtmlMediaEvent.CANPLAY);
- _firedCanPlay = true;
- }
- }
-
-
- public function setVolume(volume:Number):void {
-
- _volume = volume;
- _soundTransform.volume = volume;
-
- if (_soundChannel != null) {
- _soundChannel.soundTransform = _soundTransform;
- }
-
- _isMuted = (_volume == 0);
-
- sendEvent(HtmlMediaEvent.VOLUMECHANGE);
- }
-
- public function getVolume():Number {
- if(_isMuted) {
- return 0;
- } else {
- return _volume;
- }
- }
-
-
- public function setMuted(muted:Boolean):void {
-
- // ignore if already set
- if ( (muted && _isMuted) || (!muted && !_isMuted))
- return;
-
- if (muted) {
- _preMuteVolume = _soundTransform.volume;
- setVolume(0);
- } else {
- setVolume(_preMuteVolume);
- }
-
- _isMuted = muted;
- }
-
- public function unload():void {
- _sound = null;
- _isLoaded = false;
- }
-
- private function sendEvent(eventName:String) {
-
- // calculate this to mimic HTML5
- _bufferedTime = _bytesLoaded / _bytesTotal * _duration;
-
- // build JSON
- var values:String = "duration:" + _duration +
- ",currentTime:" + _currentTime +
- ",muted:" + _isMuted +
- ",paused:" + _isPaused +
- ",ended:" + _isEnded +
- ",volume:" + _volume +
- ",src:\"" + _currentUrl + "\"" +
- ",bytesTotal:" + _bytesTotal +
- ",bufferedBytes:" + _bytesLoaded +
- ",bufferedTime:" + _bufferedTime +
- "";
-
- _element.sendEvent(eventName, values);
- }
-
- }
-
-}
-
diff --git a/files_videoviewer/mediaelement/src/flash/htmlelements/IMediaElement.as b/files_videoviewer/mediaelement/src/flash/htmlelements/IMediaElement.as
deleted file mode 100755
index d62660795..000000000
--- a/files_videoviewer/mediaelement/src/flash/htmlelements/IMediaElement.as
+++ /dev/null
@@ -1,35 +0,0 @@
-
-package htmlelements
-{
-
- public interface IMediaElement {
-
- function play():void;
-
- function pause():void;
-
- function load():void;
-
- function stop():void;
-
- function setSrc(url:String):void;
-
- function setSize(width:Number, height:Number):void;
-
- function setCurrentTime(pos:Number):void;
-
- function setVolume(vol:Number):void;
-
- function getVolume():Number;
-
- function setMuted(muted:Boolean):void;
-
- function duration():Number;
-
- function currentTime():Number;
-
- function currentProgress():Number;
-
- }
-
-}
diff --git a/files_videoviewer/mediaelement/src/flash/htmlelements/VideoElement.as b/files_videoviewer/mediaelement/src/flash/htmlelements/VideoElement.as
deleted file mode 100755
index 7673c4f6c..000000000
--- a/files_videoviewer/mediaelement/src/flash/htmlelements/VideoElement.as
+++ /dev/null
@@ -1 +0,0 @@
-package htmlelements { import flash.display.Sprite; import flash.events.*; import flash.net.NetConnection; import flash.net.NetStream; import flash.media.Video; import flash.media.SoundTransform; import flash.utils.Timer; import FlashMediaElement; import HtmlMediaEvent; public class VideoElement extends Sprite implements IMediaElement { private var _currentUrl:String = ""; private var _autoplay:Boolean = true; private var _preload:String = ""; private var _isPreloading:Boolean = false; private var _connection:NetConnection; private var _stream:NetStream; private var _video:Video; private var _element:FlashMediaElement; private var _soundTransform; private var _oldVolume:Number = 1; // event values private var _duration:Number = 0; private var _framerate:Number; private var _isPaused:Boolean = true; private var _isEnded:Boolean = false; private var _volume:Number = 1; private var _isMuted:Boolean = false; private var _bytesLoaded:Number = 0; private var _bytesTotal:Number = 0; private var _bufferedTime:Number = 0; private var _bufferEmpty:Boolean = false; private var _bufferingChanged:Boolean = false; private var _seekOffset:Number = 0; private var _videoWidth:Number = -1; private var _videoHeight:Number = -1; private var _timer:Timer; private var _isRTMP:Boolean = false; private var _streamer:String = ""; private var _isConnected:Boolean = false; private var _playWhenConnected:Boolean = false; private var _hasStartedPlaying:Boolean = false; private var _parentReference:Object; private var _pseudoStreamingEnabled:Boolean = false; private var _pseudoStreamingStartQueryParam:String = "start"; public function setReference(arg:Object):void { _parentReference = arg; } public function setSize(width:Number, height:Number):void { _video.width = width; _video.height = height; } public function setPseudoStreaming(enablePseudoStreaming:Boolean):void { _pseudoStreamingEnabled = enablePseudoStreaming; } public function setPseudoStreamingStartParam(pseudoStreamingStartQueryParam:String):void { _pseudoStreamingStartQueryParam = pseudoStreamingStartQueryParam; } public function get video():Video { return _video; } public function get videoHeight():Number { return _videoHeight; } public function get videoWidth():Number { return _videoWidth; } public function duration():Number { return _duration; } public function currentProgress():Number { if(_stream != null) { return Math.round(_stream.bytesLoaded/_stream.bytesTotal*100); } else { return 0; } } public function currentTime():Number { var currentTime:Number = 0; if (_stream != null) { currentTime = _stream.time; if (_pseudoStreamingEnabled) { currentTime += _seekOffset; } } return currentTime; } // (1) load() // calls _connection.connect(); // waits for NetConnection.Connect.Success // _stream gets created public function VideoElement(element:FlashMediaElement, autoplay:Boolean, preload:String, timerRate:Number, startVolume:Number, streamer:String) { _element = element; _autoplay = autoplay; _volume = startVolume; _preload = preload; _streamer = streamer; _video = new Video(); addChild(_video); _connection = new NetConnection(); _connection.client = { onBWDone: function():void{} }; _connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); _connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); //_connection.connect(null); _timer = new Timer(timerRate); _timer.addEventListener("timer", timerHandler); } private function timerHandler(e:TimerEvent) { _bytesLoaded = _stream.bytesLoaded; _bytesTotal = _stream.bytesTotal; if (!_isPaused) { sendEvent(HtmlMediaEvent.TIMEUPDATE); } //trace("bytes", _bytesLoaded, _bytesTotal); if (_bytesLoaded < _bytesTotal) sendEvent(HtmlMediaEvent.PROGRESS); } // internal events private function netStatusHandler(event:NetStatusEvent):void { trace("netStatus", event.info.code); switch (event.info.code) { case "NetStream.Buffer.Empty": _bufferEmpty = true; _isEnded ? sendEvent(HtmlMediaEvent.ENDED) : null; break; case "NetStream.Buffer.Full": _bytesLoaded = _stream.bytesLoaded; _bytesTotal = _stream.bytesTotal; _bufferEmpty = false; sendEvent(HtmlMediaEvent.PROGRESS); break; case "NetConnection.Connect.Success": connectStream(); break; case "NetStream.Play.StreamNotFound": trace("Unable to locate video"); break; // STREAM case "NetStream.Play.Start": _isPaused = false; sendEvent(HtmlMediaEvent.LOADEDDATA); sendEvent(HtmlMediaEvent.CANPLAY); if (!_isPreloading) { sendEvent(HtmlMediaEvent.PLAY); sendEvent(HtmlMediaEvent.PLAYING); } _timer.start(); break; case "NetStream.Seek.Notify": sendEvent(HtmlMediaEvent.SEEKED); break; case "NetStream.Pause.Notify": _isPaused = true; sendEvent(HtmlMediaEvent.PAUSE); break; case "NetStream.Play.Stop": _isEnded = true; _isPaused = false; _timer.stop(); _bufferEmpty ? sendEvent(HtmlMediaEvent.ENDED) : null; break; } } private function securityErrorHandler(event:SecurityErrorEvent):void { trace("securityErrorHandler: " + event); } private function asyncErrorHandler(event:AsyncErrorEvent):void { // ignore AsyncErrorEvent events. } private function onMetaDataHandler(info:Object):void { // Only set the duration when we first load the video if (_duration == 0) { _duration = info.duration; } _framerate = info.framerate; _videoWidth = info.width; _videoHeight = info.height; // set size? sendEvent(HtmlMediaEvent.LOADEDMETADATA); if (_isPreloading) { _stream.pause(); _isPaused = true; _isPreloading = false; sendEvent(HtmlMediaEvent.PROGRESS); sendEvent(HtmlMediaEvent.TIMEUPDATE); } } // interface members public function setSrc(url:String):void { if (_isConnected && _stream) { // stop and restart _stream.pause(); } _currentUrl = url; _isRTMP = !!_currentUrl.match(/^rtmp(s|t|e|te)?\:\/\//) || _streamer != ""; _isConnected = false; _hasStartedPlaying = false; } public function load():void { // disconnect existing stream and connection if (_isConnected && _stream) { _stream.pause(); _stream.close(); _connection.close(); } _isConnected = false; _isPreloading = false; _isEnded = false; _bufferEmpty = false; // start new connection if (_isRTMP) { var rtmpInfo:Object = parseRTMP(_currentUrl); if (_streamer != "") { rtmpInfo.server = _streamer; rtmpInfo.stream = _currentUrl; } _connection.connect(rtmpInfo.server); } else { _connection.connect(null); } // in a few moments the "NetConnection.Connect.Success" event will fire // and call createConnection which finishes the "load" sequence sendEvent(HtmlMediaEvent.LOADSTART); } private function connectStream():void { trace("connectStream"); _stream = new NetStream(_connection); // explicitly set the sound since it could have come before the connection was made _soundTransform = new SoundTransform(_volume); _stream.soundTransform = _soundTransform; // set the buffer to ensure nice playback _stream.bufferTime = 1; _stream.bufferTimeMax = 3; _stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); // same event as connection _stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); var customClient:Object = new Object(); customClient.onMetaData = onMetaDataHandler; _stream.client = customClient; _video.attachNetStream(_stream); // start downloading without playing )based on preload and play() hasn't been called) // I wish flash had a load() command to make this less awkward if (_preload != "none" && !_playWhenConnected) { _isPaused = true; //stream.bufferTime = 20; _stream.play(getCurrentUrl(0), 0, 0); _stream.pause(); _isPreloading = true; //_stream.pause(); // //sendEvent(HtmlMediaEvent.PAUSE); // have to send this because the "playing" event gets sent via event handlers } _isConnected = true; if (_playWhenConnected && !_hasStartedPlaying) { play(); _playWhenConnected = false; } } public function play():void { if (!_hasStartedPlaying && !_isConnected) { _playWhenConnected = true; load(); return; } if (_hasStartedPlaying) { if (_isPaused) { _stream.resume(); _timer.start(); _isPaused = false; sendEvent(HtmlMediaEvent.PLAY); sendEvent(HtmlMediaEvent.PLAYING); } } else { if (_isRTMP) { var rtmpInfo:Object = parseRTMP(_currentUrl); _stream.play(rtmpInfo.stream); } else { _stream.play(getCurrentUrl(0)); } _timer.start(); _isPaused = false; _hasStartedPlaying = true; // don't toss play/playing events here, because we haven't sent a // canplay / loadeddata event yet. that'll be handled in the net // event listener } } public function pause():void { if (_stream == null) return; _stream.pause(); _isPaused = true; if (_bytesLoaded == _bytesTotal) { _timer.stop(); } _isPaused = true; sendEvent(HtmlMediaEvent.PAUSE); } public function stop():void { if (_stream == null) return; _stream.close(); _isPaused = false; _timer.stop(); sendEvent(HtmlMediaEvent.STOP); } public function setCurrentTime(pos:Number):void { if (_stream == null) { return; } // Calculate the position of the buffered video var bufferPosition:Number = _bytesLoaded / _bytesTotal * _duration; if (_pseudoStreamingEnabled) { sendEvent(HtmlMediaEvent.SEEKING); // Normal seek if it is in buffer and this is the first seek if (pos < bufferPosition && _seekOffset == 0) { _stream.seek(pos); } else { // Uses server-side pseudo-streaming to seek _stream.play(getCurrentUrl(pos)); _seekOffset = pos; } } else { sendEvent(HtmlMediaEvent.SEEKING); _stream.seek(pos); } if (!_isEnded) { sendEvent(HtmlMediaEvent.TIMEUPDATE); } } public function setVolume(volume:Number):void { if (_stream != null) { _soundTransform = new SoundTransform(volume); _stream.soundTransform = _soundTransform; } _volume = volume; _isMuted = (_volume == 0); sendEvent(HtmlMediaEvent.VOLUMECHANGE); } public function getVolume():Number { if(_isMuted) { return 0; } else { return _volume; } } public function setMuted(muted:Boolean):void { if (_isMuted == muted) return; if (muted) { _oldVolume = (_stream == null) ? _oldVolume : _stream.soundTransform.volume; setVolume(0); } else { setVolume(_oldVolume); } _isMuted = muted; } private function sendEvent(eventName:String) { // calculate this to mimic HTML5 _bufferedTime = _bytesLoaded / _bytesTotal * _duration; // build JSON var values:String = "duration:" + _duration + ",framerate:" + _framerate + ",currentTime:" + currentTime() + ",muted:" + _isMuted + ",paused:" + _isPaused + ",ended:" + _isEnded + ",volume:" + _volume + ",src:\"" + _currentUrl + "\"" + ",bytesTotal:" + _bytesTotal + ",bufferedBytes:" + _bytesLoaded + ",bufferedTime:" + _bufferedTime + ",videoWidth:" + _videoWidth + ",videoHeight:" + _videoHeight + ""; _element.sendEvent(eventName, values); } private function parseRTMP(url:String) { var match:Array = url.match(/(.*)\/((flv|mp4|mp3):.*)/); var rtmpInfo:Object = { server: null, stream: null }; if (match) { rtmpInfo.server = match[1]; rtmpInfo.stream = match[2]; } else { rtmpInfo.server = url.replace(/\/[^\/]+$/,"/"); rtmpInfo.stream = url.split("/").pop(); } trace("parseRTMP - server: " + rtmpInfo.server + " stream: " + rtmpInfo.stream); return rtmpInfo; } private function getCurrentUrl(pos:Number):String { var url:String = _currentUrl; if (_pseudoStreamingEnabled) { if (url.indexOf('?') > -1) { url = url + '&' + _pseudoStreamingStartQueryParam + '=' + pos; } else { url = url + '?' + _pseudoStreamingStartQueryParam + '=' + pos; } } return url; } } } \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/flash/htmlelements/YouTubeElement.as b/files_videoviewer/mediaelement/src/flash/htmlelements/YouTubeElement.as
deleted file mode 100755
index 692a42621..000000000
--- a/files_videoviewer/mediaelement/src/flash/htmlelements/YouTubeElement.as
+++ /dev/null
@@ -1,403 +0,0 @@
-package htmlelements
-{
- import flash.display.Sprite;
- import flash.events.*;
- import flash.net.NetConnection;
- import flash.net.NetStream;
- import flash.media.Video;
- import flash.media.SoundTransform;
- import flash.utils.Timer;
- import flash.net.URLLoader;
- import flash.net.URLRequest;
- import flash.net.URLVariables;
- import flash.net.URLRequestMethod;
- import flash.display.MovieClip;
- import flash.display.Loader;
- import flash.display.DisplayObject;
-
-
-
- import FlashMediaElement;
- import HtmlMediaEvent;
-
- public class YouTubeElement extends Sprite implements IMediaElement
- {
- private var _currentUrl:String = "";
- private var _autoplay:Boolean = true;
- private var _preload:String = "";
-
- private var _element:FlashMediaElement;
-
- // event values
- private var _currentTime:Number = 0;
- private var _duration:Number = 0;
- private var _framerate:Number;
- private var _isPaused:Boolean = true;
- private var _isEnded:Boolean = false;
- private var _volume:Number = 1;
- private var _isMuted:Boolean = false;
-
- private var _bytesLoaded:Number = 0;
- private var _bytesTotal:Number = 0;
- private var _bufferedTime:Number = 0;
- private var _bufferEmpty:Boolean = false;
-
- private var _videoWidth:Number = -1;
- private var _videoHeight:Number = -1;
-
- private var _timer:Timer;
-
- // YouTube stuff
- private var _playerLoader:Loader;
- private var _player:Object = null;
- private var _playerIsLoaded:Boolean = false;
- private var _youTubeId:String = "";
-
- //http://code.google.com/p/gdata-samples/source/browse/trunk/ytplayer/actionscript3/com/google/youtube/examples/AS3Player.as
- private static const WIDESCREEN_ASPECT_RATIO:String = "widescreen";
- private static const QUALITY_TO_PLAYER_WIDTH:Object = {
- small: 320,
- medium: 640,
- large: 854,
- hd720: 1280
- };
- private static const STATE_ENDED:Number = 0;
- private static const STATE_PLAYING:Number = 1;
- private static const STATE_PAUSED:Number = 2;
- private static const STATE_CUED:Number = 5;
-
-
- public function get player():DisplayObject {
- return _player;
- }
-
- public function setSize(width:Number, height:Number):void {
- if (_player != null) {
- _player.setSize(width, height);
- } else {
- initHeight = height;
- initWidth = width;
- }
- }
-
- public function get videoHeight():Number {
- return _videoHeight;
- }
-
- public function get videoWidth():Number {
- return _videoWidth;
- }
-
-
- public function duration():Number {
- return _duration;
- }
-
- public function currentProgress():Number {
- if(_bytesTotal> 0) {
- return Math.round(_bytesLoaded/_bytesTotal*100);
- } else {
- return 0;
- }
- }
-
- public function currentTime():Number {
- return _currentTime;
- }
-
-
- public var initHeight:Number;
- public var initWidth:Number;
-
- // (1) load()
- // calls _connection.connect();
- // waits for NetConnection.Connect.Success
- // _stream gets created
-
- private var _isChromeless:Boolean = false;
-
-
- public function YouTubeElement(element:FlashMediaElement, autoplay:Boolean, preload:String, timerRate:Number, startVolume:Number)
- {
- _element = element;
- _autoplay = autoplay;
- _volume = startVolume;
- _preload = preload;
- initHeight = 0;
- initWidth = 0;
-
- _playerLoader = new Loader();
- _playerLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, playerLoaderInitHandler);
-
- // chromeless
- if (_isChromeless) {
- _playerLoader.load(new URLRequest("//www.youtube.com/apiplayer?version=3&controls=1&rel=0&showinfo=0&iv_load_policy=1"));
- }
-
-
- _timer = new Timer(timerRate);
- _timer.addEventListener("timer", timerHandler);
- _timer.start();
- }
-
- private function playerLoaderInitHandler(event:Event):void {
-
- trace("yt player init");
-
- _element.addChild(_playerLoader.content);
- _element.setControlDepth();
- _playerLoader.content.addEventListener("onReady", onPlayerReady);
- _playerLoader.content.addEventListener("onError", onPlayerError);
- _playerLoader.content.addEventListener("onStateChange", onPlayerStateChange);
- _playerLoader.content.addEventListener("onPlaybackQualityChange", onVideoPlaybackQualityChange);
- }
-
- private function onPlayerReady(event:Event):void {
- _playerIsLoaded = true;
-
- _player = _playerLoader.content;
-
- if (initHeight > 0 && initWidth > 0)
- _player.setSize(initWidth, initHeight);
-
- if (_youTubeId != "") { // && _isChromeless) {
- if (_autoplay) {
- player.loadVideoById(_youTubeId);
- } else {
- player.cueVideoById(_youTubeId);
- }
- _timer.start();
- }
- }
-
- private function onPlayerError(event:Event):void {
- // trace("Player error:", Object(event).data);
- }
-
- private function onPlayerStateChange(event:Event):void {
- trace("State is", Object(event).data);
-
- _duration = _player.getDuration();
-
- switch (Object(event).data) {
- case STATE_ENDED:
- _isEnded = true;
- _isPaused = false;
-
- sendEvent(HtmlMediaEvent.ENDED);
-
- break;
-
- case STATE_PLAYING:
- _isEnded = false;
- _isPaused = false;
-
- sendEvent(HtmlMediaEvent.PLAY);
- sendEvent(HtmlMediaEvent.PLAYING);
- break;
-
- case STATE_PAUSED:
- _isEnded = false;
- _isPaused = true;
-
- sendEvent(HtmlMediaEvent.PAUSE);
-
- break;
-
- case STATE_CUED:
- sendEvent(HtmlMediaEvent.CANPLAY);
-
- // resize?
-
- break;
- }
- }
-
- private function onVideoPlaybackQualityChange(event:Event):void {
- trace("Current video quality:", Object(event).data);
- //resizePlayer(Object(event).data);
- }
-
- private function timerHandler(e:TimerEvent) {
-
- if (_playerIsLoaded) {
- _bytesLoaded = _player.getVideoBytesLoaded();
- _bytesTotal = _player.getVideoBytesTotal();
- _currentTime = player.getCurrentTime();
-
- if (!_isPaused)
- sendEvent(HtmlMediaEvent.TIMEUPDATE);
-
- if (_bytesLoaded < _bytesTotal)
- sendEvent(HtmlMediaEvent.PROGRESS);
- }
-
- }
-
- private function getYouTubeId(url:String):String {
- // http://www.youtube.com/watch?feature=player_embedded&v=yyWWXSwtPP0
- // http://www.youtube.com/v/VIDEO_ID?version=3
- // http://youtu.be/Djd6tPrxc08
-
- url = unescape(url);
-
- var youTubeId:String = "";
-
- if (url.indexOf("?") > 0) {
- // assuming: http://www.youtube.com/watch?feature=player_embedded&v=yyWWXSwtPP0
- youTubeId = getYouTubeIdFromParam(url);
-
- // if it's http://www.youtube.com/v/VIDEO_ID?version=3
- if (youTubeId == "") {
- youTubeId = getYouTubeIdFromUrl(url);
- }
- } else {
- youTubeId = getYouTubeIdFromUrl(url);
- }
-
- return youTubeId;
- }
-
- // http://www.youtube.com/watch?feature=player_embedded&v=yyWWXSwtPP0
- private function getYouTubeIdFromParam(url:String):String {
-
-
- var youTubeId:String = "";
- var parts:Array = url.split('?');
- var parameters:Array = parts[1].split('&');
-
- for (var i:Number=0; i<parameters.length; i++) {
- var paramParts = parameters[i].split('=');
- if (paramParts[0] == "v") {
-
- youTubeId = paramParts[1];
- break;
- }
-
- }
-
-
- return youTubeId;
- }
-
-
- // http://www.youtube.com/v/VIDEO_ID?version=3
- // http://youtu.be/Djd6tPrxc08
- private function getYouTubeIdFromUrl(url:String):String {
-
-
- var youTubeId:String = "";
-
- // remove any querystring elements
- var parts:Array = url.split('?');
- url = parts[0];
-
- youTubeId = url.substring(url.lastIndexOf("/")+1);
-
- return youTubeId;
- }
-
-
- // interface members
- public function setSrc(url:String):void {
- trace("yt setSrc()" + url );
-
- _currentUrl = url;
-
- _youTubeId = getYouTubeId(url);
-
- if (!_playerIsLoaded && !_isChromeless) {
- _playerLoader.load(new URLRequest("//www.youtube.com/v/" + _youTubeId + "?version=3&controls=0&rel=0&showinfo=0&iv_load_policy=1"));
- }
- }
-
-
-
-
- public function load():void {
- // do nothing
- trace("yt load()");
-
- if (_playerIsLoaded) {
- player.loadVideoById(_youTubeId);
- _timer.start();
- } else {
- /*
- if (!_isChromless && _youTubeId != "") {
- _playerLoader.load(new URLRequest("http://www.youtube.com/v/" + _youTubeId + "?version=3&controls=0&rel=0&showinfo=0&iv_load_policy=1"));
- }
- */
- }
- }
-
- public function play():void {
- if (_playerIsLoaded) {
- _player.playVideo();
- }
-
- }
-
- public function pause():void {
- if (_playerIsLoaded) {
- _player.pauseVideo();
- }
- }
-
- public function stop():void {
- if (_playerIsLoaded) {
- _player.pauseVideo();
- }
- }
-
- public function setCurrentTime(pos:Number):void {
- //_player.seekTo(pos, false);
- _player.seekTo(pos, true); // works in all places now
- }
-
- public function setVolume(volume:Number):void {
- _player.setVolume(volume*100);
- _volume = volume;
- }
-
- public function getVolume():Number {
- return _player.getVolume()*100;
- }
-
- public function setMuted(muted:Boolean):void {
- if (muted) {
- _player.mute();
-
- } else {
- _player.unMute();
- }
- _muted = _player.isMuted();
- sendEvent(HtmlMediaEvent.VOLUMECHANGE);
- }
-
-
- private function sendEvent(eventName:String) {
-
- // calculate this to mimic HTML5
- _bufferedTime = _bytesLoaded / _bytesTotal * _duration;
-
- // build JSON
- var values:String =
- "duration:" + _duration +
- ",framerate:" + _framerate +
- ",currentTime:" + _currentTime +
- ",muted:" + _isMuted +
- ",paused:" + _isPaused +
- ",ended:" + _isEnded +
- ",volume:" + _volume +
- ",src:\"" + _currentUrl + "\"" +
- ",bytesTotal:" + _bytesTotal +
- ",bufferedBytes:" + _bytesLoaded +
- ",bufferedTime:" + _bufferedTime +
- ",videoWidth:" + _videoWidth +
- ",videoHeight:" + _videoHeight +
- "";
-
- _element.sendEvent(eventName, values);
- }
- }
-}
diff --git a/files_videoviewer/mediaelement/src/js/jeesh-extras.js b/files_videoviewer/mediaelement/src/js/jeesh-extras.js
deleted file mode 100755
index 7e662791a..000000000
--- a/files_videoviewer/mediaelement/src/js/jeesh-extras.js
+++ /dev/null
@@ -1,49 +0,0 @@
-(function($) {
-
- // borrowed from jQuery (no deep, bad fake object detection)
- $.ender({extend: function() {
- var options, name, src, copy,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length;
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && typeof target !== "function" ) {
- target = {};
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
- }});
-
- // outerWidth
- $.ender({outerWidth: function(margin) {
- var fp = parseFloat;
- return fp(this.width())
- + (margin ? fp(this.css('margin-left')) + fp(this.css('margin-right')) : 0)
- + fp(this.css('padding-left'))+ fp(this.css('padding-right'))
- + fp(this.css('border-left-width')) + fp(this.css('border-right-width'))
- ;
- }}, true);
-
-})(ender);
diff --git a/files_videoviewer/mediaelement/src/js/jeesh.js b/files_videoviewer/mediaelement/src/js/jeesh.js
deleted file mode 100755
index 42e3e43db..000000000
--- a/files_videoviewer/mediaelement/src/js/jeesh.js
+++ /dev/null
@@ -1,1578 +0,0 @@
-/*!
- * Ender: open module JavaScript framework
- * copyright Dustin Diaz & Jacob Thornton 2011 (@ded @fat)
- * https://ender.no.de
- * License MIT
- * Build: ender build jeesh --output jeesh
- */
-!function (context) {
-
- function aug(o, o2) {
- for (var k in o2) {
- k != 'noConflict' && k != '_VERSION' && (o[k] = o2[k]);
- }
- return o;
- }
-
- function boosh(s, r, els) {
- // string || node || nodelist || window
- if (ender._select && (typeof s == 'string' || s.nodeName || s.length && 'item' in s || s == window)) {
- els = ender._select(s, r);
- els.selector = s;
- } else {
- els = isFinite(s.length) ? s : [s];
- }
- return aug(els, boosh);
- }
-
- function ender(s, r) {
- return boosh(s, r);
- }
-
- aug(ender, {
- _VERSION: '0.2.4',
- ender: function (o, chain) {
- aug(chain ? boosh : ender, o);
- },
- fn: context.$ && context.$.fn || {} // for easy compat to jQuery plugins
- });
-
- aug(boosh, {
- forEach: function (fn, scope, i) {
- // opt out of native forEach so we can intentionally call our own scope
- // defaulting to the current item and be able to return self
- for (i = 0, l = this.length; i < l; ++i) {
- i in this && fn.call(scope || this[i], this[i], i, this);
- }
- // return self for chaining
- return this;
- },
- $: ender // handy reference to self
- });
-
- var old = context.$;
- ender.noConflict = function () {
- context.$ = old;
- return this;
- };
-
- (typeof module !== 'undefined') && module.exports && (module.exports = ender);
- // use subscript notation as extern for Closure compilation
- context['ender'] = context['$'] = ender;
-
-}(this);
-/*!
- * bean.js - copyright Jacob Thornton 2011
- * https://github.com/fat/bean
- * MIT License
- * special thanks to:
- * dean edwards: http://dean.edwards.name/
- * dperini: https://github.com/dperini/nwevents
- * the entire mootools team: github.com/mootools/mootools-core
- */
-!function (context) {
- var __uid = 1, registry = {}, collected = {},
- overOut = /over|out/,
- namespace = /[^\.]*(?=\..*)\.|.*/,
- stripName = /\..*/,
- addEvent = 'addEventListener',
- attachEvent = 'attachEvent',
- removeEvent = 'removeEventListener',
- detachEvent = 'detachEvent',
- doc = context.document || {},
- root = doc.documentElement || {},
- W3C_MODEL = root[addEvent],
- eventSupport = W3C_MODEL ? addEvent : attachEvent,
-
- isDescendant = function (parent, child) {
- var node = child.parentNode;
- while (node != null) {
- if (node == parent) {
- return true;
- }
- node = node.parentNode;
- }
- },
-
- retrieveUid = function (obj, uid) {
- return (obj.__uid = uid || obj.__uid || __uid++);
- },
-
- retrieveEvents = function (element) {
- var uid = retrieveUid(element);
- return (registry[uid] = registry[uid] || {});
- },
-
- listener = W3C_MODEL ? function (element, type, fn, add) {
- element[add ? addEvent : removeEvent](type, fn, false);
- } : function (element, type, fn, add, custom) {
- custom && add && (element['_on' + custom] = element['_on' + custom] || 0);
- element[add ? attachEvent : detachEvent]('on' + type, fn);
- },
-
- nativeHandler = function (element, fn, args) {
- return function (event) {
- event = fixEvent(event || ((this.ownerDocument || this.document || this).parentWindow || context).event);
- return fn.apply(element, [event].concat(args));
- };
- },
-
- customHandler = function (element, fn, type, condition, args) {
- return function (event) {
- if (condition ? condition.call(this, event) : W3C_MODEL ? true : event && event.propertyName == '_on' + type || !event) {
- fn.apply(element, [event].concat(args));
- }
- };
- },
-
- addListener = function (element, orgType, fn, args) {
- var type = orgType.replace(stripName, ''),
- events = retrieveEvents(element),
- handlers = events[type] || (events[type] = {}),
- uid = retrieveUid(fn, orgType.replace(namespace, ''));
- if (handlers[uid]) {
- return element;
- }
- var custom = customEvents[type];
- if (custom) {
- fn = custom.condition ? customHandler(element, fn, type, custom.condition) : fn;
- type = custom.base || type;
- }
- var isNative = nativeEvents[type];
- fn = isNative ? nativeHandler(element, fn, args) : customHandler(element, fn, type, false, args);
- isNative = W3C_MODEL || isNative;
- if (type == 'unload') {
- var org = fn;
- fn = function () {
- removeListener(element, type, fn) && org();
- };
- }
- element[eventSupport] && listener(element, isNative ? type : 'propertychange', fn, true, !isNative && type);
- handlers[uid] = fn;
- fn.__uid = uid;
- return type == 'unload' ? element : (collected[retrieveUid(element)] = element);
- },
-
- removeListener = function (element, orgType, handler) {
- var uid, names, uids, i, events = retrieveEvents(element), type = orgType.replace(stripName, '');
- if (!events || !events[type]) {
- return element;
- }
- names = orgType.replace(namespace, '');
- uids = names ? names.split('.') : [handler.__uid];
- for (i = uids.length; i--;) {
- uid = uids[i];
- handler = events[type][uid];
- delete events[type][uid];
- if (element[eventSupport]) {
- type = customEvents[type] ? customEvents[type].base : type;
- var isNative = W3C_MODEL || nativeEvents[type];
- listener(element, isNative ? type : 'propertychange', handler, false, !isNative && type);
- }
- }
- return element;
- },
-
- del = function (selector, fn, $) {
- return function (e) {
- var array = typeof selector == 'string' ? $(selector, this) : selector;
- for (var target = e.target; target && target != this; target = target.parentNode) {
- for (var i = array.length; i--;) {
- if (array[i] == target) {
- return fn.apply(target, arguments);
- }
- }
- }
- };
- },
-
- add = function (element, events, fn, delfn, $) {
- if (typeof events == 'object' && !fn) {
- for (var type in events) {
- events.hasOwnProperty(type) && add(element, type, events[type]);
- }
- } else {
- var isDel = typeof fn == 'string', types = (isDel ? fn : events).split(' ');
- fn = isDel ? del(events, delfn, $) : fn;
- for (var i = types.length; i--;) {
- addListener(element, types[i], fn, Array.prototype.slice.call(arguments, isDel ? 4 : 3));
- }
- }
- return element;
- },
-
- remove = function (element, orgEvents, fn) {
- var k, type, events, i,
- isString = typeof(orgEvents) == 'string',
- names = isString && orgEvents.replace(namespace, ''),
- rm = removeListener,
- attached = retrieveEvents(element);
- if (isString && /\s/.test(orgEvents)) {
- orgEvents = orgEvents.split(' ');
- i = orgEvents.length - 1;
- while (remove(element, orgEvents[i]) && i--) {}
- return element;
- }
- events = isString ? orgEvents.replace(stripName, '') : orgEvents;
- if (!attached || (isString && !attached[events])) {
- return element;
- }
- if (typeof fn == 'function') {
- rm(element, events, fn);
- } else if (names) {
- rm(element, orgEvents);
- } else {
- rm = events ? rm : remove;
- type = isString && events;
- events = events ? (fn || attached[events] || events) : attached;
- for (k in events) {
- events.hasOwnProperty(k) && rm(element, type || k, events[k]);
- }
- }
- return element;
- },
-
- fire = function (element, type, args) {
- var evt, k, i, types = type.split(' ');
- for (i = types.length; i--;) {
- type = types[i].replace(stripName, '');
- var isNative = nativeEvents[type],
- isNamespace = types[i].replace(namespace, ''),
- handlers = retrieveEvents(element)[type];
- if (isNamespace) {
- isNamespace = isNamespace.split('.');
- for (k = isNamespace.length; k--;) {
- handlers[isNamespace[k]] && handlers[isNamespace[k]].apply(element, args);
- }
- } else if (!args && element[eventSupport]) {
- fireListener(isNative, type, element);
- } else {
- for (k in handlers) {
- handlers.hasOwnProperty(k) && handlers[k].apply(element, args);
- }
- }
- }
- return element;
- },
-
- fireListener = W3C_MODEL ? function (isNative, type, element) {
- evt = document.createEvent(isNative ? "HTMLEvents" : "UIEvents");
- evt[isNative ? 'initEvent' : 'initUIEvent'](type, true, true, context, 1);
- element.dispatchEvent(evt);
- } : function (isNative, type, element) {
- isNative ? element.fireEvent('on' + type, document.createEventObject()) : element['_on' + type]++;
- },
-
- clone = function (element, from, type) {
- var events = retrieveEvents(from), obj, k;
- obj = type ? events[type] : events;
- for (k in obj) {
- obj.hasOwnProperty(k) && (type ? add : clone)(element, type || from, type ? obj[k] : k);
- }
- return element;
- },
-
- fixEvent = function (e) {
- var result = {};
- if (!e) {
- return result;
- }
- var type = e.type, target = e.target || e.srcElement;
- result.preventDefault = fixEvent.preventDefault(e);
- result.stopPropagation = fixEvent.stopPropagation(e);
- result.target = target && target.nodeType == 3 ? target.parentNode : target;
- if (~type.indexOf('key')) {
- result.keyCode = e.which || e.keyCode;
- } else if ((/click|mouse|menu/i).test(type)) {
- result.rightClick = e.which == 3 || e.button == 2;
- result.pos = { x: 0, y: 0 };
- if (e.pageX || e.pageY) {
- result.clientX = e.pageX;
- result.clientY = e.pageY;
- } else if (e.clientX || e.clientY) {
- result.clientX = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
- result.clientY = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
- }
- overOut.test(type) && (result.relatedTarget = e.relatedTarget || e[(type == 'mouseover' ? 'from' : 'to') + 'Element']);
- }
- for (var k in e) {
- if (!(k in result)) {
- result[k] = e[k];
- }
- }
- return result;
- };
-
- fixEvent.preventDefault = function (e) {
- return function () {
- if (e.preventDefault) {
- e.preventDefault();
- }
- else {
- e.returnValue = false;
- }
- };
- };
-
- fixEvent.stopPropagation = function (e) {
- return function () {
- if (e.stopPropagation) {
- e.stopPropagation();
- } else {
- e.cancelBubble = true;
- }
- };
- };
-
- var nativeEvents = { click: 1, dblclick: 1, mouseup: 1, mousedown: 1, contextmenu: 1, //mouse buttons
- mousewheel: 1, DOMMouseScroll: 1, //mouse wheel
- mouseover: 1, mouseout: 1, mousemove: 1, selectstart: 1, selectend: 1, //mouse movement
- keydown: 1, keypress: 1, keyup: 1, //keyboard
- orientationchange: 1, // mobile
- touchstart: 1, touchmove: 1, touchend: 1, touchcancel: 1, // touch
- gesturestart: 1, gesturechange: 1, gestureend: 1, // gesture
- focus: 1, blur: 1, change: 1, reset: 1, select: 1, submit: 1, //form elements
- load: 1, unload: 1, beforeunload: 1, resize: 1, move: 1, DOMContentLoaded: 1, readystatechange: 1, //window
- error: 1, abort: 1, scroll: 1 }; //misc
-
- function check(event) {
- var related = event.relatedTarget;
- if (!related) {
- return related == null;
- }
- return (related != this && related.prefix != 'xul' && !/document/.test(this.toString()) && !isDescendant(this, related));
- }
-
- var customEvents = {
- mouseenter: { base: 'mouseover', condition: check },
- mouseleave: { base: 'mouseout', condition: check },
- mousewheel: { base: /Firefox/.test(navigator.userAgent) ? 'DOMMouseScroll' : 'mousewheel' }
- };
-
- var bean = { add: add, remove: remove, clone: clone, fire: fire };
-
- var clean = function (el) {
- var uid = remove(el).__uid;
- if (uid) {
- delete collected[uid];
- delete registry[uid];
- }
- };
-
- if (context[attachEvent]) {
- add(context, 'unload', function () {
- for (var k in collected) {
- collected.hasOwnProperty(k) && clean(collected[k]);
- }
- context.CollectGarbage && CollectGarbage();
- });
- }
-
- var oldBean = context.bean;
- bean.noConflict = function () {
- context.bean = oldBean;
- return this;
- };
-
- (typeof module !== 'undefined' && module.exports) ?
- (module.exports = bean) :
- (context['bean'] = bean);
-
-}(this);!function ($) {
- var b = bean.noConflict(),
- integrate = function (method, type, method2) {
- var _args = type ? [type] : [];
- return function () {
- for (var args, i = 0, l = this.length; i < l; i++) {
- args = [this[i]].concat(_args, Array.prototype.slice.call(arguments, 0));
- args.length == 4 && args.push($);
- !arguments.length && method == 'add' && type && (method = 'fire');
- b[method].apply(this, args);
- }
- return this;
- };
- };
-
- var add = integrate('add'),
- remove = integrate('remove'),
- fire = integrate('fire');
-
- var methods = {
-
- on: add,
- addListener: add,
- bind: add,
- listen: add,
- delegate: add,
-
- unbind: remove,
- unlisten: remove,
- removeListener: remove,
- undelegate: remove,
-
- emit: fire,
- trigger: fire,
-
- cloneEvents: integrate('clone'),
-
- hover: function (enter, leave, i) { // i for internal
- for (i = this.length; i--;) {
- b.add.call(this, this[i], 'mouseenter', enter);
- b.add.call(this, this[i], 'mouseleave', leave);
- }
- return this;
- }
- };
-
- var i, shortcuts = [
- 'blur', 'change', 'click', 'dblclick', 'error', 'focus', 'focusin',
- 'focusout', 'keydown', 'keypress', 'keyup', 'load', 'mousedown',
- 'mouseenter', 'mouseleave', 'mouseout', 'mouseover', 'mouseup', 'mousemove',
- 'resize', 'scroll', 'select', 'submit', 'unload'
- ];
-
- for (i = shortcuts.length; i--;) {
- methods[shortcuts[i]] = integrate('add', shortcuts[i]);
- }
-
- $.ender(methods, true);
-}(ender);
-/*!
- * bonzo.js - copyright @dedfat 2011
- * https://github.com/ded/bonzo
- * Follow our software http://twitter.com/dedfat
- * MIT License
- */
-!function (context, win) {
-
- var doc = context.document,
- html = doc.documentElement,
- parentNode = 'parentNode',
- query = null,
- byTag = 'getElementsByTagName',
- specialAttributes = /^checked|value|selected$/,
- specialTags = /select|fieldset|table|tbody|tfoot|td|tr|colgroup/i,
- table = 'table',
- tagMap = { thead: table, tbody: table, tfoot: table, tr: 'tbody', th: 'tr', td: 'tr', fieldset: 'form', option: 'select' },
- stateAttributes = /^checked|selected$/,
- ie = /msie/i.test(navigator.userAgent),
- uidList = [],
- uuids = 0,
- digit = /^-?[\d\.]+$/,
- px = 'px',
- // commonly used methods
- setAttribute = 'setAttribute',
- getAttribute = 'getAttribute',
- trimReplace = /(^\s*|\s*$)/g,
- unitless = { lineHeight: 1, zoom: 1, zIndex: 1, opacity: 1 };
-
- function classReg(c) {
- return new RegExp("(^|\\s+)" + c + "(\\s+|$)");
- }
-
- function each(ar, fn, scope) {
- for (var i = 0, l = ar.length; i < l; i++) {
- fn.call(scope || ar[i], ar[i], i, ar);
- }
- return ar;
- }
-
- var trim = String.prototype.trim ?
- function (s) {
- return s.trim();
- } :
- function (s) {
- return s.replace(trimReplace, '');
- };
-
- function camelize(s) {
- return s.replace(/-(.)/g, function (m, m1) {
- return m1.toUpperCase();
- });
- }
-
- function is(node) {
- return node && node.nodeName && node.nodeType == 1;
- }
-
- function some(ar, fn, scope) {
- for (var i = 0, j = ar.length; i < j; ++i) {
- if (fn.call(scope, ar[i], i, ar)) {
- return true;
- }
- }
- return false;
- }
-
- var getStyle = doc.defaultView && doc.defaultView.getComputedStyle ?
- function (el, property) {
- var value = null;
- if (property == 'float') {
- property = 'cssFloat';
- }
- var computed = doc.defaultView.getComputedStyle(el, '');
- computed && (value = computed[camelize(property)]);
- return el.style[property] || value;
-
- } : (ie && html.currentStyle) ?
-
- function (el, property) {
- property = camelize(property);
- property = property == 'float' ? 'styleFloat' : property;
-
- if (property == 'opacity') {
- var val = 100;
- try {
- val = el.filters['DXImageTransform.Microsoft.Alpha'].opacity;
- } catch (e1) {
- try {
- val = el.filters('alpha').opacity;
- } catch (e2) {}
- }
- return val / 100;
- }
- var value = el.currentStyle ? el.currentStyle[property] : null;
- return el.style[property] || value;
- } :
-
- function (el, property) {
- return el.style[camelize(property)];
- };
-
- function insert(target, host, fn) {
- var i = 0, self = host || this, r = [],
- nodes = query && typeof target == 'string' && target.charAt(0) != '<' ? function (n) {
- return (n = query(target)) && (n.selected = 1) && n;
- }() : target;
- each(normalize(nodes), function (t) {
- each(self, function (el) {
- var n = !el[parentNode] || (el[parentNode] && !el[parentNode][parentNode]) ?
- function () {
- var c = el.cloneNode(true);
- self.$ && self.cloneEvents && self.$(c).cloneEvents(el);
- return c;
- }() :
- el;
- fn(t, n);
- r[i] = n;
- i++;
- });
- }, this);
- each(r, function (e, i) {
- self[i] = e;
- });
- self.length = i;
- return self;
- }
-
- function xy(el, x, y) {
- var $el = bonzo(el),
- style = $el.css('position'),
- offset = $el.offset(),
- rel = 'relative',
- isRel = style == rel,
- delta = [parseInt($el.css('left'), 10), parseInt($el.css('top'), 10)];
-
- if (style == 'static') {
- $el.css('position', rel);
- style = rel;
- }
-
- isNaN(delta[0]) && (delta[0] = isRel ? 0 : el.offsetLeft);
- isNaN(delta[1]) && (delta[1] = isRel ? 0 : el.offsetTop);
-
- x !== null && (el.style.left = x - offset.left + delta[0] + 'px');
- y !== null && (el.style.top = y - offset.top + delta[1] + 'px');
-
- }
-
- function Bonzo(elements) {
- this.length = 0;
- if (elements) {
- elements = typeof elements !== 'string' &&
- !elements.nodeType &&
- typeof elements.length !== 'undefined' ?
- elements :
- [elements];
- this.length = elements.length;
- for (var i = 0; i < elements.length; i++) {
- this[i] = elements[i];
- }
- }
- }
-
- Bonzo.prototype = {
-
- each: function (fn, scope) {
- return each(this, fn, scope);
- },
-
- map: function (fn, reject) {
- var m = [], n, i;
- for (i = 0; i < this.length; i++) {
- n = fn.call(this, this[i]);
- reject ? (reject(n) && m.push(n)) : m.push(n);
- }
- return m;
- },
-
- first: function () {
- return bonzo(this[0]);
- },
-
- last: function () {
- return bonzo(this[this.length - 1]);
- },
-
- html: function (h, text) {
- var method = text ?
- html.textContent == null ?
- 'innerText' :
- 'textContent' :
- 'innerHTML', m;
- function append(el) {
- while (el.firstChild) {
- el.removeChild(el.firstChild);
- }
- each(normalize(h), function (node) {
- el.appendChild(node);
- });
- }
- return typeof h !== 'undefined' ?
- this.each(function (el) {
- (m = el.tagName.match(specialTags)) ?
- append(el, m[0]) :
- (el[method] = h);
- }) :
- this[0] ? this[0][method] : '';
- },
-
- text: function (text) {
- return this.html(text, 1);
- },
-
- addClass: function (c) {
- return this.each(function (el) {
- this.hasClass(el, c) || (el.className = trim(el.className + ' ' + c));
- }, this);
- },
-
- removeClass: function (c) {
- return this.each(function (el) {
- this.hasClass(el, c) && (el.className = trim(el.className.replace(classReg(c), ' ')));
- }, this);
- },
-
- hasClass: function (el, c) {
- return typeof c == 'undefined' ?
- some(this, function (i) {
- return classReg(el).test(i.className);
- }) :
- classReg(c).test(el.className);
- },
-
- toggleClass: function (c, condition) {
- if (typeof condition !== 'undefined' && !condition) {
- return this;
- }
- return this.each(function (el) {
- this.hasClass(el, c) ?
- (el.className = trim(el.className.replace(classReg(c), ' '))) :
- (el.className = trim(el.className + ' ' + c));
- }, this);
- },
-
- show: function (type) {
- return this.each(function (el) {
- el.style.display = type || '';
- });
- },
-
- hide: function (elements) {
- return this.each(function (el) {
- el.style.display = 'none';
- });
- },
-
- append: function (node) {
- return this.each(function (el) {
- each(normalize(node), function (i) {
- el.appendChild(i);
- });
- });
- },
-
- prepend: function (node) {
- return this.each(function (el) {
- var first = el.firstChild;
- each(normalize(node), function (i) {
- el.insertBefore(i, first);
- });
- });
- },
-
- appendTo: function (target, host) {
- return insert.call(this, target, host, function (t, el) {
- t.appendChild(el);
- });
- },
-
- prependTo: function (target, host) {
- return insert.call(this, target, host, function (t, el) {
- t.insertBefore(el, t.firstChild);
- });
- },
-
- next: function () {
- return this.related('nextSibling');
- },
-
- previous: function () {
- return this.related('previousSibling');
- },
-
- related: function (method) {
- return this.map(
- function (el) {
- el = el[method];
- while (el && el.nodeType !== 1) {
- el = el[method];
- }
- return el || 0;
- },
- function (el) {
- return el;
- }
- );
- },
-
- before: function (node) {
- return this.each(function (el) {
- each(bonzo.create(node), function (i) {
- el[parentNode].insertBefore(i, el);
- });
- });
- },
-
- after: function (node) {
- return this.each(function (el) {
- each(bonzo.create(node), function (i) {
- el[parentNode].insertBefore(i, el.nextSibling);
- });
- });
- },
-
- insertBefore: function (target, host) {
- return insert.call(this, target, host, function (t, el) {
- t[parentNode].insertBefore(el, t);
- });
- },
-
- insertAfter: function (target, host) {
- return insert.call(this, target, host, function (t, el) {
- var sibling = t.nextSibling;
- if (sibling) {
- t[parentNode].insertBefore(el, sibling);
- }
- else {
- t[parentNode].appendChild(el);
- }
- });
- },
-
- css: function (o, v, p) {
- // is this a request for just getting a style?
- if (v === undefined && typeof o == 'string') {
- // repurpose 'v'
- v = this[0];
- if (!v) {
- return null;
- }
- if (v == doc || v == win) {
- p = (v == doc) ? bonzo.doc() : bonzo.viewport();
- return o == 'width' ? p.width :
- o == 'height' ? p.height : '';
- }
- return getStyle(v, o);
- }
- var iter = o;
- if (typeof o == 'string') {
- iter = {};
- iter[o] = v;
- }
-
- if (ie && iter.opacity) {
- // oh this 'ol gamut
- iter.filter = 'alpha(opacity=' + (iter.opacity * 100) + ')';
- // give it layout
- iter.zoom = o.zoom || 1;
- delete iter.opacity;
- }
-
- if (v = iter['float']) {
- // float is a reserved style word. w3 uses cssFloat, ie uses styleFloat
- ie ? (iter.styleFloat = v) : (iter.cssFloat = v);
- delete iter['float'];
- }
-
- var fn = function (el, p, v) {
- for (var k in iter) {
- if (iter.hasOwnProperty(k)) {
- v = iter[k];
- // change "5" to "5px" - unless you're line-height, which is allowed
- (p = camelize(k)) && digit.test(v) && !(p in unitless) && (v += px);
- el.style[p] = v;
- }
- }
- };
- return this.each(fn);
- },
-
- offset: function (x, y) {
- if (x || y) {
- return this.each(function (el) {
- xy(el, x, y);
- });
- }
- var el = this[0];
- var width = el.offsetWidth;
- var height = el.offsetHeight;
- var top = el.offsetTop;
- var left = el.offsetLeft;
- while (el = el.offsetParent) {
- top = top + el.offsetTop;
- left = left + el.offsetLeft;
- }
-
- return {
- top: top,
- left: left,
- height: height,
- width: width
- };
- },
-
- attr: function (k, v) {
- var el = this[0];
- return typeof v == 'undefined' ?
- specialAttributes.test(k) ?
- stateAttributes.test(k) && typeof el[k] == 'string' ?
- true : el[k] : el[getAttribute](k) :
- this.each(function (el) {
- k == 'value' ? (el.value = v) : el[setAttribute](k, v);
- });
- },
-
- val: function (s) {
- return (typeof s == 'string') ? this.attr('value', s) : this[0].value;
- },
-
- removeAttr: function (k) {
- return this.each(function (el) {
- el.removeAttribute(k);
- });
- },
-
- data: function (k, v) {
- var el = this[0];
- if (typeof v === 'undefined') {
- el[getAttribute]('data-node-uid') || el[setAttribute]('data-node-uid', ++uuids);
- var uid = el[getAttribute]('data-node-uid');
- uidList[uid] || (uidList[uid] = {});
- return uidList[uid][k];
- } else {
- return this.each(function (el) {
- el[getAttribute]('data-node-uid') || el[setAttribute]('data-node-uid', ++uuids);
- var uid = el[getAttribute]('data-node-uid');
- var o = {};
- o[k] = v;
- uidList[uid] = o;
- });
- }
- },
-
- remove: function () {
- return this.each(function (el) {
- el[parentNode] && el[parentNode].removeChild(el);
- });
- },
-
- empty: function () {
- return this.each(function (el) {
- while (el.firstChild) {
- el.removeChild(el.firstChild);
- }
- });
- },
-
- detach: function () {
- return this.map(function (el) {
- return el[parentNode].removeChild(el);
- });
- },
-
- scrollTop: function (y) {
- return scroll.call(this, null, y, 'y');
- },
-
- scrollLeft: function (x) {
- return scroll.call(this, x, null, 'x');
- }
- };
-
- function normalize(node) {
- return typeof node == 'string' ? bonzo.create(node) : is(node) ? [node] : node; // assume [nodes]
- }
-
- function scroll(x, y, type) {
- var el = this[0];
- if (x == null && y == null) {
- return (isBody(el) ? getWindowScroll() : { x: el.scrollLeft, y: el.scrollTop })[type];
- }
- if (isBody(el)) {
- win.scrollTo(x, y);
- } else {
- x != null && (el.scrollLeft = x);
- y != null && (el.scrollTop = y);
- }
- return this;
- }
-
- function isBody(element) {
- return element === win || (/^(?:body|html)$/i).test(element.tagName);
- }
-
- function getWindowScroll() {
- return { x: win.pageXOffset || html.scrollLeft, y: win.pageYOffset || html.scrollTop };
- }
-
- function bonzo(els, host) {
- return new Bonzo(els, host);
- }
-
- bonzo.setQueryEngine = function (q) {
- query = q;
- delete bonzo.setQueryEngine;
- };
-
- bonzo.aug = function (o, target) {
- for (var k in o) {
- o.hasOwnProperty(k) && ((target || Bonzo.prototype)[k] = o[k]);
- }
- };
-
- bonzo.create = function (node) {
- return typeof node == 'string' ?
- function () {
- var tag = /^<([^\s>]+)/.exec(node);
- var el = doc.createElement(tag && tagMap[tag[1].toLowerCase()] || 'div'), els = [];
- el.innerHTML = node;
- var nodes = el.childNodes;
- el = el.firstChild;
- els.push(el);
- while (el = el.nextSibling) {
- (el.nodeType == 1) && els.push(el);
- }
- return els;
-
- }() : is(node) ? [node.cloneNode(true)] : [];
- };
-
- bonzo.doc = function () {
- var w = html.scrollWidth,
- h = html.scrollHeight,
- vp = this.viewport();
- return {
- width: Math.max(w, vp.width),
- height: Math.max(h, vp.height)
- };
- };
-
- bonzo.firstChild = function (el) {
- for (var c = el.childNodes, i = 0, j = (c && c.length) || 0, e; i < j; i++) {
- if (c[i].nodeType === 1) {
- e = c[j = i];
- }
- }
- return e;
- };
-
- bonzo.viewport = function () {
- var h = self.innerHeight,
- w = self.innerWidth;
- if (ie) {
- h = html.clientHeight;
- w = html.clientWidth;
- }
- return {
- width: w,
- height: h
- };
- };
-
- bonzo.isAncestor = 'compareDocumentPosition' in html ?
- function (container, element) {
- return (container.compareDocumentPosition(element) & 16) == 16;
- } : 'contains' in html ?
- function (container, element) {
- return container !== element && container.contains(element);
- } :
- function (container, element) {
- while (element = element[parentNode]) {
- if (element === container) {
- return true;
- }
- }
- return false;
- };
-
- var old = context.bonzo;
- bonzo.noConflict = function () {
- context.bonzo = old;
- return this;
- };
- context['bonzo'] = bonzo;
-
-}(this, window);!function ($) {
-
- var b = bonzo;
- b.setQueryEngine($);
- $.ender(b);
- $.ender(b(), true);
- $.ender({
- create: function (node) {
- return $(b.create(node));
- }
- });
-
- $.id = function (id) {
- return $([document.getElementById(id)]);
- };
-
- function indexOf(ar, val) {
- for (var i = 0; i < ar.length; i++) {
- if (ar[i] === val) {
- return i;
- }
- }
- return -1;
- }
-
- function uniq(ar) {
- var a = [], i, j;
- label:
- for (i = 0; i < ar.length; i++) {
- for (j = 0; j < a.length; j++) {
- if (a[j] == ar[i]) {
- continue label;
- }
- }
- a[a.length] = ar[i];
- }
- return a;
- }
-
- $.ender({
- parents: function (selector, closest) {
- var collection = $(selector), j, k, p, r = [];
- for (j = 0, k = this.length; j < k; j++) {
- p = this[j];
- while (p = p.parentNode) {
- if (indexOf(collection, p) !== -1) {
- r.push(p);
- if (closest) break;
- }
- }
- }
- return $(uniq(r));
- },
-
- closest: function (selector) {
- return this.parents(selector, true);
- },
-
- first: function () {
- return $(this[0]);
- },
-
- last: function () {
- return $(this[this.length - 1]);
- },
-
- next: function () {
- return $(b(this).next());
- },
-
- previous: function () {
- return $(b(this).previous());
- },
-
- appendTo: function (t) {
- return b(this.selector).appendTo(t, this);
- },
-
- prependTo: function (t) {
- return b(this.selector).prependTo(t, this);
- },
-
- insertAfter: function (t) {
- return b(this.selector).insertAfter(t, this);
- },
-
- insertBefore: function (t) {
- return b(this.selector).insertBefore(t, this);
- },
-
- siblings: function () {
- var i, l, p, r = [];
- for (i = 0, l = this.length; i < l; i++) {
- p = this[i];
- while (p = p.previousSibling) {
- p.nodeType == 1 && r.push(p);
- }
- p = this[i];
- while (p = p.nextSibling) {
- p.nodeType == 1 && r.push(p);
- }
- }
- return $(r);
- },
-
- children: function () {
- var i, el, r = [];
- for (i = 0, l = this.length; i < l; i++) {
- if (!(el = b.firstChild(this[i]))) {
- continue;
- }
- r.push(el);
- while (el = el.nextSibling) {
- el.nodeType == 1 && r.push(el);
- }
- }
- return $(uniq(r));
- },
-
- height: function (v) {
- return dimension(v, this, 'height')
- },
-
- width: function (v) {
- return dimension(v, this, 'width')
- }
- }, true);
-
- function dimension(v, self, which) {
- return v ?
- self.css(which, v) :
- function (r) {
- r = parseInt(self.css(which), 10);
- return isNaN(r) ? self[0]['offset' + which.replace(/^\w/, function (m) {return m.toUpperCase()})] : r
- }()
- }
-
-}(ender || $);
-
-!function (context, doc) {
- var fns = [], ol, fn, f = false,
- testEl = doc.documentElement,
- hack = testEl.doScroll,
- domContentLoaded = 'DOMContentLoaded',
- addEventListener = 'addEventListener',
- onreadystatechange = 'onreadystatechange',
- loaded = /^loade|c/.test(doc.readyState);
-
- function flush(i) {
- loaded = 1;
- while (i = fns.shift()) { i() }
- }
- doc[addEventListener] && doc[addEventListener](domContentLoaded, fn = function () {
- doc.removeEventListener(domContentLoaded, fn, f);
- flush();
- }, f);
-
-
- hack && doc.attachEvent(onreadystatechange, (ol = function () {
- if (/^c/.test(doc.readyState)) {
- doc.detachEvent(onreadystatechange, ol);
- flush();
- }
- }));
-
- context['domReady'] = hack ?
- function (fn) {
- self != top ?
- loaded ? fn() : fns.push(fn) :
- function () {
- try {
- testEl.doScroll('left');
- } catch (e) {
- return setTimeout(function() { domReady(fn) }, 50);
- }
- fn();
- }()
- } :
- function (fn) {
- loaded ? fn() : fns.push(fn);
- };
-
-}(this, document);!function ($) {
- $.ender({domReady: domReady});
- $.ender({
- ready: function (f) {
- domReady(f);
- return this;
- }
- }, true);
-}(ender);
-/*!
- * Qwery - A Blazing Fast query selector engine
- * https://github.com/ded/qwery
- * copyright Dustin Diaz & Jacob Thornton 2011
- * MIT License
- */
-
-!function (context, doc) {
-
- var c, i, j, k, l, m, o, p, r, v,
- el, node, len, found, classes, item, items, token,
- html = doc.documentElement,
- id = /#([\w\-]+)/,
- clas = /\.[\w\-]+/g,
- idOnly = /^#([\w\-]+$)/,
- classOnly = /^\.([\w\-]+)$/,
- tagOnly = /^([\w\-]+)$/,
- tagAndOrClass = /^([\w]+)?\.([\w\-]+)$/,
- normalizr = /\s*([\s\+\~>])\s*/g,
- splitters = /[\s\>\+\~]/,
- splittersMore = /(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\])/,
- dividers = new RegExp('(' + splitters.source + ')' + splittersMore.source, 'g'),
- tokenizr = new RegExp(splitters.source + splittersMore.source),
- specialChars = /([.*+?\^=!:${}()|\[\]\/\\])/g,
- simple = /^([a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,
- attr = /\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,
- pseudo = /:([\w\-]+)(\(['"]?(\w+)['"]?\))?/,
- chunker = new RegExp(simple.source + '(' + attr.source + ')?' + '(' + pseudo.source + ')?'),
- walker = {
- ' ': function (node) {
- return node && node !== html && node.parentNode
- },
- '>': function (node, contestant) {
- return node && node.parentNode == contestant.parentNode && node.parentNode;
- },
- '~': function (node) {
- return node && node.previousSibling;
- },
- '+': function (node, contestant, p1, p2) {
- if (!node) {
- return false;
- }
- p1 = previous(node);
- p2 = previous(contestant);
- return p1 && p2 && p1 == p2 && p1;
- }
- };
- window.tokenizr = tokenizr;
- window.dividers = dividers;
- function cache() {
- this.c = {};
- }
- cache.prototype = {
- g: function (k) {
- return this.c[k] || undefined;
- },
- s: function (k, v) {
- this.c[k] = v;
- return v;
- }
- };
-
- var classCache = new cache(),
- cleanCache = new cache(),
- attrCache = new cache(),
- tokenCache = new cache();
-
- function array(ar) {
- r = [];
- for (i = 0, len = ar.length; i < len; i++) {
- r[i] = ar[i];
- }
- return r;
- }
-
- function previous(n) {
- while (n = n.previousSibling) {
- if (n.nodeType == 1) {
- break;
- }
- }
- return n
- }
-
- function q(query) {
- return query.match(chunker);
- }
-
- // this next method expect at most these args
- // given => div.hello[title="world"]:foo('bar')
-
- // div.hello[title="world"]:foo('bar'), div, .hello, [title="world"], title, =, world, :foo('bar'), foo, ('bar'), bar]
-
- function interpret(whole, tag, idsAndClasses, wholeAttribute, attribute, qualifier, value, wholePseudo, pseudo, wholePseudoVal, pseudoVal) {
- var m, c, k;
- if (tag && this.tagName.toLowerCase() !== tag) {
- return false;
- }
- if (idsAndClasses && (m = idsAndClasses.match(id)) && m[1] !== this.id) {
- return false;
- }
- if (idsAndClasses && (classes = idsAndClasses.match(clas))) {
- for (i = classes.length; i--;) {
- c = classes[i].slice(1);
- if (!(classCache.g(c) || classCache.s(c, new RegExp('(^|\\s+)' + c + '(\\s+|$)'))).test(this.className)) {
- return false;
- }
- }
- }
- if (pseudo && qwery.pseudos[pseudo] && !qwery.pseudos[pseudo](this, pseudoVal)) {
- return false;
- }
- if (wholeAttribute && !value) {
- o = this.attributes;
- for (k in o) {
- if (Object.prototype.hasOwnProperty.call(o, k) && (o[k].name || k) == attribute) {
- return this;
- }
- }
- }
- if (wholeAttribute && !checkAttr(qualifier, this.getAttribute(attribute) || '', value)) {
- return false;
- }
- return this;
- }
-
- function clean(s) {
- return cleanCache.g(s) || cleanCache.s(s, s.replace(specialChars, '\\$1'));
- }
-
- function checkAttr(qualify, actual, val) {
- switch (qualify) {
- case '=':
- return actual == val;
- case '^=':
- return actual.match(attrCache.g('^=' + val) || attrCache.s('^=' + val, new RegExp('^' + clean(val))));
- case '$=':
- return actual.match(attrCache.g('$=' + val) || attrCache.s('$=' + val, new RegExp(clean(val) + '$')));
- case '*=':
- return actual.match(attrCache.g(val) || attrCache.s(val, new RegExp(clean(val))));
- case '~=':
- return actual.match(attrCache.g('~=' + val) || attrCache.s('~=' + val, new RegExp('(?:^|\\s+)' + clean(val) + '(?:\\s+|$)')));
- case '|=':
- return actual.match(attrCache.g('|=' + val) || attrCache.s('|=' + val, new RegExp('^' + clean(val) + '(-|$)')));
- }
- return 0;
- }
-
- function _qwery(selector) {
- var r = [], ret = [], i, j = 0, k, l, m, p, token, tag, els, root, intr, item, children,
- tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr)),
- dividedTokens = selector.match(dividers), dividedToken;
- tokens = tokens.slice(0); // this makes a copy of the array so the cached original is not effected
- if (!tokens.length) {
- return r;
- }
-
- token = tokens.pop();
- root = tokens.length && (m = tokens[tokens.length - 1].match(idOnly)) ? doc.getElementById(m[1]) : doc;
- if (!root) {
- return r;
- }
- intr = q(token);
- els = dividedTokens && /^[+~]$/.test(dividedTokens[dividedTokens.length - 1]) ? function (r) {
- while (root = root.nextSibling) {
- root.nodeType == 1 && (intr[1] ? intr[1] == root.tagName.toLowerCase() : 1) && r.push(root)
- }
- return r
- }([]) :
- root.getElementsByTagName(intr[1] || '*');
- for (i = 0, l = els.length; i < l; i++) {
- if (item = interpret.apply(els[i], intr)) {
- r[j++] = item;
- }
- }
- if (!tokens.length) {
- return r;
- }
-
- // loop through all descendent tokens
- for (j = 0, l = r.length, k = 0; j < l; j++) {
- p = r[j];
- // loop through each token backwards crawling up tree
- for (i = tokens.length; i--;) {
- // loop through parent nodes
- while (p = walker[dividedTokens[i]](p, r[j])) {
- if (found = interpret.apply(p, q(tokens[i]))) {
- break;
- }
- }
- }
- found && (ret[k++] = r[j]);
- }
- return ret;
- }
-
- function boilerPlate(selector, _root, fn) {
- var root = (typeof _root == 'string') ? fn(_root)[0] : (_root || doc);
- if (selector === window || isNode(selector)) {
- return !_root || (selector !== window && isNode(root) && isAncestor(selector, root)) ? [selector] : [];
- }
- if (selector && typeof selector === 'object' && isFinite(selector.length)) {
- return array(selector);
- }
- if (m = selector.match(idOnly)) {
- return (el = doc.getElementById(m[1])) ? [el] : [];
- }
- if (m = selector.match(tagOnly)) {
- return array(root.getElementsByTagName(m[1]));
- }
- return false;
- }
-
- function isNode(el) {
- return (el && el.nodeType && (el.nodeType == 1 || el.nodeType == 9));
- }
-
- function uniq(ar) {
- var a = [], i, j;
- label:
- for (i = 0; i < ar.length; i++) {
- for (j = 0; j < a.length; j++) {
- if (a[j] == ar[i]) {
- continue label;
- }
- }
- a[a.length] = ar[i];
- }
- return a;
- }
-
- function qwery(selector, _root) {
- var root = (typeof _root == 'string') ? qwery(_root)[0] : (_root || doc);
- if (!root || !selector) {
- return [];
- }
- if (m = boilerPlate(selector, _root, qwery)) {
- return m;
- }
- return select(selector, root);
- }
-
- var isAncestor = 'compareDocumentPosition' in html ?
- function (element, container) {
- return (container.compareDocumentPosition(element) & 16) == 16;
- } : 'contains' in html ?
- function (element, container) {
- container = container == doc || container == window ? html : container;
- return container !== element && container.contains(element);
- } :
- function (element, container) {
- while (element = element.parentNode) {
- if (element === container) {
- return 1;
- }
- }
- return 0;
- },
-
- select = (doc.querySelector && doc.querySelectorAll) ?
- function (selector, root) {
- if (doc.getElementsByClassName && (m = selector.match(classOnly))) {
- return array((root).getElementsByClassName(m[1]));
- }
- return array((root).querySelectorAll(selector));
- } :
- function (selector, root) {
- selector = selector.replace(normalizr, '$1');
- var result = [], collection, collections = [], i;
- if (m = selector.match(tagAndOrClass)) {
- items = root.getElementsByTagName(m[1] || '*');
- r = classCache.g(m[2]) || classCache.s(m[2], new RegExp('(^|\\s+)' + m[2] + '(\\s+|$)'));
- for (i = 0, l = items.length, j = 0; i < l; i++) {
- r.test(items[i].className) && (result[j++] = items[i]);
- }
- return result;
- }
- for (i = 0, items = selector.split(','), l = items.length; i < l; i++) {
- collections[i] = _qwery(items[i]);
- }
- for (i = 0, l = collections.length; i < l && (collection = collections[i]); i++) {
- var ret = collection;
- if (root !== doc) {
- ret = [];
- for (j = 0, m = collection.length; j < m && (element = collection[j]); j++) {
- // make sure element is a descendent of root
- isAncestor(element, root) && ret.push(element);
- }
- }
- result = result.concat(ret);
- }
- return uniq(result);
- };
-
- qwery.uniq = uniq;
- qwery.pseudos = {};
-
- var oldQwery = context.qwery;
- qwery.noConflict = function () {
- context.qwery = oldQwery;
- return this;
- };
- context['qwery'] = qwery;
-
-}(this, document);!function (doc) {
- var q = qwery.noConflict();
- var table = 'table',
- nodeMap = {
- thead: table,
- tbody: table,
- tfoot: table,
- tr: 'tbody',
- th: 'tr',
- td: 'tr',
- fieldset: 'form',
- option: 'select'
- }
- function create(node, root) {
- var tag = /^<([^\s>]+)/.exec(node)[1]
- var el = (root || doc).createElement(nodeMap[tag] || 'div'), els = [];
- el.innerHTML = node;
- var nodes = el.childNodes;
- el = el.firstChild;
- els.push(el);
- while (el = el.nextSibling) {
- (el.nodeType == 1) && els.push(el);
- }
- return els;
- }
- $._select = function (s, r) {
- return /^\s*</.test(s) ? create(s, r) : q(s, r);
- };
- $.ender({
- find: function (s) {
- var r = [], i, l, j, k, els;
- for (i = 0, l = this.length; i < l; i++) {
- els = q(s, this[i]);
- for (j = 0, k = els.length; j < k; j++) {
- r.push(els[j]);
- }
- }
- return $(q.uniq(r));
- }
- , and: function (s) {
- var plus = $(s);
- for (var i = this.length, j = 0, l = this.length + plus.length; i < l; i++, j++) {
- this[i] = plus[j];
- }
- return this;
- }
- }, true);
-}(document);
diff --git a/files_videoviewer/mediaelement/src/js/me-featuredetection.js b/files_videoviewer/mediaelement/src/js/me-featuredetection.js
deleted file mode 100755
index e7fcdd6a7..000000000
--- a/files_videoviewer/mediaelement/src/js/me-featuredetection.js
+++ /dev/null
@@ -1,98 +0,0 @@
-// necessary detection (fixes for <IE9)
-mejs.MediaFeatures = {
- init: function() {
- var
- t = this,
- d = document,
- nav = mejs.PluginDetector.nav,
- ua = mejs.PluginDetector.ua.toLowerCase(),
- i,
- v,
- html5Elements = ['source','track','audio','video'];
-
- // detect browsers (only the ones that have some kind of quirk we need to work around)
- t.isiPad = (ua.match(/ipad/i) !== null);
- t.isiPhone = (ua.match(/iphone/i) !== null);
- t.isiOS = t.isiPhone || t.isiPad;
- t.isAndroid = (ua.match(/android/i) !== null);
- t.isBustedAndroid = (ua.match(/android 2\.[12]/) !== null);
- t.isIE = (nav.appName.toLowerCase().indexOf("microsoft") != -1);
- t.isChrome = (ua.match(/chrome/gi) !== null);
- t.isFirefox = (ua.match(/firefox/gi) !== null);
- t.isWebkit = (ua.match(/webkit/gi) !== null);
- t.isGecko = (ua.match(/gecko/gi) !== null) && !t.isWebkit;
- t.isOpera = (ua.match(/opera/gi) !== null);
- t.hasTouch = ('ontouchstart' in window);
-
- // borrowed from Modernizr
- t.svg = !! document.createElementNS &&
- !! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect;
-
- // create HTML5 media elements for IE before 9, get a <video> element for fullscreen detection
- for (i=0; i<html5Elements.length; i++) {
- v = document.createElement(html5Elements[i]);
- }
-
- t.supportsMediaTag = (typeof v.canPlayType !== 'undefined' || t.isBustedAndroid);
-
- // detect native JavaScript fullscreen (Safari/Firefox only, Chrome still fails)
-
- // iOS
- t.hasSemiNativeFullScreen = (typeof v.webkitEnterFullscreen !== 'undefined');
-
- // Webkit/firefox
- t.hasWebkitNativeFullScreen = (typeof v.webkitRequestFullScreen !== 'undefined');
- t.hasMozNativeFullScreen = (typeof v.mozRequestFullScreen !== 'undefined');
-
- t.hasTrueNativeFullScreen = (t.hasWebkitNativeFullScreen || t.hasMozNativeFullScreen);
- t.nativeFullScreenEnabled = t.hasTrueNativeFullScreen;
- if (t.hasMozNativeFullScreen) {
- t.nativeFullScreenEnabled = v.mozFullScreenEnabled;
- }
-
-
- if (this.isChrome) {
- t.hasSemiNativeFullScreen = false;
- }
-
- if (t.hasTrueNativeFullScreen) {
- t.fullScreenEventName = (t.hasWebkitNativeFullScreen) ? 'webkitfullscreenchange' : 'mozfullscreenchange';
-
-
- t.isFullScreen = function() {
- if (v.mozRequestFullScreen) {
- return d.mozFullScreen;
- } else if (v.webkitRequestFullScreen) {
- return d.webkitIsFullScreen;
- }
- }
-
- t.requestFullScreen = function(el) {
-
- if (t.hasWebkitNativeFullScreen) {
- el.webkitRequestFullScreen();
- } else if (t.hasMozNativeFullScreen) {
- el.mozRequestFullScreen();
- }
- }
-
- t.cancelFullScreen = function() {
- if (t.hasWebkitNativeFullScreen) {
- document.webkitCancelFullScreen();
- } else if (t.hasMozNativeFullScreen) {
- document.mozCancelFullScreen();
- }
- }
-
- }
-
-
- // OS X 10.5 can't do this even if it says it can :(
- if (t.hasSemiNativeFullScreen && ua.match(/mac os x 10_5/i)) {
- t.hasNativeFullScreen = false;
- t.hasSemiNativeFullScreen = false;
- }
-
- }
-};
-mejs.MediaFeatures.init();
diff --git a/files_videoviewer/mediaelement/src/js/me-header.js b/files_videoviewer/mediaelement/src/js/me-header.js
deleted file mode 100755
index 6d0fcb3dc..000000000
--- a/files_videoviewer/mediaelement/src/js/me-header.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/*!
-* MediaElement.js
-* HTML5 <video> and <audio> shim and player
-* http://mediaelementjs.com/
-*
-* Creates a JavaScript object that mimics HTML5 MediaElement API
-* for browsers that don't understand HTML5 or can't play the provided codec
-* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
-*
-* Copyright 2010-2013, John Dyer (http://j.hn)
-* License: MIT
-*
-*/ \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/me-i18n-locale-de.js b/files_videoviewer/mediaelement/src/js/me-i18n-locale-de.js
deleted file mode 100755
index c3f4638a9..000000000
--- a/files_videoviewer/mediaelement/src/js/me-i18n-locale-de.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*!
- * This is a i18n.locale language object.
- *
- *<de> German translation by Tim Latz, latz.tim@gmail.com
- *
- * @author
- * Tim Latz (latz.tim@gmail.com)
- *
- * @see
- * me-i18n.js
- *
- * @params
- * - exports - CommonJS, window ..
- */
-;(function(exports, undefined) {
-
- "use strict";
-
- exports.de = {
- "Fullscreen" : "Vollbild",
- "Go Fullscreen" : "Vollbild an",
- "Turn off Fullscreen" : "Vollbild aus",
- "Close" : "Schließen"
- };
-
-}(mejs.i18n.locale.strings)); \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/me-i18n-locale-zh.js b/files_videoviewer/mediaelement/src/js/me-i18n-locale-zh.js
deleted file mode 100755
index ac2b3cb25..000000000
--- a/files_videoviewer/mediaelement/src/js/me-i18n-locale-zh.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*!
- * This is a i18n.locale language object.
- *
- *<de> Traditional chinese translation by Tim Latz, latz.tim@gmail.com
- *
- * @author
- * Tim Latz (latz.tim@gmail.com)
- *
- * @see
- * me-i18n.js
- *
- * @params
- * - exports - CommonJS, window ..
- */
-;(function(exports, undefined) {
-
- "use strict";
-
- exports.zh = {
- "Fullscreen" : "全螢幕",
- "Go Fullscreen" : "全屏模式",
- "Turn off Fullscreen" : "退出全屏模式",
- "Close" : "關閉"
- };
-
-}(mejs.i18n.locale.strings));
diff --git a/files_videoviewer/mediaelement/src/js/me-i18n.js b/files_videoviewer/mediaelement/src/js/me-i18n.js
deleted file mode 100755
index 5efe64f02..000000000
--- a/files_videoviewer/mediaelement/src/js/me-i18n.js
+++ /dev/null
@@ -1,194 +0,0 @@
-/*!
- * Adds Internationalization and localization to objects.
- *
- * What is the concept beyond i18n?
- * http://en.wikipedia.org/wiki/Internationalization_and_localization
- *
- *
- * This file both i18n methods and locale which is used to translate
- * strings into other languages.
- *
- * Default translations are not available, you have to add them
- * through locale objects which are named exactly as the langcode
- * they stand for. The default language is always english (en).
- *
- *
- * Wrapper built to be able to attach the i18n object to
- * other objects without changing more than one line.
- *
- *
- * LICENSE:
- *
- * The i18n file uses methods from the Drupal project (drupal.js):
- * - i18n.methods.t() (modified)
- * - i18n.methods.checkPlain() (full copy)
- * - i18n.methods.formatString() (full copy)
- *
- * The Drupal project is (like mediaelementjs) licensed under GPLv2.
- * - http://drupal.org/licensing/faq/#q1
- * - https://github.com/johndyer/mediaelement
- * - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- *
- *
- * @author
- * Tim Latz (latz.tim@gmail.com)
- *
- * @see
- * me-i18n-locale.js
- *
- * @params
- * - context - document, iframe ..
- * - exports - CommonJS, window ..
- *
- */
-;(function(context, exports, undefined) {
- "use strict";
- var i18n = {
- "locale": {
- "strings" : {}
- },
- "methods" : {}
- };
-// start i18n
-
-
- /**
- * Get the current browser's language
- *
- * @see: i18n.methods.t()
- */
- i18n.locale.getLanguage = function () {
- return {
- "language" : navigator.language
- };
- };
-
- /**
- * Store the language the locale object was initialized with
- */
- i18n.locale.INIT_LANGUAGE = i18n.locale.getLanguage();
-
-
- /**
- * Encode special characters in a plain-text string for display as HTML.
- */
- i18n.methods.checkPlain = function (str) {
- var character, regex,
- replace = {
- '&': '&amp;',
- '"': '&quot;',
- '<': '&lt;',
- '>': '&gt;'
- };
- str = String(str);
- for (character in replace) {
- if (replace.hasOwnProperty(character)) {
- regex = new RegExp(character, 'g');
- str = str.replace(regex, replace[character]);
- }
- }
- return str;
- };
-
- /**
- * Replace placeholders with sanitized values in a string.
- *
- * @param str
- * A string with placeholders.
- * @param args
- * An object of replacements pairs to make. Incidences of any key in this
- * array are replaced with the corresponding value. Based on the first
- * character of the key, the value is escaped and/or themed:
- * - !variable: inserted as is
- * - @variable: escape plain text to HTML (i18n.methods.checkPlain)
- * - %variable: escape text and theme as a placeholder for user-submitted
- * content (checkPlain + <em class="placeholder" > )
- *
- * @see i18n.methods.t()
- */
- i18n.methods.formatString = function(str, args) {
- // Transform arguments before inserting them.
- for (var key in args) {
- switch (key.charAt(0)) {
- // Escaped only.
- case '@':
- args[key] = i18n.methods.checkPlain(args[key]);
- break;
- // Pass-through.
- case '!':
- break;
- // Escaped and placeholder.
- case '%':
- default:
- args[key] = '<em class="placeholder">' + i18n.methods.checkPlain(args[key]) + '</em>';
- break;
- }
- str = str.replace(key, args[key]);
- }
- return str;
- };
-
- /**
- * Translate strings to the page language or a given language.
- *
- * See the documentation of the server-side t() function for further details.
- *
- * @param str
- * A string containing the English string to translate.
- * @param args
- * An object of replacements pairs to make after translation. Incidences
- * of any key in this array are replaced with the corresponding value.
- * See i18n.methods.formatString().
- *
- * @param options
- * - 'context' (defaults to the default context): The context the source string
- * belongs to.
- *
- * @return
- * The translated string.
- */
- i18n.methods.t = function (str, args, options) {
-
- // Fetch the localized version of the string.
- if (i18n.locale.strings && i18n.locale.strings[options.context] && i18n.locale.strings[options.context][str]) {
- str = i18n.locale.strings[options.context][str];
- }
-
- if (args) {
- str = i18n.methods.formatString(str, args);
- }
- return str;
- };
-
-
- /**
- * Wrapper for i18n.methods.t()
- *
- * @see i18n.methods.t()
- * @throws InvalidArgumentException
- */
- i18n.t = function(str, args, options) {
-
- if (typeof str === 'string' && str.length > 0) {
-
- // check every time due languge can change for
- // different reasons (translation, lang switcher ..)
- var lang = i18n.locale.getLanguage();
-
- options = options || {
- "context" : lang.language
- };
-
- return i18n.methods.t(str, args, options);
- }
- else {
- throw {
- "name" : 'InvalidArgumentException',
- "message" : 'First argument is either not a string or empty.'
- }
- }
- };
-
-// end i18n
- exports.i18n = i18n;
-}(document, mejs));
diff --git a/files_videoviewer/mediaelement/src/js/me-mediaelements.js b/files_videoviewer/mediaelement/src/js/me-mediaelements.js
deleted file mode 100755
index 5aab607bc..000000000
--- a/files_videoviewer/mediaelement/src/js/me-mediaelements.js
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
-extension methods to <video> or <audio> object to bring it into parity with PluginMediaElement (see below)
-*/
-mejs.HtmlMediaElement = {
- pluginType: 'native',
- isFullScreen: false,
-
- setCurrentTime: function (time) {
- this.currentTime = time;
- },
-
- setMuted: function (muted) {
- this.muted = muted;
- },
-
- setVolume: function (volume) {
- this.volume = volume;
- },
-
- // for parity with the plugin versions
- stop: function () {
- this.pause();
- },
-
- // This can be a url string
- // or an array [{src:'file.mp4',type:'video/mp4'},{src:'file.webm',type:'video/webm'}]
- setSrc: function (url) {
-
- // Fix for IE9 which can't set .src when there are <source> elements. Awesome, right?
- var
- existingSources = this.getElementsByTagName('source');
- while (existingSources.length > 0){
- this.removeChild(existingSources[0]);
- }
-
- if (typeof url == 'string') {
- this.src = url;
- } else {
- var i, media;
-
- for (i=0; i<url.length; i++) {
- media = url[i];
- if (this.canPlayType(media.type)) {
- this.src = media.src;
- break;
- }
- }
- }
- },
-
- setVideoSize: function (width, height) {
- this.width = width;
- this.height = height;
- }
-};
-
-/*
-Mimics the <video/audio> element by calling Flash's External Interface or Silverlights [ScriptableMember]
-*/
-mejs.PluginMediaElement = function (pluginid, pluginType, mediaUrl) {
- this.id = pluginid;
- this.pluginType = pluginType;
- this.src = mediaUrl;
- this.events = {};
- this.attributes = {};
-};
-
-// JavaScript values and ExternalInterface methods that match HTML5 video properties methods
-// http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html
-// http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html
-mejs.PluginMediaElement.prototype = {
-
- // special
- pluginElement: null,
- pluginType: '',
- isFullScreen: false,
-
- // not implemented :(
- playbackRate: -1,
- defaultPlaybackRate: -1,
- seekable: [],
- played: [],
-
- // HTML5 read-only properties
- paused: true,
- ended: false,
- seeking: false,
- duration: 0,
- error: null,
- tagName: '',
-
- // HTML5 get/set properties, but only set (updated by event handlers)
- muted: false,
- volume: 1,
- currentTime: 0,
-
- // HTML5 methods
- play: function () {
- if (this.pluginApi != null) {
- if (this.pluginType == 'youtube') {
- this.pluginApi.playVideo();
- } else {
- this.pluginApi.playMedia();
- }
- this.paused = false;
- }
- },
- load: function () {
- if (this.pluginApi != null) {
- if (this.pluginType == 'youtube') {
- } else {
- this.pluginApi.loadMedia();
- }
-
- this.paused = false;
- }
- },
- pause: function () {
- if (this.pluginApi != null) {
- if (this.pluginType == 'youtube') {
- this.pluginApi.pauseVideo();
- } else {
- this.pluginApi.pauseMedia();
- }
-
-
- this.paused = true;
- }
- },
- stop: function () {
- if (this.pluginApi != null) {
- if (this.pluginType == 'youtube') {
- this.pluginApi.stopVideo();
- } else {
- this.pluginApi.stopMedia();
- }
- this.paused = true;
- }
- },
- canPlayType: function(type) {
- var i,
- j,
- pluginInfo,
- pluginVersions = mejs.plugins[this.pluginType];
-
- for (i=0; i<pluginVersions.length; i++) {
- pluginInfo = pluginVersions[i];
-
- // test if user has the correct plugin version
- if (mejs.PluginDetector.hasPluginVersion(this.pluginType, pluginInfo.version)) {
-
- // test for plugin playback types
- for (j=0; j<pluginInfo.types.length; j++) {
- // find plugin that can play the type
- if (type == pluginInfo.types[j]) {
- return 'probably';
- }
- }
- }
- }
-
- return '';
- },
-
- positionFullscreenButton: function(x,y,visibleAndAbove) {
- if (this.pluginApi != null && this.pluginApi.positionFullscreenButton) {
- this.pluginApi.positionFullscreenButton(x,y,visibleAndAbove);
- }
- },
-
- hideFullscreenButton: function() {
- if (this.pluginApi != null && this.pluginApi.hideFullscreenButton) {
- this.pluginApi.hideFullscreenButton();
- }
- },
-
-
- // custom methods since not all JavaScript implementations support get/set
-
- // This can be a url string
- // or an array [{src:'file.mp4',type:'video/mp4'},{src:'file.webm',type:'video/webm'}]
- setSrc: function (url) {
- if (typeof url == 'string') {
- this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(url));
- this.src = mejs.Utility.absolutizeUrl(url);
- } else {
- var i, media;
-
- for (i=0; i<url.length; i++) {
- media = url[i];
- if (this.canPlayType(media.type)) {
- this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(media.src));
- this.src = mejs.Utility.absolutizeUrl(url);
- break;
- }
- }
- }
-
- },
- setCurrentTime: function (time) {
- if (this.pluginApi != null) {
- if (this.pluginType == 'youtube') {
- this.pluginApi.seekTo(time);
- } else {
- this.pluginApi.setCurrentTime(time);
- }
-
-
-
- this.currentTime = time;
- }
- },
- setVolume: function (volume) {
- if (this.pluginApi != null) {
- // same on YouTube and MEjs
- if (this.pluginType == 'youtube') {
- this.pluginApi.setVolume(volume * 100);
- } else {
- this.pluginApi.setVolume(volume);
- }
- this.volume = volume;
- }
- },
- setMuted: function (muted) {
- if (this.pluginApi != null) {
- if (this.pluginType == 'youtube') {
- if (muted) {
- this.pluginApi.mute();
- } else {
- this.pluginApi.unMute();
- }
- this.muted = muted;
- this.dispatchEvent('volumechange');
- } else {
- this.pluginApi.setMuted(muted);
- }
- this.muted = muted;
- }
- },
-
- // additional non-HTML5 methods
- setVideoSize: function (width, height) {
-
- //if (this.pluginType == 'flash' || this.pluginType == 'silverlight') {
- if ( this.pluginElement.style) {
- this.pluginElement.style.width = width + 'px';
- this.pluginElement.style.height = height + 'px';
- }
- if (this.pluginApi != null && this.pluginApi.setVideoSize) {
- this.pluginApi.setVideoSize(width, height);
- }
- //}
- },
-
- setFullscreen: function (fullscreen) {
- if (this.pluginApi != null && this.pluginApi.setFullscreen) {
- this.pluginApi.setFullscreen(fullscreen);
- }
- },
-
- enterFullScreen: function() {
- if (this.pluginApi != null && this.pluginApi.setFullscreen) {
- this.setFullscreen(true);
- }
-
- },
-
- exitFullScreen: function() {
- if (this.pluginApi != null && this.pluginApi.setFullscreen) {
- this.setFullscreen(false);
- }
- },
-
- // start: fake events
- addEventListener: function (eventName, callback, bubble) {
- this.events[eventName] = this.events[eventName] || [];
- this.events[eventName].push(callback);
- },
- removeEventListener: function (eventName, callback) {
- if (!eventName) { this.events = {}; return true; }
- var callbacks = this.events[eventName];
- if (!callbacks) return true;
- if (!callback) { this.events[eventName] = []; return true; }
- for (i = 0; i < callbacks.length; i++) {
- if (callbacks[i] === callback) {
- this.events[eventName].splice(i, 1);
- return true;
- }
- }
- return false;
- },
- dispatchEvent: function (eventName) {
- var i,
- args,
- callbacks = this.events[eventName];
-
- if (callbacks) {
- args = Array.prototype.slice.call(arguments, 1);
- for (i = 0; i < callbacks.length; i++) {
- callbacks[i].apply(null, args);
- }
- }
- },
- // end: fake events
-
- // fake DOM attribute methods
- hasAttribute: function(name){
- return (name in this.attributes);
- },
- removeAttribute: function(name){
- delete this.attributes[name];
- },
- getAttribute: function(name){
- if (this.hasAttribute(name)) {
- return this.attributes[name];
- }
- return '';
- },
- setAttribute: function(name, value){
- this.attributes[name] = value;
- },
-
- remove: function() {
- mejs.Utility.removeSwf(this.pluginElement.id);
- mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id);
- }
-};
diff --git a/files_videoviewer/mediaelement/src/js/me-namespace.js b/files_videoviewer/mediaelement/src/js/me-namespace.js
deleted file mode 100755
index d9880c8d9..000000000
--- a/files_videoviewer/mediaelement/src/js/me-namespace.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// Namespace
-var mejs = mejs || {};
-
-// version number
-mejs.version = '2.11.3';
-
-// player number (for missing, same id attr)
-mejs.meIndex = 0;
-
-// media types accepted by plugins
-mejs.plugins = {
- silverlight: [
- {version: [3,0], types: ['video/mp4','video/m4v','video/mov','video/wmv','audio/wma','audio/m4a','audio/mp3','audio/wav','audio/mpeg']}
- ],
- flash: [
- {version: [9,0,124], types: ['video/mp4','video/m4v','video/mov','video/flv','video/rtmp','video/x-flv','audio/flv','audio/x-flv','audio/mp3','audio/m4a','audio/mpeg', 'video/youtube', 'video/x-youtube']}
- //,{version: [12,0], types: ['video/webm']} // for future reference (hopefully!)
- ],
- youtube: [
- {version: null, types: ['video/youtube', 'video/x-youtube', 'audio/youtube', 'audio/x-youtube']}
- ],
- vimeo: [
- {version: null, types: ['video/vimeo', 'video/x-vimeo']}
- ]
-};
diff --git a/files_videoviewer/mediaelement/src/js/me-plugindetector.js b/files_videoviewer/mediaelement/src/js/me-plugindetector.js
deleted file mode 100755
index e71495f85..000000000
--- a/files_videoviewer/mediaelement/src/js/me-plugindetector.js
+++ /dev/null
@@ -1,102 +0,0 @@
-
-// Core detector, plugins are added below
-mejs.PluginDetector = {
-
- // main public function to test a plug version number PluginDetector.hasPluginVersion('flash',[9,0,125]);
- hasPluginVersion: function(plugin, v) {
- var pv = this.plugins[plugin];
- v[1] = v[1] || 0;
- v[2] = v[2] || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- },
-
- // cached values
- nav: window.navigator,
- ua: window.navigator.userAgent.toLowerCase(),
-
- // stored version numbers
- plugins: [],
-
- // runs detectPlugin() and stores the version number
- addPlugin: function(p, pluginName, mimeType, activeX, axDetect) {
- this.plugins[p] = this.detectPlugin(pluginName, mimeType, activeX, axDetect);
- },
-
- // get the version number from the mimetype (all but IE) or ActiveX (IE)
- detectPlugin: function(pluginName, mimeType, activeX, axDetect) {
-
- var version = [0,0,0],
- description,
- i,
- ax;
-
- // Firefox, Webkit, Opera
- if (typeof(this.nav.plugins) != 'undefined' && typeof this.nav.plugins[pluginName] == 'object') {
- description = this.nav.plugins[pluginName].description;
- if (description && !(typeof this.nav.mimeTypes != 'undefined' && this.nav.mimeTypes[mimeType] && !this.nav.mimeTypes[mimeType].enabledPlugin)) {
- version = description.replace(pluginName, '').replace(/^\s+/,'').replace(/\sr/gi,'.').split('.');
- for (i=0; i<version.length; i++) {
- version[i] = parseInt(version[i].match(/\d+/), 10);
- }
- }
- // Internet Explorer / ActiveX
- } else if (typeof(window.ActiveXObject) != 'undefined') {
- try {
- ax = new ActiveXObject(activeX);
- if (ax) {
- version = axDetect(ax);
- }
- }
- catch (e) { }
- }
- return version;
- }
-};
-
-// Add Flash detection
-mejs.PluginDetector.addPlugin('flash','Shockwave Flash','application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash', function(ax) {
- // adapted from SWFObject
- var version = [],
- d = ax.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- return version;
-});
-
-// Add Silverlight detection
-mejs.PluginDetector.addPlugin('silverlight','Silverlight Plug-In','application/x-silverlight-2','AgControl.AgControl', function (ax) {
- // Silverlight cannot report its version number to IE
- // but it does have a isVersionSupported function, so we have to loop through it to get a version number.
- // adapted from http://www.silverlightversion.com/
- var v = [0,0,0,0],
- loopMatch = function(ax, v, i, n) {
- while(ax.isVersionSupported(v[0]+ "."+ v[1] + "." + v[2] + "." + v[3])){
- v[i]+=n;
- }
- v[i] -= n;
- };
- loopMatch(ax, v, 0, 1);
- loopMatch(ax, v, 1, 1);
- loopMatch(ax, v, 2, 10000); // the third place in the version number is usually 5 digits (4.0.xxxxx)
- loopMatch(ax, v, 2, 1000);
- loopMatch(ax, v, 2, 100);
- loopMatch(ax, v, 2, 10);
- loopMatch(ax, v, 2, 1);
- loopMatch(ax, v, 3, 1);
-
- return v;
-});
-// add adobe acrobat
-/*
-PluginDetector.addPlugin('acrobat','Adobe Acrobat','application/pdf','AcroPDF.PDF', function (ax) {
- var version = [],
- d = ax.GetVersions().split(',')[0].split('=')[1].split('.');
-
- if (d) {
- version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- return version;
-});
-*/ \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/me-shim.js b/files_videoviewer/mediaelement/src/js/me-shim.js
deleted file mode 100755
index d1a5e6d90..000000000
--- a/files_videoviewer/mediaelement/src/js/me-shim.js
+++ /dev/null
@@ -1,892 +0,0 @@
-// Handles calls from Flash/Silverlight and reports them as native <video/audio> events and properties
-mejs.MediaPluginBridge = {
-
- pluginMediaElements:{},
- htmlMediaElements:{},
-
- registerPluginElement: function (id, pluginMediaElement, htmlMediaElement) {
- this.pluginMediaElements[id] = pluginMediaElement;
- this.htmlMediaElements[id] = htmlMediaElement;
- },
-
- unregisterPluginElement: function (id) {
- delete this.pluginMediaElements[id];
- delete this.htmlMediaElements[id];
- },
-
- // when Flash/Silverlight is ready, it calls out to this method
- initPlugin: function (id) {
-
- var pluginMediaElement = this.pluginMediaElements[id],
- htmlMediaElement = this.htmlMediaElements[id];
-
- if (pluginMediaElement) {
- // find the javascript bridge
- switch (pluginMediaElement.pluginType) {
- case "flash":
- pluginMediaElement.pluginElement = pluginMediaElement.pluginApi = document.getElementById(id);
- break;
- case "silverlight":
- pluginMediaElement.pluginElement = document.getElementById(pluginMediaElement.id);
- pluginMediaElement.pluginApi = pluginMediaElement.pluginElement.Content.MediaElementJS;
- break;
- }
-
- if (pluginMediaElement.pluginApi != null && pluginMediaElement.success) {
- pluginMediaElement.success(pluginMediaElement, htmlMediaElement);
- }
- }
- },
-
- // receives events from Flash/Silverlight and sends them out as HTML5 media events
- // http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html
- fireEvent: function (id, eventName, values) {
-
- var
- e,
- i,
- bufferedTime,
- pluginMediaElement = this.pluginMediaElements[id];
-
- // fake event object to mimic real HTML media event.
- e = {
- type: eventName,
- target: pluginMediaElement
- };
-
- // attach all values to element and event object
- for (i in values) {
- pluginMediaElement[i] = values[i];
- e[i] = values[i];
- }
-
- // fake the newer W3C buffered TimeRange (loaded and total have been removed)
- bufferedTime = values.bufferedTime || 0;
-
- e.target.buffered = e.buffered = {
- start: function(index) {
- return 0;
- },
- end: function (index) {
- return bufferedTime;
- },
- length: 1
- };
-
- pluginMediaElement.dispatchEvent(e.type, e);
- }
-};
-
-/*
-Default options
-*/
-mejs.MediaElementDefaults = {
- // allows testing on HTML5, flash, silverlight
- // auto: attempts to detect what the browser can do
- // auto_plugin: prefer plugins and then attempt native HTML5
- // native: forces HTML5 playback
- // shim: disallows HTML5, will attempt either Flash or Silverlight
- // none: forces fallback view
- mode: 'auto',
- // remove or reorder to change plugin priority and availability
- plugins: ['flash','silverlight','youtube','vimeo'],
- // shows debug errors on screen
- enablePluginDebug: false,
- // overrides the type specified, useful for dynamic instantiation
- type: '',
- // path to Flash and Silverlight plugins
- pluginPath: mejs.Utility.getScriptPath(['mediaelement.js','mediaelement.min.js','mediaelement-and-player.js','mediaelement-and-player.min.js']),
- // name of flash file
- flashName: 'flashmediaelement.swf',
- // streamer for RTMP streaming
- flashStreamer: '',
- // turns on the smoothing filter in Flash
- enablePluginSmoothing: false,
- // enabled pseudo-streaming (seek) on .mp4 files
- enablePseudoStreaming: false,
- // start query parameter sent to server for pseudo-streaming
- pseudoStreamingStartQueryParam: 'start',
- // name of silverlight file
- silverlightName: 'silverlightmediaelement.xap',
- // default if the <video width> is not specified
- defaultVideoWidth: 480,
- // default if the <video height> is not specified
- defaultVideoHeight: 270,
- // overrides <video width>
- pluginWidth: -1,
- // overrides <video height>
- pluginHeight: -1,
- // additional plugin variables in 'key=value' form
- pluginVars: [],
- // rate in milliseconds for Flash and Silverlight to fire the timeupdate event
- // larger number is less accurate, but less strain on plugin->JavaScript bridge
- timerRate: 250,
- // initial volume for player
- startVolume: 0.8,
- success: function () { },
- error: function () { }
-};
-
-/*
-Determines if a browser supports the <video> or <audio> element
-and returns either the native element or a Flash/Silverlight version that
-mimics HTML5 MediaElement
-*/
-mejs.MediaElement = function (el, o) {
- return mejs.HtmlMediaElementShim.create(el,o);
-};
-
-mejs.HtmlMediaElementShim = {
-
- create: function(el, o) {
- var
- options = mejs.MediaElementDefaults,
- htmlMediaElement = (typeof(el) == 'string') ? document.getElementById(el) : el,
- tagName = htmlMediaElement.tagName.toLowerCase(),
- isMediaTag = (tagName === 'audio' || tagName === 'video'),
- src = (isMediaTag) ? htmlMediaElement.getAttribute('src') : htmlMediaElement.getAttribute('href'),
- poster = htmlMediaElement.getAttribute('poster'),
- autoplay = htmlMediaElement.getAttribute('autoplay'),
- preload = htmlMediaElement.getAttribute('preload'),
- controls = htmlMediaElement.getAttribute('controls'),
- playback,
- prop;
-
- // extend options
- for (prop in o) {
- options[prop] = o[prop];
- }
-
- // clean up attributes
- src = (typeof src == 'undefined' || src === null || src == '') ? null : src;
- poster = (typeof poster == 'undefined' || poster === null) ? '' : poster;
- preload = (typeof preload == 'undefined' || preload === null || preload === 'false') ? 'none' : preload;
- autoplay = !(typeof autoplay == 'undefined' || autoplay === null || autoplay === 'false');
- controls = !(typeof controls == 'undefined' || controls === null || controls === 'false');
-
- // test for HTML5 and plugin capabilities
- playback = this.determinePlayback(htmlMediaElement, options, mejs.MediaFeatures.supportsMediaTag, isMediaTag, src);
- playback.url = (playback.url !== null) ? mejs.Utility.absolutizeUrl(playback.url) : '';
-
- if (playback.method == 'native') {
- // second fix for android
- if (mejs.MediaFeatures.isBustedAndroid) {
- htmlMediaElement.src = playback.url;
- htmlMediaElement.addEventListener('click', function() {
- htmlMediaElement.play();
- }, false);
- }
-
- // add methods to native HTMLMediaElement
- return this.updateNative(playback, options, autoplay, preload);
- } else if (playback.method !== '') {
- // create plugin to mimic HTMLMediaElement
-
- return this.createPlugin( playback, options, poster, autoplay, preload, controls);
- } else {
- // boo, no HTML5, no Flash, no Silverlight.
- this.createErrorMessage( playback, options, poster );
-
- return this;
- }
- },
-
- determinePlayback: function(htmlMediaElement, options, supportsMediaTag, isMediaTag, src) {
- var
- mediaFiles = [],
- i,
- j,
- k,
- l,
- n,
- type,
- result = { method: '', url: '', htmlMediaElement: htmlMediaElement, isVideo: (htmlMediaElement.tagName.toLowerCase() != 'audio')},
- pluginName,
- pluginVersions,
- pluginInfo,
- dummy,
- media;
-
- // STEP 1: Get URL and type from <video src> or <source src>
-
- // supplied type overrides <video type> and <source type>
- if (typeof options.type != 'undefined' && options.type !== '') {
-
- // accept either string or array of types
- if (typeof options.type == 'string') {
- mediaFiles.push({type:options.type, url:src});
- } else {
-
- for (i=0; i<options.type.length; i++) {
- mediaFiles.push({type:options.type[i], url:src});
- }
- }
-
- // test for src attribute first
- } else if (src !== null) {
- type = this.formatType(src, htmlMediaElement.getAttribute('type'));
- mediaFiles.push({type:type, url:src});
-
- // then test for <source> elements
- } else {
- // test <source> types to see if they are usable
- for (i = 0; i < htmlMediaElement.childNodes.length; i++) {
- n = htmlMediaElement.childNodes[i];
- if (n.nodeType == 1 && n.tagName.toLowerCase() == 'source') {
- src = n.getAttribute('src');
- type = this.formatType(src, n.getAttribute('type'));
- media = n.getAttribute('media');
-
- if (!media || !window.matchMedia || (window.matchMedia && window.matchMedia(media).matches)) {
- mediaFiles.push({type:type, url:src});
- }
- }
- }
- }
-
- // in the case of dynamicly created players
- // check for audio types
- if (!isMediaTag && mediaFiles.length > 0 && mediaFiles[0].url !== null && this.getTypeFromFile(mediaFiles[0].url).indexOf('audio') > -1) {
- result.isVideo = false;
- }
-
-
- // STEP 2: Test for playback method
-
- // special case for Android which sadly doesn't implement the canPlayType function (always returns '')
- if (mejs.MediaFeatures.isBustedAndroid) {
- htmlMediaElement.canPlayType = function(type) {
- return (type.match(/video\/(mp4|m4v)/gi) !== null) ? 'maybe' : '';
- };
- }
-
-
- // test for native playback first
- if (supportsMediaTag && (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'native')) {
-
- if (!isMediaTag) {
-
- // create a real HTML5 Media Element
- dummy = document.createElement( result.isVideo ? 'video' : 'audio');
- htmlMediaElement.parentNode.insertBefore(dummy, htmlMediaElement);
- htmlMediaElement.style.display = 'none';
-
- // use this one from now on
- result.htmlMediaElement = htmlMediaElement = dummy;
- }
-
- for (i=0; i<mediaFiles.length; i++) {
- // normal check
- if (htmlMediaElement.canPlayType(mediaFiles[i].type).replace(/no/, '') !== ''
- // special case for Mac/Safari 5.0.3 which answers '' to canPlayType('audio/mp3') but 'maybe' to canPlayType('audio/mpeg')
- || htmlMediaElement.canPlayType(mediaFiles[i].type.replace(/mp3/,'mpeg')).replace(/no/, '') !== '') {
- result.method = 'native';
- result.url = mediaFiles[i].url;
- break;
- }
- }
-
- if (result.method === 'native') {
- if (result.url !== null) {
- htmlMediaElement.src = result.url;
- }
-
- // if `auto_plugin` mode, then cache the native result but try plugins.
- if (options.mode !== 'auto_plugin') {
- return result;
- }
- }
- }
-
- // if native playback didn't work, then test plugins
- if (options.mode === 'auto' || options.mode === 'auto_plugin' || options.mode === 'shim') {
- for (i=0; i<mediaFiles.length; i++) {
- type = mediaFiles[i].type;
-
- // test all plugins in order of preference [silverlight, flash]
- for (j=0; j<options.plugins.length; j++) {
-
- pluginName = options.plugins[j];
-
- // test version of plugin (for future features)
- pluginVersions = mejs.plugins[pluginName];
-
- for (k=0; k<pluginVersions.length; k++) {
- pluginInfo = pluginVersions[k];
-
- // test if user has the correct plugin version
-
- // for youtube/vimeo
- if (pluginInfo.version == null ||
-
- mejs.PluginDetector.hasPluginVersion(pluginName, pluginInfo.version)) {
-
- // test for plugin playback types
- for (l=0; l<pluginInfo.types.length; l++) {
- // find plugin that can play the type
- if (type == pluginInfo.types[l]) {
- result.method = pluginName;
- result.url = mediaFiles[i].url;
- return result;
- }
- }
- }
- }
- }
- }
- }
-
- // at this point, being in 'auto_plugin' mode implies that we tried plugins but failed.
- // if we have native support then return that.
- if (options.mode === 'auto_plugin' && result.method === 'native') {
- return result;
- }
-
- // what if there's nothing to play? just grab the first available
- if (result.method === '' && mediaFiles.length > 0) {
- result.url = mediaFiles[0].url;
- }
-
- return result;
- },
-
- formatType: function(url, type) {
- var ext;
-
- // if no type is supplied, fake it with the extension
- if (url && !type) {
- return this.getTypeFromFile(url);
- } else {
- // only return the mime part of the type in case the attribute contains the codec
- // see http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-source-element
- // `video/mp4; codecs="avc1.42E01E, mp4a.40.2"` becomes `video/mp4`
-
- if (type && ~type.indexOf(';')) {
- return type.substr(0, type.indexOf(';'));
- } else {
- return type;
- }
- }
- },
-
- getTypeFromFile: function(url) {
- url = url.split('?')[0];
- var ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
- return (/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(ext) ? 'video' : 'audio') + '/' + this.getTypeFromExtension(ext);
- },
-
- getTypeFromExtension: function(ext) {
-
- switch (ext) {
- case 'mp4':
- case 'm4v':
- return 'mp4';
- case 'webm':
- case 'webma':
- case 'webmv':
- return 'webm';
- case 'ogg':
- case 'oga':
- case 'ogv':
- return 'ogg';
- default:
- return ext;
- }
- },
-
- createErrorMessage: function(playback, options, poster) {
- var
- htmlMediaElement = playback.htmlMediaElement,
- errorContainer = document.createElement('div');
-
- errorContainer.className = 'me-cannotplay';
-
- try {
- errorContainer.style.width = htmlMediaElement.width + 'px';
- errorContainer.style.height = htmlMediaElement.height + 'px';
- } catch (e) {}
-
- errorContainer.innerHTML = (poster !== '') ?
- '<a href="' + playback.url + '"><img src="' + poster + '" width="100%" height="100%" /></a>' :
- '<a href="' + playback.url + '"><span>' + mejs.i18n.t('Download File') + '</span></a>';
-
- htmlMediaElement.parentNode.insertBefore(errorContainer, htmlMediaElement);
- htmlMediaElement.style.display = 'none';
-
- options.error(htmlMediaElement);
- },
-
- createPlugin:function(playback, options, poster, autoplay, preload, controls) {
- var
- htmlMediaElement = playback.htmlMediaElement,
- width = 1,
- height = 1,
- pluginid = 'me_' + playback.method + '_' + (mejs.meIndex++),
- pluginMediaElement = new mejs.PluginMediaElement(pluginid, playback.method, playback.url),
- container = document.createElement('div'),
- specialIEContainer,
- node,
- initVars;
-
- // copy tagName from html media element
- pluginMediaElement.tagName = htmlMediaElement.tagName
-
- // copy attributes from html media element to plugin media element
- for (var i = 0; i < htmlMediaElement.attributes.length; i++) {
- var attribute = htmlMediaElement.attributes[i];
- if (attribute.specified == true) {
- pluginMediaElement.setAttribute(attribute.name, attribute.value);
- }
- }
-
- // check for placement inside a <p> tag (sometimes WYSIWYG editors do this)
- node = htmlMediaElement.parentNode;
- while (node !== null && node.tagName.toLowerCase() != 'body') {
- if (node.parentNode.tagName.toLowerCase() == 'p') {
- node.parentNode.parentNode.insertBefore(node, node.parentNode);
- break;
- }
- node = node.parentNode;
- }
-
- if (playback.isVideo) {
- width = (options.videoWidth > 0) ? options.videoWidth : (htmlMediaElement.getAttribute('width') !== null) ? htmlMediaElement.getAttribute('width') : options.defaultVideoWidth;
- height = (options.videoHeight > 0) ? options.videoHeight : (htmlMediaElement.getAttribute('height') !== null) ? htmlMediaElement.getAttribute('height') : options.defaultVideoHeight;
-
- // in case of '%' make sure it's encoded
- width = mejs.Utility.encodeUrl(width);
- height = mejs.Utility.encodeUrl(height);
-
- } else {
- if (options.enablePluginDebug) {
- width = 320;
- height = 240;
- }
- }
-
- // register plugin
- pluginMediaElement.success = options.success;
- mejs.MediaPluginBridge.registerPluginElement(pluginid, pluginMediaElement, htmlMediaElement);
-
- // add container (must be added to DOM before inserting HTML for IE)
- container.className = 'me-plugin';
- container.id = pluginid + '_container';
-
- if (playback.isVideo) {
- htmlMediaElement.parentNode.insertBefore(container, htmlMediaElement);
- } else {
- document.body.insertBefore(container, document.body.childNodes[0]);
- }
-
- // flash/silverlight vars
- initVars = [
- 'id=' + pluginid,
- 'isvideo=' + ((playback.isVideo) ? "true" : "false"),
- 'autoplay=' + ((autoplay) ? "true" : "false"),
- 'preload=' + preload,
- 'width=' + width,
- 'startvolume=' + options.startVolume,
- 'timerrate=' + options.timerRate,
- 'flashstreamer=' + options.flashStreamer,
- 'height=' + height,
- 'pseudostreamstart=' + options.pseudoStreamingStartQueryParam];
-
- if (playback.url !== null) {
- if (playback.method == 'flash') {
- initVars.push('file=' + mejs.Utility.encodeUrl(playback.url));
- } else {
- initVars.push('file=' + playback.url);
- }
- }
- if (options.enablePluginDebug) {
- initVars.push('debug=true');
- }
- if (options.enablePluginSmoothing) {
- initVars.push('smoothing=true');
- }
- if (options.enablePseudoStreaming) {
- initVars.push('pseudostreaming=true');
- }
- if (controls) {
- initVars.push('controls=true'); // shows controls in the plugin if desired
- }
- if (options.pluginVars) {
- initVars = initVars.concat(options.pluginVars);
- }
-
- switch (playback.method) {
- case 'silverlight':
- container.innerHTML =
-'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="' + pluginid + '" name="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
-'<param name="initParams" value="' + initVars.join(',') + '" />' +
-'<param name="windowless" value="true" />' +
-'<param name="background" value="black" />' +
-'<param name="minRuntimeVersion" value="3.0.0.0" />' +
-'<param name="autoUpgrade" value="true" />' +
-'<param name="source" value="' + options.pluginPath + options.silverlightName + '" />' +
-'</object>';
- break;
-
- case 'flash':
-
- if (mejs.MediaFeatures.isIE) {
- specialIEContainer = document.createElement('div');
- container.appendChild(specialIEContainer);
- specialIEContainer.outerHTML =
-'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
-'id="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
-'<param name="movie" value="' + options.pluginPath + options.flashName + '?x=' + (new Date()) + '" />' +
-'<param name="flashvars" value="' + initVars.join('&amp;') + '" />' +
-'<param name="quality" value="high" />' +
-'<param name="bgcolor" value="#000000" />' +
-'<param name="wmode" value="transparent" />' +
-'<param name="allowScriptAccess" value="always" />' +
-'<param name="allowFullScreen" value="true" />' +
-'</object>';
-
- } else {
-
- container.innerHTML =
-'<embed id="' + pluginid + '" name="' + pluginid + '" ' +
-'play="true" ' +
-'loop="false" ' +
-'quality="high" ' +
-'bgcolor="#000000" ' +
-'wmode="transparent" ' +
-'allowScriptAccess="always" ' +
-'allowFullScreen="true" ' +
-'type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" ' +
-'src="' + options.pluginPath + options.flashName + '" ' +
-'flashvars="' + initVars.join('&') + '" ' +
-'width="' + width + '" ' +
-'height="' + height + '" ' +
-'class="mejs-shim"></embed>';
- }
- break;
-
- case 'youtube':
-
-
- var
- videoId = playback.url.substr(playback.url.lastIndexOf('=')+1);
- youtubeSettings = {
- container: container,
- containerId: container.id,
- pluginMediaElement: pluginMediaElement,
- pluginId: pluginid,
- videoId: videoId,
- height: height,
- width: width
- };
-
- if (mejs.PluginDetector.hasPluginVersion('flash', [10,0,0]) ) {
- mejs.YouTubeApi.createFlash(youtubeSettings);
- } else {
- mejs.YouTubeApi.enqueueIframe(youtubeSettings);
- }
-
- break;
-
- // DEMO Code. Does NOT work.
- case 'vimeo':
- //console.log('vimeoid');
-
- pluginMediaElement.vimeoid = playback.url.substr(playback.url.lastIndexOf('/')+1);
-
- container.innerHTML ='<iframe src="http://player.vimeo.com/video/' + pluginMediaElement.vimeoid + '?portrait=0&byline=0&title=0" width="' + width +'" height="' + height +'" frameborder="0" class="mejs-shim"></iframe>';
-
- /*
- container.innerHTML =
- '<object width="' + width + '" height="' + height + '" class="mejs-shim">' +
- '<param name="allowfullscreen" value="true" />' +
- '<param name="allowscriptaccess" value="always" />' +
- '<param name="flashvars" value="api=1" />' +
- '<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=' + pluginMediaElement.vimeoid + '&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" />' +
- '<embed src="//vimeo.com/moogaloop.swf?api=1&amp;clip_id=' + pluginMediaElement.vimeoid + '&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="' + width + '" height="' + height + '" class="mejs-shim"></embed>' +
- '</object>';
- */
-
- break;
- }
- // hide original element
- htmlMediaElement.style.display = 'none';
-
- // FYI: options.success will be fired by the MediaPluginBridge
-
- return pluginMediaElement;
- },
-
- updateNative: function(playback, options, autoplay, preload) {
-
- var htmlMediaElement = playback.htmlMediaElement,
- m;
-
-
- // add methods to video object to bring it into parity with Flash Object
- for (m in mejs.HtmlMediaElement) {
- htmlMediaElement[m] = mejs.HtmlMediaElement[m];
- }
-
- /*
- Chrome now supports preload="none"
- if (mejs.MediaFeatures.isChrome) {
-
- // special case to enforce preload attribute (Chrome doesn't respect this)
- if (preload === 'none' && !autoplay) {
-
- // forces the browser to stop loading (note: fails in IE9)
- htmlMediaElement.src = '';
- htmlMediaElement.load();
- htmlMediaElement.canceledPreload = true;
-
- htmlMediaElement.addEventListener('play',function() {
- if (htmlMediaElement.canceledPreload) {
- htmlMediaElement.src = playback.url;
- htmlMediaElement.load();
- htmlMediaElement.play();
- htmlMediaElement.canceledPreload = false;
- }
- }, false);
- // for some reason Chrome forgets how to autoplay sometimes.
- } else if (autoplay) {
- htmlMediaElement.load();
- htmlMediaElement.play();
- }
- }
- */
-
- // fire success code
- options.success(htmlMediaElement, htmlMediaElement);
-
- return htmlMediaElement;
- }
-};
-
-/*
- - test on IE (object vs. embed)
- - determine when to use iframe (Firefox, Safari, Mobile) vs. Flash (Chrome, IE)
- - fullscreen?
-*/
-
-// YouTube Flash and Iframe API
-mejs.YouTubeApi = {
- isIframeStarted: false,
- isIframeLoaded: false,
- loadIframeApi: function() {
- if (!this.isIframeStarted) {
- var tag = document.createElement('script');
- tag.src = "//www.youtube.com/player_api";
- var firstScriptTag = document.getElementsByTagName('script')[0];
- firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
- this.isIframeStarted = true;
- }
- },
- iframeQueue: [],
- enqueueIframe: function(yt) {
-
- if (this.isLoaded) {
- this.createIframe(yt);
- } else {
- this.loadIframeApi();
- this.iframeQueue.push(yt);
- }
- },
- createIframe: function(settings) {
-
- var
- pluginMediaElement = settings.pluginMediaElement,
- player = new YT.Player(settings.containerId, {
- height: settings.height,
- width: settings.width,
- videoId: settings.videoId,
- playerVars: {controls:0},
- events: {
- 'onReady': function() {
-
- // hook up iframe object to MEjs
- settings.pluginMediaElement.pluginApi = player;
-
- // init mejs
- mejs.MediaPluginBridge.initPlugin(settings.pluginId);
-
- // create timer
- setInterval(function() {
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'timeupdate');
- }, 250);
- },
- 'onStateChange': function(e) {
-
- mejs.YouTubeApi.handleStateChange(e.data, player, pluginMediaElement);
-
- }
- }
- });
- },
-
- createEvent: function (player, pluginMediaElement, eventName) {
- var obj = {
- type: eventName,
- target: pluginMediaElement
- };
-
- if (player && player.getDuration) {
-
- // time
- pluginMediaElement.currentTime = obj.currentTime = player.getCurrentTime();
- pluginMediaElement.duration = obj.duration = player.getDuration();
-
- // state
- obj.paused = pluginMediaElement.paused;
- obj.ended = pluginMediaElement.ended;
-
- // sound
- obj.muted = player.isMuted();
- obj.volume = player.getVolume() / 100;
-
- // progress
- obj.bytesTotal = player.getVideoBytesTotal();
- obj.bufferedBytes = player.getVideoBytesLoaded();
-
- // fake the W3C buffered TimeRange
- var bufferedTime = obj.bufferedBytes / obj.bytesTotal * obj.duration;
-
- obj.target.buffered = obj.buffered = {
- start: function(index) {
- return 0;
- },
- end: function (index) {
- return bufferedTime;
- },
- length: 1
- };
-
- }
-
- // send event up the chain
- pluginMediaElement.dispatchEvent(obj.type, obj);
- },
-
- iFrameReady: function() {
-
- this.isLoaded = true;
- this.isIframeLoaded = true;
-
- while (this.iframeQueue.length > 0) {
- var settings = this.iframeQueue.pop();
- this.createIframe(settings);
- }
- },
-
- // FLASH!
- flashPlayers: {},
- createFlash: function(settings) {
-
- this.flashPlayers[settings.pluginId] = settings;
-
- /*
- settings.container.innerHTML =
- '<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0" ' +
- 'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' +
- '<param name="allowScriptAccess" value="always">' +
- '<param name="wmode" value="transparent">' +
- '</object>';
- */
-
- var specialIEContainer,
- youtubeUrl = '//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0';
-
- if (mejs.MediaFeatures.isIE) {
-
- specialIEContainer = document.createElement('div');
- settings.container.appendChild(specialIEContainer);
- specialIEContainer.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
-'id="' + settings.pluginId + '" width="' + settings.width + '" height="' + settings.height + '" class="mejs-shim">' +
- '<param name="movie" value="' + youtubeUrl + '" />' +
- '<param name="wmode" value="transparent" />' +
- '<param name="allowScriptAccess" value="always" />' +
- '<param name="allowFullScreen" value="true" />' +
-'</object>';
- } else {
- settings.container.innerHTML =
- '<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="' + youtubeUrl + '" ' +
- 'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' +
- '<param name="allowScriptAccess" value="always">' +
- '<param name="wmode" value="transparent">' +
- '</object>';
- }
-
- },
-
- flashReady: function(id) {
- var
- settings = this.flashPlayers[id],
- player = document.getElementById(id),
- pluginMediaElement = settings.pluginMediaElement;
-
- // hook up and return to MediaELementPlayer.success
- pluginMediaElement.pluginApi =
- pluginMediaElement.pluginElement = player;
- mejs.MediaPluginBridge.initPlugin(id);
-
- // load the youtube video
- player.cueVideoById(settings.videoId);
-
- var callbackName = settings.containerId + '_callback';
-
- window[callbackName] = function(e) {
- mejs.YouTubeApi.handleStateChange(e, player, pluginMediaElement);
- }
-
- player.addEventListener('onStateChange', callbackName);
-
- setInterval(function() {
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'timeupdate');
- }, 250);
- },
-
- handleStateChange: function(youTubeState, player, pluginMediaElement) {
- switch (youTubeState) {
- case -1: // not started
- pluginMediaElement.paused = true;
- pluginMediaElement.ended = true;
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'loadedmetadata');
- //createYouTubeEvent(player, pluginMediaElement, 'loadeddata');
- break;
- case 0:
- pluginMediaElement.paused = false;
- pluginMediaElement.ended = true;
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'ended');
- break;
- case 1:
- pluginMediaElement.paused = false;
- pluginMediaElement.ended = false;
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'play');
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'playing');
- break;
- case 2:
- pluginMediaElement.paused = true;
- pluginMediaElement.ended = false;
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'pause');
- break;
- case 3: // buffering
- mejs.YouTubeApi.createEvent(player, pluginMediaElement, 'progress');
- break;
- case 5:
- // cued?
- break;
-
- }
-
- }
-}
-// IFRAME
-function onYouTubePlayerAPIReady() {
- mejs.YouTubeApi.iFrameReady();
-}
-// FLASH
-function onYouTubePlayerReady(id) {
- mejs.YouTubeApi.flashReady(id);
-}
-
-window.mejs = mejs;
-window.MediaElement = mejs.MediaElement;
diff --git a/files_videoviewer/mediaelement/src/js/me-utility.js b/files_videoviewer/mediaelement/src/js/me-utility.js
deleted file mode 100755
index 305cf3e55..000000000
--- a/files_videoviewer/mediaelement/src/js/me-utility.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-Utility methods
-*/
-mejs.Utility = {
- encodeUrl: function(url) {
- return encodeURIComponent(url); //.replace(/\?/gi,'%3F').replace(/=/gi,'%3D').replace(/&/gi,'%26');
- },
- escapeHTML: function(s) {
- return s.toString().split('&').join('&amp;').split('<').join('&lt;').split('"').join('&quot;');
- },
- absolutizeUrl: function(url) {
- var el = document.createElement('div');
- el.innerHTML = '<a href="' + this.escapeHTML(url) + '">x</a>';
- return el.firstChild.href;
- },
- getScriptPath: function(scriptNames) {
- var
- i = 0,
- j,
- codePath = '',
- testname = '',
- slashPos,
- filenamePos,
- scriptUrl,
- scriptPath,
- scriptFilename,
- scripts = document.getElementsByTagName('script'),
- il = scripts.length,
- jl = scriptNames.length;
-
- // go through all <script> tags
- for (; i < il; i++) {
- scriptUrl = scripts[i].src;
- slashPos = scriptUrl.lastIndexOf('/');
- if (slashPos > -1) {
- scriptFilename = scriptUrl.substring(slashPos + 1);
- scriptPath = scriptUrl.substring(0, slashPos + 1);
- } else {
- scriptFilename = scriptUrl;
- scriptPath = '';
- }
-
- // see if any <script> tags have a file name that matches the
- for (j = 0; j < jl; j++) {
- testname = scriptNames[j];
- filenamePos = scriptFilename.indexOf(testname);
- if (filenamePos > -1) {
- codePath = scriptPath;
- break;
- }
- }
-
- // if we found a path, then break and return it
- if (codePath !== '') {
- break;
- }
- }
-
- // send the best path back
- return codePath;
- },
- secondsToTimeCode: function(time, forceHours, showFrameCount, fps) {
- //add framecount
- if (typeof showFrameCount == 'undefined') {
- showFrameCount=false;
- } else if(typeof fps == 'undefined') {
- fps = 25;
- }
-
- var hours = Math.floor(time / 3600) % 24,
- minutes = Math.floor(time / 60) % 60,
- seconds = Math.floor(time % 60),
- frames = Math.floor(((time % 1)*fps).toFixed(3)),
- result =
- ( (forceHours || hours > 0) ? (hours < 10 ? '0' + hours : hours) + ':' : '')
- + (minutes < 10 ? '0' + minutes : minutes) + ':'
- + (seconds < 10 ? '0' + seconds : seconds)
- + ((showFrameCount) ? ':' + (frames < 10 ? '0' + frames : frames) : '');
-
- return result;
- },
-
- timeCodeToSeconds: function(hh_mm_ss_ff, forceHours, showFrameCount, fps){
- if (typeof showFrameCount == 'undefined') {
- showFrameCount=false;
- } else if(typeof fps == 'undefined') {
- fps = 25;
- }
-
- var tc_array = hh_mm_ss_ff.split(":"),
- tc_hh = parseInt(tc_array[0], 10),
- tc_mm = parseInt(tc_array[1], 10),
- tc_ss = parseInt(tc_array[2], 10),
- tc_ff = 0,
- tc_in_seconds = 0;
-
- if (showFrameCount) {
- tc_ff = parseInt(tc_array[3])/fps;
- }
-
- tc_in_seconds = ( tc_hh * 3600 ) + ( tc_mm * 60 ) + tc_ss + tc_ff;
-
- return tc_in_seconds;
- },
-
-
- convertSMPTEtoSeconds: function (SMPTE) {
- if (typeof SMPTE != 'string')
- return false;
-
- SMPTE = SMPTE.replace(',', '.');
-
- var secs = 0,
- decimalLen = (SMPTE.indexOf('.') != -1) ? SMPTE.split('.')[1].length : 0,
- multiplier = 1;
-
- SMPTE = SMPTE.split(':').reverse();
-
- for (var i = 0; i < SMPTE.length; i++) {
- multiplier = 1;
- if (i > 0) {
- multiplier = Math.pow(60, i);
- }
- secs += Number(SMPTE[i]) * multiplier;
- }
- return Number(secs.toFixed(decimalLen));
- },
-
- /* borrowed from SWFObject: http://code.google.com/p/swfobject/source/browse/trunk/swfobject/src/swfobject.js#474 */
- removeSwf: function(id) {
- var obj = document.getElementById(id);
- if (obj && /object|embed/i.test(obj.nodeName)) {
- if (mejs.MediaFeatures.isIE) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- mejs.Utility.removeObjectInIE(id);
- } else {
- setTimeout(arguments.callee, 10);
- }
- })();
- } else {
- obj.parentNode.removeChild(obj);
- }
- }
- },
- removeObjectInIE: function(id) {
- var obj = document.getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-};
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-ads-vast.js b/files_videoviewer/mediaelement/src/js/mep-feature-ads-vast.js
deleted file mode 100755
index 623419dc2..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-ads-vast.js
+++ /dev/null
@@ -1,243 +0,0 @@
-
-// VAST ads plugin
-// Sponsored by Minoto Video
-
-(function($) {
-
- $.extend(mejs.MepDefaults, {
- // URL to vast data: 'http://minotovideo.com/sites/minotovideo.com/files/upload/eday_vast_tag.xml'
- vastAdTagUrl: ''
- });
-
- $.extend(MediaElementPlayer.prototype, {
- buildvast: function(player, controls, layers, media) {
-
- var t = this;
-
- // begin loading
- if (t.options.vastAdTagUrl != '') {
- t.vastLoadAdTagInfo();
- }
-
- // make sure the preroll ad system is ready (it will ensure it can't be called twice)
- t.buildads(player, controls, layers, media);
-
-
- t.vastSetupEvents();
- },
-
- vastAdTagIsLoading: false,
-
- vastAdTagIsLoaded: false,
-
- vastStartedPlaying: false,
-
- vastAdTags: [],
-
- vastSetupEvents: function() {
- var t = this;
-
-
- // START: preroll
- t.container.on('mejsprerollstarted', function() {
-
- console.log('VAST','mejsprerollstarted');
-
- if (t.vastAdTags.length > 0) {
-
- var adTag = t.vastAdTags[0];
-
- // always fire this event
- if (adTag.trackingEvents['start']) {
- t.adsLoadUrl(adTag.trackingEvents['start']);
- }
-
- // only do impressions once
- if (!adTag.shown && adTag.impressions.length > 0) {
-
- for (var i=0, il=adTag.impressions.length; i<il; i++) {
- t.adsLoadUrl(adTag.impressions[i]);
- }
- }
-
- adTag.shown = true;
- }
-
- });
-
- // END: preroll
- t.container.on('mejsprerollended', function() {
-
- console.log('VAST','mejsprerollended');
-
- if (t.vastAdTags.length > 0 && t.vastAdTags[0].trackingEvents['complete']) {
- t.adsLoadUrl(t.vastAdTags[0].trackingEvents['complete']);
- }
-
- });
-
- },
-
- vastSetAdTagUrl: function(url) {
-
- var t = this;
-
- // set and reset
- t.options.vastAdTagUrl = url;
- t.vastAdTagIsLoaded = false;
- t.vastAdTags = [];
- },
-
- vastLoadAdTagInfo: function() {
- console.log('loading vast ad data');
-
- var t = this;
-
- // set this to stop playback
- t.adsDataIsLoading = true;
- t.vastAdTagIsLoading = true;
-
- // try straight load first
- t.loadAdTagInfoDirect();
- },
-
- loadAdTagInfoDirect: function() {
- console.log('loading vast:direct');
-
- var t= this;
-
- $.ajax({
- url: t.options.vastAdTagUrl,
- crossDomain: true,
- success: function(data) {
- console.log('vast:direct:success', data);
-
- t.vastParseVastData(data)
- },
- error: function(err) {
- console.log('vast:direct:error', err);
-
- // fallback to Yahoo proxy
- t.loadAdTagInfoProxy();
- }
- });
- },
-
- loadAdTagInfoProxy: function() {
- console.log('loading vast:proxy:yahoo');
-
- var t = this,
- protocol = location.protocol,
- hostname = location.hostname,
- exRegex = RegExp(protocol + '//' + hostname),
- query = 'select * from xml where url="' + encodeURI(t.options.vastAdTagUrl) +'"',
- yahooUrl = 'http' + (/^https/.test(protocol)?'s':'') + '://query.yahooapis.com/v1/public/yql?format=xml&q=' + query;
-
-
-
- $.ajax({
- url: yahooUrl,
- crossDomain: true,
- success: function(data) {
- console.log('vast:proxy:yahoo:success', data);
-
- t.vastParseVastData(data);
- },
- error: function(err) {
- console.log('vast:proxy:yahoo:error', err);
- }
- });
- },
-
- vastParseVastData: function(data) {
-
- var t = this;
-
- // clear out data
- t.vastAdTags = [];
-
- $(data).find('Ad').each(function(index, node) {
-
- var
- adNode = $(node),
-
- adTag = {
- id: adNode.attr('id'),
- title: $.trim( adNode.find('AdTitle').text() ),
- description: $.trim( adNode.find('Description').text() ),
- impressions: [],
- clickThrough: $.trim( adNode.find('ClickThrough').text() ),
- mediaFiles: [],
- trackingEvents: {},
-
- // internal tracking if it's been used
- shown: false
- };
-
- t.vastAdTags.push(adTag);
-
-
- // parse all needed nodes
- adNode.find('Impression').each(function() {
- adTag.impressions.push( $.trim( $(this).text() ) );
- });
-
- adNode.find('Tracking').each(function(index, node) {
- var trackingEvent = $(node);
-
- adTag.trackingEvents[trackingEvent.attr('event')] = $.trim( trackingEvent.text() );
-
- });
-
-
- adNode.find('MediaFile').each(function(index, node) {
- var mediaFile = $(node),
- type = mediaFile.attr('type');
-
- if (t.media.canPlayType(type).toString().replace(/no/,'').replace(/false/,'') != '') {
-
- adTag.mediaFiles.push({
- id: mediaFile.attr('id'),
- delivery: mediaFile.attr('delivery'),
- type: mediaFile.attr('type'),
- bitrate: mediaFile.attr('bitrate'),
- width: mediaFile.attr('width'),
- height: mediaFile.attr('height'),
- url: $.trim( mediaFile.text() )
- } );
- }
- });
-
- });
-
- // DONE
- t.vastLoaded();
- },
-
- vastLoaded: function() {
- var t = this;
-
- t.vastAdTagIsLoaded = true;
- t.vastAdTagIsLoading = false;
- t.adsDataIsLoading = false;
-
- t.vastStartPreroll();
- },
-
- vastStartPreroll: function() {
- console.log('vastStartPreroll');
-
- var t = this;
-
- // if we have a media URL, then send it up to the ads plugin as a preroll
- if (t.vastAdTags.length > 0 && t.vastAdTags[0].mediaFiles.length > 0) {
-
- t.options.adsPrerollMediaUrl = t.vastAdTags[0].mediaFiles[0].url;
- t.options.adsPrerollAdUrl = t.vastAdTags[0].clickThrough;
- t.adsStartPreroll();
- }
- }
-
- });
-
-})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-ads.js b/files_videoviewer/mediaelement/src/js/mep-feature-ads.js
deleted file mode 100755
index 9a8176fcc..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-ads.js
+++ /dev/null
@@ -1,312 +0,0 @@
-// VAST ads plugin
-// Sponsored by Minoto Video
-
-// 2013/02/01 0.5 research
-// 2013/02/09 1.5 build loading mechanism
-// 2013/02/10 2.5 events to play preroll, skip function, start/end calls, \
-// 2013/02/11 2 click events
-// ----
-// 2013/02/23 3.5 split into a generic pre-roll plugin
-
-
-(function($) {
-
- // on time insert into head
- $('head').append($('<style>' +
-'.mejs-ads a {' +
-' display: block; ' +
-' position: absolute;' +
-' right: 0;' +
-' top: 0;' +
-' width: 100%; ' +
-' height: 100%; ' +
-' display: block; ' +
-'}' +
-'.mejs-ads .mejs-ads-skip-block {' +
-' display: block; ' +
-' position: absolute;' +
-' right: 0;' +
-' top: 0;' +
-' padding: 10px; ' +
-' background: #000; ' +
-' background: rgba(0,0,0,0.5); ' +
-' color: #fff; ' +
-'}' +
-'.mejs-ads .mejs-ads-skip-button {' +
-' cursor: pointer; ' +
-'}' +
-'.mejs-ads .mejs-ads-skip-button:hover {' +
-' text-decoration: underline; ' +
-'}' +
- '</style>'));
-
-
- $.extend(mejs.MepDefaults, {
- // URL to a media file
- adsPrerollMediaUrl: '',
-
- // URL for lcicking ad
- adsPrerollAdUrl: '',
-
- // if true, allows user to skip the pre-roll ad
- adsPrerollAdEnableSkip: false,
-
- // if adsPrerollAdEnableSkip=true and this is a positive number, it will only allow skipping after the time has elasped
- adsPrerollAdSkipSeconds: -1
- });
-
- $.extend(MediaElementPlayer.prototype, {
-
- // allows other plugins to all this one
- adsLoaded: false,
-
- // prevents playback in until async ad data is ready (e.g. VAST)
- adsDataIsLoading: false,
-
- // stores the main media URL when an ad is playing
- adsCurrentMediaUrl: '',
- adsCurrentMediaDuration: 0,
-
- // true when the user clicks play for the first time, or if autoplay is set
- adsPlayerHasStarted: false,
-
- buildads: function(player, controls, layers, media) {
-
- var t = this;
-
- if (t.adsLoaded) {
- return;
- } else {
- t.adsLoaded = true;
- }
-
- // add layer for ad links and skipping
- player.adsLayer =
- $('<div class="mejs-layer mejs-overlay mejs-ads">' +
- '<a href="#" target="_blank">&nbsp;</a>' +
- '<div class="mejs-ads-skip-block">' +
- '<span class="mejs-ads-skip-message"></span>' +
- '<span class="mejs-ads-skip-button">Skip Ad &raquo;</span>' +
- '</div>' +
- '</div>')
- .insertBefore( layers.find('.mejs-overlay-play') )
- .hide();
-
- player.adsLayer.find('a')
- .on('click', $.proxy(t.adsAdClick, t) );
-
- player.adsSkipBlock = player.adsLayer.find('.mejs-ads-skip-block').hide();
- player.adsSkipMessage = player.adsLayer.find('.mejs-ads-skip-message').hide();
-
- player.adsSkipButton = player.adsLayer.find('.mejs-ads-skip-button')
- .on('click', $.proxy(t.adsSkipClick, t) );
-
-
- // create proxies (only needed for events we want to remove later)
- t.adsMediaTryingToStartProxy = $.proxy(t.adsMediaTryingToStart, t);
- t.adsPrerollStartedProxy = $.proxy(t.adsPrerollStarted, t);
- t.adsPrerollMetaProxy = $.proxy(t.adsPrerollMeta, t);
- t.adsPrerollUpdateProxy = $.proxy(t.adsPrerollUpdate, t);
- t.adsPrerollEndedProxy = $.proxy(t.adsPrerollEnded, t);
-
- // check for start
- t.media.addEventListener('play', t.adsMediaTryingToStartProxy );
- t.media.addEventListener('playing', t.adsMediaTryingToStartProxy );
- t.media.addEventListener('canplay', t.adsMediaTryingToStartProxy );
- t.media.addEventListener('loadedmetadata', t.adsMediaTryingToStartProxy );
-
- console.log('setup ads', t.options.adsPrerollMediaUrl);
-
- if (t.options.adsPrerollMediaUrl != '') {
- t.adsStartPreroll();
- }
- },
-
-
- adsMediaTryingToStart: function() {
-
- var t = this;
-
- // make sure to pause until the ad data is loaded
- if (t.adsDataIsLoading && !t.media.paused) {
- t.media.pause();
- }
-
- t.adsPlayerHasStarted = true;
- },
-
- adsStartPreroll: function() {
-
- var t = this;
-
- console.log('adsStartPreroll', 'url', t.options.adsPrerollMediaUrl);
-
-
- t.media.addEventListener('loadedmetadata', t.adsPrerollMetaProxy );
- t.media.addEventListener('playing', t.adsPrerollStartedProxy );
- t.media.addEventListener('ended', t.adsPrerollEndedProxy )
- t.media.addEventListener('timeupdate', t.adsPrerollUpdateProxy );
-
- // change URLs to the preroll ad
- t.adsCurrentMediaUrl = t.media.src;
- t.adsCurrentMediaDuration = t.media.duration;
-
- t.media.setSrc(t.options.adsPrerollMediaUrl);
- t.media.load();
-
- // if autoplay was on, or if the user pressed play
- // while the ad data was still loading, then start the ad right away
- if (t.adsPlayerHasStarted) {
- t.media.play();
- }
- },
-
- adsPrerollMeta: function() {
-
- var t = this,
- newDuration = 0;
-
- console.log('loadedmetadata', t.media.duration, t.adsCurrentMediaDuration);
-
- // if duration has been set, show that
- if (t.options.duration > 0) {
- newDuration = t.options.duration;
- } else if (!isNaN(t.adsCurrentMediaDuration)) {
- newDuration = t.adsCurrentMediaDuration;
- }
-
- setTimeout(function() {
- t.controls.find('.mejs-duration').html(
- mejs.Utility.secondsToTimeCode(newDuration, t.options.alwaysShowHours || newDuration > 3600, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25)
- );
- }, 250);
- },
-
- adsPrerollStarted: function() {
- console.log('adsPrerollStarted');
-
- var t = this;
- t.media.removeEventListener('playing', t.adsPrerollStartedProxy);
-
- // turn off controls until the preroll is done
- t.disableControls();
- t.hideControls();
-
- // enable clicking through
- t.adsLayer.show();
- if (t.options.adsPrerollAdUrl != '') {
- t.adsLayer.find('a').attr('href', t.options.adsPrerollAdUrl);
- }
-
- // possibly allow the skip button to work
- if (t.options.adsPrerollAdEnableSkip) {
- t.adsSkipBlock.show();
-
- if (t.options.adsPrerollAdSkipSeconds > 0) {
- t.adsSkipMessage.html('Skip in ' + t.options.adsPrerollAdSkipSeconds.toString() + ' seconds.').show();
- t.adsSkipButton.hide();
- } else {
- t.adsSkipMessage.hide();
- t.adsSkipButton.show();
- }
- } else {
- t.adsSkipBlock.hide();
- }
-
- // send click events
- t.container.trigger('mejsprerollstarted');
- },
-
- adsPrerollUpdate: function() {
- //console.log('adsPrerollUpdate');
-
- var t = this;
-
- if (t.options.adsPrerollAdEnableSkip && t.options.adsPrerollAdSkipSeconds > 0) {
- // update message
- if (t.media.currentTime > t.options.adsPrerollAdSkipSeconds) {
- t.adsSkipButton.show();
- t.adsSkipMessage.hide();
- } else {
- t.adsSkipMessage.html('Skip in ' + Math.round( t.options.adsPrerollAdSkipSeconds - t.media.currentTime ).toString() + ' seconds.')
- }
-
- }
-
- t.container.trigger('mejsprerolltimeupdate');
- },
-
- adsPrerollEnded: function() {
- console.log('adsPrerollEnded');
-
- var t = this;
-
- t.container.trigger('mejsprerollended');
-
- t.adRestoreMainMedia();
- },
-
- adRestoreMainMedia: function() {
-
- console.log('adRestoreMainMedia', this.adsCurrentMediaUrl);
-
- var t = this;
-
- t.media.setSrc(t.adsCurrentMediaUrl);
- setTimeout(function() {
- t.media.load();
- t.media.play();
- }, 10);
-
- t.enableControls();
- t.showControls();
-
- t.adsLayer.hide();
-
- t.media.removeEventListener('ended', t.adsPrerollEndedProxy);
- t.media.removeEventListener('loadedmetadata', t.adsPrerollMetaProxy);
- t.media.removeEventListener('timeupdate', t.adsPrerollUpdateProxy);
-
- t.container.trigger('mejsprerollmainstarted');
- },
-
- adsAdClick: function(e) {
- console.log('adsAdClicked');
-
- var t = this;
-
- if (t.media.paused) {
- t.media.play();
- } else {
- t.media.pause();
- }
-
- t.container.trigger('mejsprerolladsclicked');
- },
-
- adsSkipClick: function() {
- console.log('adsSkipClick');
- var t = this;
-
- t.container.trigger('mejsprerollskipclicked');
- t.container.trigger('mejsprerollended');
-
- t.adRestoreMainMedia();
- },
-
- // fires off fake XHR requests
- adsLoadUrl: function(url) {
- console.log('adsLoadUrl', url);
-
- var img = new Image(),
- rnd = Math.round(Math.random()*100000);
-
- img.src = url + ((url.indexOf('?') > 0) ? '&' : '?') + 'random' + rnd + '=' + rnd;
- img.loaded = function() {
- img = null;
- }
- }
-
- });
-
-})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-backlight.js b/files_videoviewer/mediaelement/src/js/mep-feature-backlight.js
deleted file mode 100755
index 8d972c5e4..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-backlight.js
+++ /dev/null
@@ -1,435 +0,0 @@
-(function($) {
-
- $.extend(mejs.MepDefaults, {
- backlightBackground: [0,0,0],
- backlightHorizontalLights: 5,
- backlightVerticalLights: 5,
- backlightSize: 50,
- backlightTimeout: 200
- });
-
- $.extend(MediaElementPlayer.prototype, {
- buildbacklight = function(player, controls, layers, media) {
- if (!player.isVideo)
- return;
-
- //http://www.splashnology.com/blog/html5/382.html
-
- var
- mediaContainer = player.container.find('.mejs-mediaelement').parent(),
- border = $('<div class="mejs-border"></div>')
- .prependTo(mediaContainer)
- .css('position','absolute')
- .css('top','-10px')
- .css('left','-10px')
- .css('border','solid 10px #010101')
- .width(player.width).height(player.height),
- glowBase = $('<div class="mejs-backlight-glow"></div>')
- .prependTo(mediaContainer)
- .css('position','absolute')
- .css('display','none')
- .css('top',0)
- .css('left',0)
- .width(player.width).height(player.height),
- base = $('<div class="mejs-backlight"></div>')
- .prependTo(mediaContainer)
- .css('position','absolute')
- .css('top',0)
- .css('left',0)
- .width(player.width).height(player.height),
-
- i,
- copyCanvas = document.createElement('canvas'),
- copyContext = copyCanvas.getContext('2d'),
- pixels,
- keepUpdating = true,
- isActive = true,
- timer = null,
- glowCanvas = document.createElement('canvas'),
- glowContext = glowCanvas.getContext('2d'),
- size = player.options.backlightSize,
- backgroundColor = player.options.backlightBackground,
- gradient,
- width = player.width,
- height = player.height;
-
- // set sizes
- copyCanvas.width = width;
- copyCanvas.height = height;
- glowCanvas.width = width + size + size;
- glowCanvas.height = height + size + size;
-
- // draw glow overlay
- // top
- gradient = addGlow(backgroundColor,glowContext.createLinearGradient(size, size, size, 0));
- glowContext.fillStyle = gradient;
- glowContext.fillRect(size, size, width, -size);
-
- // tr
- gradient = addGlow(backgroundColor,glowContext.createRadialGradient(width+size, size, 0, width+size, size, size));
- glowContext.fillStyle = gradient;
- glowContext.fillRect(width+size, size, size, -size);
-
- // right
- gradient = addGlow(backgroundColor,glowContext.createLinearGradient(width+size, size, width+size+size, size));
- glowContext.fillStyle = gradient;
- glowContext.fillRect(width+size, size, size, height);
-
- // br
- gradient = addGlow(backgroundColor,glowContext.createRadialGradient(width+size, height+size, 0, width+size, height+size, size));
- glowContext.fillStyle = gradient;
- glowContext.fillRect(width+size, height+size, size, size);
-
- // bottom
- var gradient = addGlow(backgroundColor,glowContext.createLinearGradient(size, size+height, size, size+height+size));
- glowContext.fillStyle = gradient;
- glowContext.fillRect(size, size+height, width, size);
-
- // bl
- gradient = addGlow(backgroundColor,glowContext.createRadialGradient(size, height+size, 0, size, height+size, size));
- glowContext.fillStyle = gradient;
- glowContext.fillRect(0, height+size, size, size);
-
- // left
- gradient = addGlow(backgroundColor,glowContext.createLinearGradient(size, size, 0, size));
- glowContext.fillStyle = gradient;
- glowContext.fillRect(size, size, -size, height);
-
- // tl
- gradient = addGlow(backgroundColor,glowContext.createRadialGradient(size, size, 0, size, size, size));
- glowContext.fillStyle = gradient;
- glowContext.fillRect(0, 0, size, size);
-
- $(glowCanvas)
- .css('position','absolute')
- .css('top',-size)
- .css('left',-size)
- .appendTo(glowBase);
-
-
- // add toggle control
- $('<div class="mejs-backlight-button mejs-backlight-active"><span></span></div>')
- .appendTo(controls)
- .click(function() {
- if (isActive) {
- delete timer;
- timer = null;
- base.hide();
- glowBase.hide();
- $(this)
- .removeClass('mejs-backlight-active')
- .addClass('mejs-backlight-inactive')
- } else {
- updateLights();
- base.show();
- glowBase.show();
- $(this)
- .removeClass('mejs-backlight-inactive')
- .addClass('mejs-backlight-active')
- }
- isActive = !isActive;
- });
-
-
- // http://www.splashnology.com/blog/html5/382.html
- function updateLights() {
-
- // get a copy of video
- copyContext.drawImage(media, 0, 0, media.width, media.height);
-
- // create the gradient lights
- addLights(base, copyCanvas, copyContext,
- player.options.backlightVerticalLights,
- player.options.backlightHorizontalLights,
- player.options.backlightSize,
- 30);
-
- if (keepUpdating && isActive) {
- timer = setTimeout(updateLights, player.options.backlightTimeout);
- }
- }
-
-
-
-
- //setTimeout(updateLights, timeOut);
-
- media.addEventListener('play',function() {
- if (isActive) {
- keepUpdating = true;
- updateLights();
- glowBase.css('display','');
- }
- }, false);
- media.addEventListener('pause',function() {
- keepUpdating = false;
- }, false);
- media.addEventListener('ended',function() {
- keepUpdating = false;
- }, false);
-
- }
- });
-
- function addLights(base, canvas, context, vBlocks, hBlocks, size, depth) {
- base.empty();
-
- var
- lightsCanvas = document.createElement('canvas'),
- lightsContext = lightsCanvas.getContext('2d'),
- width = canvas.width,
- height = canvas.height,
- g,
- topLights = getMidColors(canvas, context, hBlocks, depth, 'top'),
- bottomLights = getMidColors(canvas, context, hBlocks, depth, 'bottom'),
- leftLights = getMidColors(canvas, context, vBlocks, depth, 'left'),
- rightLights = getMidColors(canvas, context, vBlocks, depth, 'right'),
- corners = [],
- stopSize = 0;
-
- lightsCanvas.width = width + size + size;
- lightsCanvas.height = height + size + size;
- lightsContext.globalCompositeOperation = 'xor'; //'darker'; //'lighter';
-
- // draw four gradients
- // create corners
- corners.push(averageColor(topLights[topLights.length-1], rightLights[0]) );
- corners.push(averageColor(bottomLights[bottomLights.length-1], rightLights[rightLights.length-1]) );
- corners.push(averageColor(bottomLights[0], leftLights[leftLights.length-1]) );
- corners.push(averageColor(topLights[0], leftLights[0]) );
-
- // top
- stopSize = 1 / topLights.length;
- gradient = context.createLinearGradient(size, size, width+size, size);
- gradient.addColorStop(0, 'rgb(' + adjustColor(corners[3]).join(',') + ')');
- for (var i = 0, il = topLights.length; i < il; i++) {
- gradient.addColorStop(i * stopSize + stopSize/2, 'rgb(' + adjustColor(topLights[i]).join(',') + ')');
- }
- gradient.addColorStop(1.0, 'rgb(' + adjustColor(corners[0]).join(',') + ')');
- lightsContext.fillStyle = gradient;
- lightsContext.fillRect(size, 0, width, size);
-
- // right
- gradient = context.createLinearGradient(size+width, size, size+width, size+height);
- gradient.addColorStop(0, 'rgb(' + adjustColor(corners[0]).join(',') + ')');
- for (var i = 0, il = rightLights.length; i < il; i++) {
- gradient.addColorStop(i * stopSize + stopSize/2, 'rgb(' + adjustColor(rightLights[i]).join(',') + ')');
- }
- gradient.addColorStop(1.0, 'rgb(' + adjustColor(corners[1]).join(',') + ')');
- lightsContext.fillStyle = gradient;
- lightsContext.fillRect(size+width, size, size+width+size, height);
-
-
- // bottom
- gradient = context.createLinearGradient(size, size+height, size+width, size+height);
- gradient.addColorStop(0, 'rgb(' + adjustColor(corners[2]).join(',') + ')');
- for (var i = 0, il = bottomLights.length; i < il; i++) {
- gradient.addColorStop(i * stopSize + stopSize/2, 'rgb(' + adjustColor(bottomLights[i]).join(',') + ')');
- }
- gradient.addColorStop(1.0, 'rgb(' + adjustColor(corners[1]).join(',') + ')');
- lightsContext.fillStyle = gradient;
- lightsContext.fillRect(size, size+height, width, size);
-
- // left
- gradient = context.createLinearGradient(size, size, size, size+height);
- gradient.addColorStop(0, 'rgb(' + adjustColor(corners[3]).join(',') + ')');
- for (var i = 0, il = leftLights.length; i < il; i++) {
- gradient.addColorStop(i * stopSize + stopSize/2, 'rgb(' + adjustColor(leftLights[i]).join(',') + ')');
- }
- gradient.addColorStop(1.0, 'rgb(' + adjustColor(corners[2]).join(',') + ')');
- lightsContext.fillStyle = gradient;
- lightsContext.fillRect(0, size, size, height);
-
- // corners
-
- // top right
- lightsContext.fillStyle = 'rgb(' + adjustColor(corners[0]).join(',') + ')';
- lightsContext.fillRect(width+size, 0, size+width+size, size);
-
- // bottom right
- lightsContext.fillStyle = 'rgb(' + adjustColor(corners[1]).join(',') + ')';
- lightsContext.fillRect(width+size, size+height, size+width+size, size+height+size);
-
- // bottom left
- lightsContext.fillStyle = 'rgb(' + adjustColor(corners[2]).join(',') + ')';
- lightsContext.fillRect(0, size+height, size, size+height+size);
-
- // top left
- lightsContext.fillStyle = 'rgb(' + adjustColor(corners[3]).join(',') + ')';
- lightsContext.fillRect(0, 0, size, size);
-
-
-
-
-
- $(lightsCanvas)
- .css('position','absolute')
- .css('top',-size)
- .css('left',-size)
- .appendTo(base);
- }
-
- function addGlow(color, g) {
- g.addColorStop(0.0, 'rgba(' + color.join(',') + ',0)');
- g.addColorStop(1.0, 'rgba(' + color.join(',') + ',1)');
- return g;
- }
-
-
-
-
- function getMidColors(canvas, context, blocks, blockDepth, side) {
- var width = canvas.width,
- height = canvas.height,
- blockHeight = (side == 'top' || side == 'bottom') ? blockDepth : Math.ceil(height / blocks), // height of the analyzed block
- blockWidth = (side == 'top' || side == 'bottom') ? Math.ceil(width / blocks) : blockDepth,
- result = [],
- imgdata,
- i;
-
- if (side == 'top' || side == 'bottom') {
- for (i = 0; i < blocks; i++) {
- try {
- imgdata = context.getImageData(i*blockWidth, (side == 'top') ? 0 : height - blockHeight , blockWidth, blockHeight);
- result.push(
- calcMidColor(imgdata.data)
- );
- } catch (e) {
- console.log(e);
- }
- }
- } else {
-
- for (i = 0; i < blocks; i++) {
- try {
- imgdata = context.getImageData( (side == 'right') ? width - blockWidth : 0, i*blockHeight, blockWidth, blockHeight);
- result.push(
- calcMidColor(imgdata.data)
- );
- } catch (e) {
- console.log(e);
- }
-
- }
- }
-
-
- return result;
- }
-
- function averageColor(c1,c2) {
- var result =
- [(c1[0] + c2[0]) / 2,
- (c1[1] + c2[1]) / 2,
- (c1[2] + c2[2]) / 2];
-
- return result;
- }
-
- // average color for a block
- function calcMidColorVertical(data, from, to) {
- var result = [0, 0, 0];
- var totalPixels = (to - from) / 4;
-
- for (var i = from; i <= to; i += 4) {
- result[0] += data[i];
- result[1] += data[i + 1];
- result[2] += data[i + 2];
- }
-
- result[0] = Math.round(result[0] / totalPixels);
- result[1] = Math.round(result[1] / totalPixels);
- result[2] = Math.round(result[2] / totalPixels);
-
- return result;
- }
-
- // average color for a block
- function calcMidColor(data) {
- var result = [0, 0, 0];
- var totalPixels = data.length;
-
- for (var i = 0; i < totalPixels; i += 4) {
- result[0] += data[i];
- result[1] += data[i + 1];
- result[2] += data[i + 2];
- }
-
- result[0] = Math.round(result[0] / totalPixels);
- result[1] = Math.round(result[1] / totalPixels);
- result[2] = Math.round(result[2] / totalPixels);
-
- return result;
- }
-
- function adjustColor(color) {
- //if (color[0] <= 2 && color[2] <= 2 && color[3] <= 2)
- // return color;
-
- color = rgb2hsv(color);
- color[1] = Math.min(100, color[1] * 1.2); //1.4); // saturation
- color[2] = 80; //Math.min(100, color[2] * 2.7); //2.7); // brightness
- return hsv2rgb(color);
- }
-
- function rgb2hsv(color) {
- var r = color[0] / 255,
- g = color[1] / 255,
- b = color[2] / 255,
-
- x, val, d1, d2, hue, sat, val;
-
- x = Math.min(Math.min(r, g), b);
- val = Math.max(Math.max(r, g), b);
- //if (x == val)
- // throw Error('h is undefined');
-
- d1 = (r == x) ? g-b : ((g == x) ? b-r : r-g);
- d2 = (r == x) ? 3 : ((g == x) ? 5 : 1);
-
- hue = Math.floor((d2 - d1 / (val - x)) * 60) % 360;
- sat = Math.floor(((val - x) / val) * 100);
- val = Math.floor(val * 100);
- return [hue, sat, val];
- }
-
- /**
- * Convers HSV color to RGB model
- * @param {Number[]} RGB color
- * @return {Number[]} HSV color
- */
- function hsv2rgb(color) {
- var h = color[0],
- s = color[1],
- v = color[2];
-
- var r, g, a, b, c, s = s / 100, v = v / 100, h = h / 360;
-
- if (s > 0) {
- if (h >= 1) h=0;
-
- h = 6 * h;
- var f = h - Math.floor(h);
- a = Math.round(255 * v * (1 - s));
- b = Math.round(255 * v * (1 - (s * f)));
- c = Math.round(255 * v * (1 - (s * (1 - f))));
- v = Math.round(255 * v);
-
- switch (Math.floor(h)) {
- case 0: r = v; g = c; b = a; break;
- case 1: r = b; g = v; b = a; break;
- case 2: r = a; g = v; b = c; break;
- case 3: r = a; g = b; b = v; break;
- case 4: r = c; g = a; b = v; break;
- case 5: r = v; g = a; b = b; break;
- }
-
- return [r || 0, g || 0, b || 0];
-
- } else {
- v = Math.round(v * 255);
- return [v, v, v];
- }
- }
-
-})(mejs.$); \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-contextmenu.js b/files_videoviewer/mediaelement/src/js/mep-feature-contextmenu.js
deleted file mode 100755
index f15d7a643..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-contextmenu.js
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
-* ContextMenu Plugin
-*
-*
-*/
-
-(function($) {
-
-$.extend(mejs.MepDefaults,
- { 'contextMenuItems': [
- // demo of a fullscreen option
- {
- render: function(player) {
-
- // check for fullscreen plugin
- if (typeof player.enterFullScreen == 'undefined')
- return null;
-
- if (player.isFullScreen) {
- return "Turn off Fullscreen";
- } else {
- return "Go Fullscreen";
- }
- },
- click: function(player) {
- if (player.isFullScreen) {
- player.exitFullScreen();
- } else {
- player.enterFullScreen();
- }
- }
- }
- ,
- // demo of a mute/unmute button
- {
- render: function(player) {
- if (player.media.muted) {
- return "Unmute";
- } else {
- return "Mute";
- }
- },
- click: function(player) {
- if (player.media.muted) {
- player.setMuted(false);
- } else {
- player.setMuted(true);
- }
- }
- },
- // separator
- {
- isSeparator: true
- }
- ,
- // demo of simple download video
- {
- render: function(player) {
- return "Download Video";
- },
- click: function(player) {
- window.location.href = player.media.currentSrc;
- }
- }
- ]}
-);
-
-
- $.extend(MediaElementPlayer.prototype, {
- buildcontextmenu: function(player, controls, layers, media) {
-
- // create context menu
- player.contextMenu = $('<div class="mejs-contextmenu"></div>')
- .appendTo($('body'))
- .hide();
-
- // create events for showing context menu
- player.container.bind('contextmenu', function(e) {
- if (player.isContextMenuEnabled) {
- e.preventDefault();
- player.renderContextMenu(e.clientX-1, e.clientY-1);
- return false;
- }
- });
- player.container.bind('click', function() {
- player.contextMenu.hide();
- });
- player.contextMenu.bind('mouseleave', function() {
-
- //console.log('context hover out');
- player.startContextMenuTimer();
-
- });
- },
-
- cleancontextmenu: function(player) {
- player.contextMenu.remove();
- },
-
- isContextMenuEnabled: true,
- enableContextMenu: function() {
- this.isContextMenuEnabled = true;
- },
- disableContextMenu: function() {
- this.isContextMenuEnabled = false;
- },
-
- contextMenuTimeout: null,
- startContextMenuTimer: function() {
- //console.log('startContextMenuTimer');
-
- var t = this;
-
- t.killContextMenuTimer();
-
- t.contextMenuTimer = setTimeout(function() {
- t.hideContextMenu();
- t.killContextMenuTimer();
- }, 750);
- },
- killContextMenuTimer: function() {
- var timer = this.contextMenuTimer;
-
- //console.log('killContextMenuTimer', timer);
-
- if (timer != null) {
- clearTimeout(timer);
- delete timer;
- timer = null;
- }
- },
-
- hideContextMenu: function() {
- this.contextMenu.hide();
- },
-
- renderContextMenu: function(x,y) {
-
- // alway re-render the items so that things like "turn fullscreen on" and "turn fullscreen off" are always written correctly
- var t = this,
- html = '',
- items = t.options.contextMenuItems;
-
- for (var i=0, il=items.length; i<il; i++) {
-
- if (items[i].isSeparator) {
- html += '<div class="mejs-contextmenu-separator"></div>';
- } else {
-
- var rendered = items[i].render(t);
-
- // render can return null if the item doesn't need to be used at the moment
- if (rendered != null) {
- html += '<div class="mejs-contextmenu-item" data-itemindex="' + i + '" id="element-' + (Math.random()*1000000) + '">' + rendered + '</div>';
- }
- }
- }
-
- // position and show the context menu
- t.contextMenu
- .empty()
- .append($(html))
- .css({top:y, left:x})
- .show();
-
- // bind events
- t.contextMenu.find('.mejs-contextmenu-item').each(function() {
-
- // which one is this?
- var $dom = $(this),
- itemIndex = parseInt( $dom.data('itemindex'), 10 ),
- item = t.options.contextMenuItems[itemIndex];
-
- // bind extra functionality?
- if (typeof item.show != 'undefined')
- item.show( $dom , t);
-
- // bind click action
- $dom.click(function() {
- // perform click action
- if (typeof item.click != 'undefined')
- item.click(t);
-
- // close
- t.contextMenu.hide();
- });
- });
-
- // stop the controls from hiding
- setTimeout(function() {
- t.killControlsTimer('rev3');
- }, 100);
-
- }
- });
-
-})(mejs.$); \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-endedhtml.js b/files_videoviewer/mediaelement/src/js/mep-feature-endedhtml.js
deleted file mode 100755
index 1a4fabb66..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-endedhtml.js
+++ /dev/null
@@ -1,12 +0,0 @@
-(function($) {
-
- $.extend(MediaElementPlayer.prototype, {
- buildendedhtml: function(player, controls, layers, media) {
- if (!player.isVideo)
- return;
-
- // add postroll
- }
- });
-
-})(mejs.$); \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-fullscreen.js b/files_videoviewer/mediaelement/src/js/mep-feature-fullscreen.js
deleted file mode 100755
index 5eaaf3f6b..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-fullscreen.js
+++ /dev/null
@@ -1,458 +0,0 @@
-(function($) {
-
- $.extend(mejs.MepDefaults, {
- usePluginFullScreen: true,
- newWindowCallback: function() { return '';},
- fullscreenText: mejs.i18n.t('Fullscreen')
- });
-
- $.extend(MediaElementPlayer.prototype, {
-
- isFullScreen: false,
-
- isNativeFullScreen: false,
-
- docStyleOverflow: null,
-
- isInIframe: false,
-
- buildfullscreen: function(player, controls, layers, media) {
-
- if (!player.isVideo)
- return;
-
- player.isInIframe = (window.location != window.parent.location);
-
- // native events
- if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
-
- // chrome doesn't alays fire this in an iframe
- var func = function(e) {
-
- if (mejs.MediaFeatures.isFullScreen()) {
- player.isNativeFullScreen = true;
- // reset the controls once we are fully in full screen
- player.setControlsSize();
- } else {
- player.isNativeFullScreen = false;
- // when a user presses ESC
- // make sure to put the player back into place
- player.exitFullScreen();
- }
- };
-
- if (mejs.MediaFeatures.hasMozNativeFullScreen) {
- player.globalBind(mejs.MediaFeatures.fullScreenEventName, func);
- } else {
- player.container.bind(mejs.MediaFeatures.fullScreenEventName, func);
- }
- }
-
- var t = this,
- normalHeight = 0,
- normalWidth = 0,
- container = player.container,
- fullscreenBtn =
- $('<div class="mejs-button mejs-fullscreen-button">' +
- '<button type="button" aria-controls="' + t.id + '" title="' + t.options.fullscreenText + '" aria-label="' + t.options.fullscreenText + '"></button>' +
- '</div>')
- .appendTo(controls);
-
- if (t.media.pluginType === 'native' || (!t.options.usePluginFullScreen && !mejs.MediaFeatures.isFirefox)) {
-
- fullscreenBtn.click(function() {
- var isFullScreen = (mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen()) || player.isFullScreen;
-
- if (isFullScreen) {
- player.exitFullScreen();
- } else {
- player.enterFullScreen();
- }
- });
-
- } else {
-
- var hideTimeout = null,
- supportsPointerEvents = (function() {
- // TAKEN FROM MODERNIZR
- var element = document.createElement('x'),
- documentElement = document.documentElement,
- getComputedStyle = window.getComputedStyle,
- supports;
- if(!('pointerEvents' in element.style)){
- return false;
- }
- element.style.pointerEvents = 'auto';
- element.style.pointerEvents = 'x';
- documentElement.appendChild(element);
- supports = getComputedStyle &&
- getComputedStyle(element, '').pointerEvents === 'auto';
- documentElement.removeChild(element);
- return !!supports;
- })();
-
- //console.log('supportsPointerEvents', supportsPointerEvents);
-
- if (supportsPointerEvents && !mejs.MediaFeatures.isOpera) { // opera doesn't allow this :(
-
- // allows clicking through the fullscreen button and controls down directly to Flash
-
- /*
- When a user puts his mouse over the fullscreen button, the controls are disabled
- So we put a div over the video and another one on iether side of the fullscreen button
- that caputre mouse movement
- and restore the controls once the mouse moves outside of the fullscreen button
- */
-
- var fullscreenIsDisabled = false,
- restoreControls = function() {
- if (fullscreenIsDisabled) {
- // hide the hovers
- for (var i in hoverDivs) {
- hoverDivs[i].hide();
- }
-
- // restore the control bar
- fullscreenBtn.css('pointer-events', '');
- t.controls.css('pointer-events', '');
-
- // store for later
- fullscreenIsDisabled = false;
- }
- },
- hoverDivs = {},
- hoverDivNames = ['top', 'left', 'right', 'bottom'],
- i, len,
- positionHoverDivs = function() {
- var fullScreenBtnOffsetLeft = fullscreenBtn.offset().left - t.container.offset().left,
- fullScreenBtnOffsetTop = fullscreenBtn.offset().top - t.container.offset().top,
- fullScreenBtnWidth = fullscreenBtn.outerWidth(true),
- fullScreenBtnHeight = fullscreenBtn.outerHeight(true),
- containerWidth = t.container.width(),
- containerHeight = t.container.height();
-
- for (i in hoverDivs) {
- hoverDivs[i].css({position: 'absolute', top: 0, left: 0}); //, backgroundColor: '#f00'});
- }
-
- // over video, but not controls
- hoverDivs['top']
- .width( containerWidth )
- .height( fullScreenBtnOffsetTop );
-
- // over controls, but not the fullscreen button
- hoverDivs['left']
- .width( fullScreenBtnOffsetLeft )
- .height( fullScreenBtnHeight )
- .css({top: fullScreenBtnOffsetTop});
-
- // after the fullscreen button
- hoverDivs['right']
- .width( containerWidth - fullScreenBtnOffsetLeft - fullScreenBtnWidth )
- .height( fullScreenBtnHeight )
- .css({top: fullScreenBtnOffsetTop,
- left: fullScreenBtnOffsetLeft + fullScreenBtnWidth});
-
- // under the fullscreen button
- hoverDivs['bottom']
- .width( containerWidth )
- .height( containerHeight - fullScreenBtnHeight - fullScreenBtnOffsetTop )
- .css({top: fullScreenBtnOffsetTop + fullScreenBtnHeight});
- };
-
- t.globalBind('resize', function() {
- positionHoverDivs();
- });
-
- for (i = 0, len = hoverDivNames.length; i < len; i += 1) {
- hoverDivs[hoverDivNames[i]] = $('<div class="mejs-fullscreen-hover" />').appendTo(t.container).mouseover(restoreControls).hide();
- }
-
- // on hover, kill the fullscreen button's HTML handling, allowing clicks down to Flash
- fullscreenBtn
- .mouseover(function() {
-
- if (!t.isFullScreen) {
-
- var buttonPos = fullscreenBtn.offset(),
- containerPos = player.container.offset();
-
- // move the button in Flash into place
- media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, false);
-
- // allows click through
- fullscreenBtn.css('pointer-events', 'none');
- t.controls.css('pointer-events', 'none');
-
- // show the divs that will restore things
- for (i in hoverDivs) {
- hoverDivs[i].show();
- }
- positionHoverDivs();
-
- fullscreenIsDisabled = true;
- }
-
- });
-
- // restore controls anytime the user enters or leaves fullscreen
- media.addEventListener('fullscreenchange', function(e) {
- restoreControls();
- });
-
-
- // the mouseout event doesn't work on the fullscren button, because we already killed the pointer-events
- // so we use the document.mousemove event to restore controls when the mouse moves outside the fullscreen button
- /*
- t.globalBind('mousemove', function(e) {
-
- // if the mouse is anywhere but the fullsceen button, then restore it all
- if (fullscreenIsDisabled) {
-
- var fullscreenBtnPos = fullscreenBtn.offset();
-
-
- if (e.pageY < fullscreenBtnPos.top || e.pageY > fullscreenBtnPos.top + fullscreenBtn.outerHeight(true) ||
- e.pageX < fullscreenBtnPos.left || e.pageX > fullscreenBtnPos.left + fullscreenBtn.outerWidth(true)
- ) {
-
- fullscreenBtn.css('pointer-events', '');
- t.controls.css('pointer-events', '');
-
- fullscreenIsDisabled = false;
- }
- }
- });
- */
-
-
- } else {
-
- // the hover state will show the fullscreen button in Flash to hover up and click
-
- fullscreenBtn
- .mouseover(function() {
-
- if (hideTimeout !== null) {
- clearTimeout(hideTimeout);
- delete hideTimeout;
- }
-
- var buttonPos = fullscreenBtn.offset(),
- containerPos = player.container.offset();
-
- media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, true);
-
- })
- .mouseout(function() {
-
- if (hideTimeout !== null) {
- clearTimeout(hideTimeout);
- delete hideTimeout;
- }
-
- hideTimeout = setTimeout(function() {
- media.hideFullscreenButton();
- }, 1500);
-
-
- });
- }
- }
-
- player.fullscreenBtn = fullscreenBtn;
-
- t.globalBind('keydown',function (e) {
- if (((mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen()) || t.isFullScreen) && e.keyCode == 27) {
- player.exitFullScreen();
- }
- });
-
- },
-
- cleanfullscreen: function(player) {
- player.exitFullScreen();
- },
-
- containerSizeTimeout: null,
-
- enterFullScreen: function() {
-
- var t = this;
-
- // firefox+flash can't adjust plugin sizes without resetting :(
- if (t.media.pluginType !== 'native' && (mejs.MediaFeatures.isFirefox || t.options.usePluginFullScreen)) {
- //t.media.setFullscreen(true);
- //player.isFullScreen = true;
- return;
- }
-
- // store overflow
- docStyleOverflow = document.documentElement.style.overflow;
- // set it to not show scroll bars so 100% will work
- document.documentElement.style.overflow = 'hidden';
-
- // store sizing
- normalHeight = t.container.height();
- normalWidth = t.container.width();
-
- // attempt to do true fullscreen (Safari 5.1 and Firefox Nightly only for now)
- if (t.media.pluginType === 'native') {
- if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
-
- mejs.MediaFeatures.requestFullScreen(t.container[0]);
- //return;
-
- if (t.isInIframe) {
- // sometimes exiting from fullscreen doesn't work
- // notably in Chrome <iframe>. Fixed in version 17
- setTimeout(function checkFullscreen() {
-
- if (t.isNativeFullScreen) {
-
- // check if the video is suddenly not really fullscreen
- if ($(window).width() !== screen.width) {
- // manually exit
- t.exitFullScreen();
- } else {
- // test again
- setTimeout(checkFullscreen, 500);
- }
- }
-
-
- }, 500);
- }
-
- } else if (mejs.MediaFeatures.hasSemiNativeFullScreen) {
- t.media.webkitEnterFullscreen();
- return;
- }
- }
-
- // check for iframe launch
- if (t.isInIframe) {
- var url = t.options.newWindowCallback(this);
-
-
- if (url !== '') {
-
- // launch immediately
- if (!mejs.MediaFeatures.hasTrueNativeFullScreen) {
- t.pause();
- window.open(url, t.id, 'top=0,left=0,width=' + screen.availWidth + ',height=' + screen.availHeight + ',resizable=yes,scrollbars=no,status=no,toolbar=no');
- return;
- } else {
- setTimeout(function() {
- if (!t.isNativeFullScreen) {
- t.pause();
- window.open(url, t.id, 'top=0,left=0,width=' + screen.availWidth + ',height=' + screen.availHeight + ',resizable=yes,scrollbars=no,status=no,toolbar=no');
- }
- }, 250);
- }
- }
-
- }
-
- // full window code
-
-
-
- // make full size
- t.container
- .addClass('mejs-container-fullscreen')
- .width('100%')
- .height('100%');
- //.css({position: 'fixed', left: 0, top: 0, right: 0, bottom: 0, overflow: 'hidden', width: '100%', height: '100%', 'z-index': 1000});
-
- // Only needed for safari 5.1 native full screen, can cause display issues elsewhere
- // Actually, it seems to be needed for IE8, too
- //if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
- t.containerSizeTimeout = setTimeout(function() {
- t.container.css({width: '100%', height: '100%'});
- t.setControlsSize();
- }, 500);
- //}
-
- if (t.pluginType === 'native') {
- t.$media
- .width('100%')
- .height('100%');
- } else {
- t.container.find('.mejs-shim')
- .width('100%')
- .height('100%');
-
- //if (!mejs.MediaFeatures.hasTrueNativeFullScreen) {
- t.media.setVideoSize($(window).width(),$(window).height());
- //}
- }
-
- t.layers.children('div')
- .width('100%')
- .height('100%');
-
- if (t.fullscreenBtn) {
- t.fullscreenBtn
- .removeClass('mejs-fullscreen')
- .addClass('mejs-unfullscreen');
- }
-
- t.setControlsSize();
- t.isFullScreen = true;
- },
-
- exitFullScreen: function() {
-
- var t = this;
-
- // Prevent container from attempting to stretch a second time
- clearTimeout(t.containerSizeTimeout);
-
- // firefox can't adjust plugins
- if (t.media.pluginType !== 'native' && mejs.MediaFeatures.isFirefox) {
- t.media.setFullscreen(false);
- //player.isFullScreen = false;
- return;
- }
-
- // come outo of native fullscreen
- if (mejs.MediaFeatures.hasTrueNativeFullScreen && (mejs.MediaFeatures.isFullScreen() || t.isFullScreen)) {
- mejs.MediaFeatures.cancelFullScreen();
- }
-
- // restore scroll bars to document
- document.documentElement.style.overflow = docStyleOverflow;
-
- t.container
- .removeClass('mejs-container-fullscreen')
- .width(normalWidth)
- .height(normalHeight);
- //.css({position: '', left: '', top: '', right: '', bottom: '', overflow: 'inherit', width: normalWidth + 'px', height: normalHeight + 'px', 'z-index': 1});
-
- if (t.pluginType === 'native') {
- t.$media
- .width(normalWidth)
- .height(normalHeight);
- } else {
- t.container.find('object embed')
- .width(normalWidth)
- .height(normalHeight);
-
- t.media.setVideoSize(normalWidth, normalHeight);
- }
-
- t.layers.children('div')
- .width(normalWidth)
- .height(normalHeight);
-
- t.fullscreenBtn
- .removeClass('mejs-unfullscreen')
- .addClass('mejs-fullscreen');
-
- t.setControlsSize();
- t.isFullScreen = false;
- }
- });
-
-})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-googleanalytics.js b/files_videoviewer/mediaelement/src/js/mep-feature-googleanalytics.js
deleted file mode 100755
index fdef1fecf..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-googleanalytics.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-* Google Analytics Plugin
-* Requires
-*
-*/
-
-(function($) {
-
-$.extend(mejs.MepDefaults, {
- googleAnalyticsTitle: '',
- googleAnalyticsCategory: 'Videos',
- googleAnalyticsEventPlay: 'Play',
- googleAnalyticsEventPause: 'Pause',
- googleAnalyticsEventEnded: 'Ended',
- googleAnalyticsEventTime: 'Time'
-});
-
-
-$.extend(MediaElementPlayer.prototype, {
- buildgoogleanalytics: function(player, controls, layers, media) {
-
- media.addEventListener('play', function() {
- if (typeof _gaq != 'undefined') {
- _gaq.push(['_trackEvent',
- player.options.googleAnalyticsCategory,
- player.options.googleAnalyticsEventPlay,
- (player.options.googleAnalyticsTitle === '') ? player.currentSrc : player.options.googleAnalyticsTitle
- ]);
- }
- }, false);
-
- media.addEventListener('pause', function() {
- if (typeof _gaq != 'undefined') {
- _gaq.push(['_trackEvent',
- player.options.googleAnalyticsCategory,
- player.options.googleAnalyticsEventPause,
- (player.options.googleAnalyticsTitle === '') ? player.currentSrc : player.options.googleAnalyticsTitle
- ]);
- }
- }, false);
-
- media.addEventListener('ended', function() {
- if (typeof _gaq != 'undefined') {
- _gaq.push(['_trackEvent',
- player.options.googleAnalyticsCategory,
- player.options.googleAnalyticsEventEnded,
- (player.options.googleAnalyticsTitle === '') ? player.currentSrc : player.options.googleAnalyticsTitle
- ]);
- }
- }, false);
-
- /*
- media.addEventListener('timeupdate', function() {
- if (typeof _gaq != 'undefined') {
- _gaq.push(['_trackEvent',
- player.options.googleAnalyticsCategory,
- player.options.googleAnalyticsEventEnded,
- player.options.googleAnalyticsTime,
- (player.options.googleAnalyticsTitle === '') ? player.currentSrc : player.options.googleAnalyticsTitle,
- player.currentTime
- ]);
- }
- }, true);
- */
- }
-});
-
-})(mejs.$); \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-loop.js b/files_videoviewer/mediaelement/src/js/mep-feature-loop.js
deleted file mode 100755
index b30da6c42..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-loop.js
+++ /dev/null
@@ -1,26 +0,0 @@
-(function($) {
- // loop toggle
- $.extend(MediaElementPlayer.prototype, {
- buildloop: function(player, controls, layers, media) {
- var
- t = this,
- // create the loop button
- loop =
- $('<div class="mejs-button mejs-loop-button ' + ((player.options.loop) ? 'mejs-loop-on' : 'mejs-loop-off') + '">' +
- '<button type="button" aria-controls="' + t.id + '" title="Toggle Loop" aria-label="Toggle Loop"></button>' +
- '</div>')
- // append it to the toolbar
- .appendTo(controls)
- // add a click toggle event
- .click(function() {
- player.options.loop = !player.options.loop;
- if (player.options.loop) {
- loop.removeClass('mejs-loop-off').addClass('mejs-loop-on');
- } else {
- loop.removeClass('mejs-loop-on').addClass('mejs-loop-off');
- }
- });
- }
- });
-
-})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-playlist.js b/files_videoviewer/mediaelement/src/js/mep-feature-playlist.js
deleted file mode 100755
index 93dcad7ae..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-playlist.js
+++ /dev/null
@@ -1,12 +0,0 @@
-(function($) {
-
- $.extend(MediaElementPlayer.prototype, {
- buildplaylist = function(player, controls, layers, media) {
- if (!player.isVideo)
- return;
-
- // add speed controls
- }
- });
-
-})(mejs.$); \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-playpause.js b/files_videoviewer/mediaelement/src/js/mep-feature-playpause.js
deleted file mode 100755
index 1d88e5079..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-playpause.js
+++ /dev/null
@@ -1,46 +0,0 @@
-(function($) {
-
- $.extend(mejs.MepDefaults, {
- playpauseText: 'Play/Pause'
- });
-
- // PLAY/pause BUTTON
- $.extend(MediaElementPlayer.prototype, {
- buildplaypause: function(player, controls, layers, media) {
- var
- t = this,
- play =
- $('<div class="mejs-button mejs-playpause-button mejs-play" >' +
- '<button type="button" aria-controls="' + t.id + '" title="' + t.options.playpauseText + '" aria-label="' + t.options.playpauseText + '"></button>' +
- '</div>')
- .appendTo(controls)
- .click(function(e) {
- e.preventDefault();
-
- if (media.paused) {
- media.play();
- } else {
- media.pause();
- }
-
- return false;
- });
-
- media.addEventListener('play',function() {
- play.removeClass('mejs-play').addClass('mejs-pause');
- }, false);
- media.addEventListener('playing',function() {
- play.removeClass('mejs-play').addClass('mejs-pause');
- }, false);
-
-
- media.addEventListener('pause',function() {
- play.removeClass('mejs-pause').addClass('mejs-play');
- }, false);
- media.addEventListener('paused',function() {
- play.removeClass('mejs-pause').addClass('mejs-play');
- }, false);
- }
- });
-
-})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-postroll.js b/files_videoviewer/mediaelement/src/js/mep-feature-postroll.js
deleted file mode 100755
index 5de9a342a..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-postroll.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Postroll plugin
- */
-(function($) {
-
- $.extend(mejs.MepDefaults, {
- postrollCloseText: mejs.i18n.t('Close')
- });
-
- // Postroll
- $.extend(MediaElementPlayer.prototype, {
- buildpostroll: function(player, controls, layers, media) {
- var
- t = this,
- postrollLink = t.container.find('link[rel="postroll"]').attr('href');
-
- if (typeof postrollLink !== 'undefined') {
- player.postroll =
- $('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">' + t.options.postrollCloseText + '</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(layers).hide();
-
- t.media.addEventListener('ended', function (e) {
- $.ajax({
- dataType: 'html',
- url: postrollLink,
- success: function (data, textStatus) {
- layers.find('.mejs-postroll-layer-content').html(data);
- }
- });
- player.postroll.show();
- }, false);
- }
- }
- });
-
-})(mejs.$); \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-progress.js b/files_videoviewer/mediaelement/src/js/mep-feature-progress.js
deleted file mode 100755
index bfc1c4ce2..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-progress.js
+++ /dev/null
@@ -1,173 +0,0 @@
-(function($) {
- // progress/loaded bar
- $.extend(MediaElementPlayer.prototype, {
- buildprogress: function(player, controls, layers, media) {
-
- $('<div class="mejs-time-rail">'+
- '<span class="mejs-time-total">'+
- '<span class="mejs-time-buffering"></span>'+
- '<span class="mejs-time-loaded"></span>'+
- '<span class="mejs-time-current"></span>'+
- '<span class="mejs-time-handle"></span>'+
- '<span class="mejs-time-float">' +
- '<span class="mejs-time-float-current">00:00</span>' +
- '<span class="mejs-time-float-corner"></span>' +
- '</span>'+
- '</span>'+
- '</div>')
- .appendTo(controls);
- controls.find('.mejs-time-buffering').hide();
-
- var
- t = this,
- total = controls.find('.mejs-time-total'),
- loaded = controls.find('.mejs-time-loaded'),
- current = controls.find('.mejs-time-current'),
- handle = controls.find('.mejs-time-handle'),
- timefloat = controls.find('.mejs-time-float'),
- timefloatcurrent = controls.find('.mejs-time-float-current'),
- handleMouseMove = function (e) {
- // mouse position relative to the object
- var x = e.pageX,
- offset = total.offset(),
- width = total.outerWidth(true),
- percentage = 0,
- newTime = 0,
- pos = 0;
-
-
- if (media.duration) {
- if (x < offset.left) {
- x = offset.left;
- } else if (x > width + offset.left) {
- x = width + offset.left;
- }
-
- pos = x - offset.left;
- percentage = (pos / width);
- newTime = (percentage <= 0.02) ? 0 : percentage * media.duration;
-
- // seek to where the mouse is
- if (mouseIsDown && newTime !== media.currentTime) {
- media.setCurrentTime(newTime);
- }
-
- // position floating time box
- if (!mejs.MediaFeatures.hasTouch) {
- timefloat.css('left', pos);
- timefloatcurrent.html( mejs.Utility.secondsToTimeCode(newTime) );
- timefloat.show();
- }
- }
- },
- mouseIsDown = false,
- mouseIsOver = false;
-
- // handle clicks
- //controls.find('.mejs-time-rail').delegate('span', 'click', handleMouseMove);
- total
- .bind('mousedown', function (e) {
- // only handle left clicks
- if (e.which === 1) {
- mouseIsDown = true;
- handleMouseMove(e);
- t.globalBind('mousemove.dur', function(e) {
- handleMouseMove(e);
- });
- t.globalBind('mouseup.dur', function (e) {
- mouseIsDown = false;
- timefloat.hide();
- t.globalUnbind('.dur');
- });
- return false;
- }
- })
- .bind('mouseenter', function(e) {
- mouseIsOver = true;
- t.globalBind('mousemove.dur', function(e) {
- handleMouseMove(e);
- });
- if (!mejs.MediaFeatures.hasTouch) {
- timefloat.show();
- }
- })
- .bind('mouseleave',function(e) {
- mouseIsOver = false;
- if (!mouseIsDown) {
- t.globalUnbind('.dur');
- timefloat.hide();
- }
- });
-
- // loading
- media.addEventListener('progress', function (e) {
- player.setProgressRail(e);
- player.setCurrentRail(e);
- }, false);
-
- // current time
- media.addEventListener('timeupdate', function(e) {
- player.setProgressRail(e);
- player.setCurrentRail(e);
- }, false);
-
-
- // store for later use
- t.loaded = loaded;
- t.total = total;
- t.current = current;
- t.handle = handle;
- },
- setProgressRail: function(e) {
-
- var
- t = this,
- target = (e != undefined) ? e.target : t.media,
- percent = null;
-
- // newest HTML5 spec has buffered array (FF4, Webkit)
- if (target && target.buffered && target.buffered.length > 0 && target.buffered.end && target.duration) {
- // TODO: account for a real array with multiple values (only Firefox 4 has this so far)
- percent = target.buffered.end(0) / target.duration;
- }
- // Some browsers (e.g., FF3.6 and Safari 5) cannot calculate target.bufferered.end()
- // to be anything other than 0. If the byte count is available we use this instead.
- // Browsers that support the else if do not seem to have the bufferedBytes value and
- // should skip to there. Tested in Safari 5, Webkit head, FF3.6, Chrome 6, IE 7/8.
- else if (target && target.bytesTotal != undefined && target.bytesTotal > 0 && target.bufferedBytes != undefined) {
- percent = target.bufferedBytes / target.bytesTotal;
- }
- // Firefox 3 with an Ogg file seems to go this way
- else if (e && e.lengthComputable && e.total != 0) {
- percent = e.loaded/e.total;
- }
-
- // finally update the progress bar
- if (percent !== null) {
- percent = Math.min(1, Math.max(0, percent));
- // update loaded bar
- if (t.loaded && t.total) {
- t.loaded.width(t.total.width() * percent);
- }
- }
- },
- setCurrentRail: function() {
-
- var t = this;
-
- if (t.media.currentTime != undefined && t.media.duration) {
-
- // update bar and handle
- if (t.total && t.handle) {
- var
- newWidth = Math.round(t.total.width() * t.media.currentTime / t.media.duration),
- handlePos = newWidth - Math.round(t.handle.outerWidth(true) / 2);
-
- t.current.width(newWidth);
- t.handle.css('left', handlePos);
- }
- }
-
- }
- });
-})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-sourcechooser.js b/files_videoviewer/mediaelement/src/js/mep-feature-sourcechooser.js
deleted file mode 100755
index bdaf14ec7..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-sourcechooser.js
+++ /dev/null
@@ -1,87 +0,0 @@
-// Source Chooser Plugin
-(function($) {
-
- $.extend(mejs.MepDefaults, {
- sourcechooserText: 'Source Chooser'
- });
-
- $.extend(MediaElementPlayer.prototype, {
- buildsourcechooser: function(player, controls, layers, media) {
-
- var t = this;
-
- player.sourcechooserButton =
- $('<div class="mejs-button mejs-sourcechooser-button">'+
- '<button type="button" aria-controls="' + t.id + '" title="' + t.options.sourcechooserText + '" aria-label="' + t.options.sourcechooserText + '"></button>'+
- '<div class="mejs-sourcechooser-selector">'+
- '<ul>'+
- '</ul>'+
- '</div>'+
- '</div>')
- .appendTo(controls)
-
- // hover
- .hover(function() {
- $(this).find('.mejs-sourcechooser-selector').css('visibility','visible');
- }, function() {
- $(this).find('.mejs-sourcechooser-selector').css('visibility','hidden');
- })
-
- // handle clicks to the language radio buttons
- .delegate('input[type=radio]', 'click', function() {
- src = this.value;
-
- if (media.currentSrc != src) {
- currentTime = media.currentTime;
- paused = media.paused;
- media.setSrc(src);
- media.load();
- media.addEventListener('loadedmetadata', function(e){
- this.currentTime = currentTime;
- }, true);
- media.addEventListener('canplay', function(e){
- if (!paused) {
- this.play();
- }
- }, true);
- }
- });
-
- // add to list
- for (i in media.children) {
- src = media.children[i];
- if (src.nodeName === 'SOURCE' && (media.canPlayType(src.type) == 'probably' || media.canPlayType(src.type) == 'maybe')) {
- player.addSourceButton(src.src, src.title, src.type, media.src == src.src);
- }
- }
-
- },
-
- addSourceButton: function(src, label, type, isCurrent) {
- var t = this;
- if (label === '' || label == undefined) {
- label = src;
- }
- type = type.split('/')[1];
-
- t.sourcechooserButton.find('ul').append(
- $('<li>'+
- '<input type="radio" name="' + t.id + '_sourcechooser" id="' + t.id + '_sourcechooser_' + label + type + '" value="' + src + '" ' + (isCurrent ? 'checked="checked"' : '') + ' />'+
- '<label for="' + t.id + '_sourcechooser_' + label + type + '">' + label + ' (' + type + ')</label>'+
- '</li>')
- );
-
- t.adjustSourcechooserBox();
-
- },
-
- adjustSourcechooserBox: function() {
- var t = this;
- // adjust the size of the outer box
- t.sourcechooserButton.find('.mejs-sourcechooser-selector').height(
- t.sourcechooserButton.find('.mejs-sourcechooser-selector ul').outerHeight(true)
- );
- }
- });
-
-})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-speed.js b/files_videoviewer/mediaelement/src/js/mep-feature-speed.js
deleted file mode 100755
index 4250652aa..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-speed.js
+++ /dev/null
@@ -1,11 +0,0 @@
-(function($) {
-
- MediaElementPlayer.prototype.buildspeed = function(player, controls, layers, media) {
- if (!player.isVideo)
- return;
-
- // add speed controls
- }
-
-
-})(mejs.$); \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-stop.js b/files_videoviewer/mediaelement/src/js/mep-feature-stop.js
deleted file mode 100755
index d70481ec6..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-stop.js
+++ /dev/null
@@ -1,33 +0,0 @@
-(function($) {
-
- $.extend(mejs.MepDefaults, {
- stopText: 'Stop'
- });
-
- // STOP BUTTON
- $.extend(MediaElementPlayer.prototype, {
- buildstop: function(player, controls, layers, media) {
- var t = this,
- stop =
- $('<div class="mejs-button mejs-stop-button mejs-stop">' +
- '<button type="button" aria-controls="' + t.id + '" title="' + t.options.stopText + '" aria-label="' + t.options.stopText + '"></button>' +
- '</div>')
- .appendTo(controls)
- .click(function() {
- if (!media.paused) {
- media.pause();
- }
- if (media.currentTime > 0) {
- media.setCurrentTime(0);
- media.pause();
- controls.find('.mejs-time-current').width('0px');
- controls.find('.mejs-time-handle').css('left', '0px');
- controls.find('.mejs-time-float-current').html( mejs.Utility.secondsToTimeCode(0) );
- controls.find('.mejs-currenttime').html( mejs.Utility.secondsToTimeCode(0) );
- layers.find('.mejs-poster').show();
- }
- });
- }
- });
-
-})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-time.js b/files_videoviewer/mediaelement/src/js/mep-feature-time.js
deleted file mode 100755
index 9240ec31a..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-time.js
+++ /dev/null
@@ -1,84 +0,0 @@
-(function($) {
-
- // options
- $.extend(mejs.MepDefaults, {
- duration: -1,
- timeAndDurationSeparator: ' <span> | </span> '
- });
-
-
- // current and duration 00:00 / 00:00
- $.extend(MediaElementPlayer.prototype, {
- buildcurrent: function(player, controls, layers, media) {
- var t = this;
-
- $('<div class="mejs-time">'+
- '<span class="mejs-currenttime">' + (player.options.alwaysShowHours ? '00:' : '')
- + (player.options.showTimecodeFrameCount? '00:00:00':'00:00')+ '</span>'+
- '</div>')
- .appendTo(controls);
-
- t.currenttime = t.controls.find('.mejs-currenttime');
-
- media.addEventListener('timeupdate',function() {
- player.updateCurrent();
- }, false);
- },
-
-
- buildduration: function(player, controls, layers, media) {
- var t = this;
-
- if (controls.children().last().find('.mejs-currenttime').length > 0) {
- $(t.options.timeAndDurationSeparator +
- '<span class="mejs-duration">' +
- (t.options.duration > 0 ?
- mejs.Utility.secondsToTimeCode(t.options.duration, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25) :
- ((player.options.alwaysShowHours ? '00:' : '') + (player.options.showTimecodeFrameCount? '00:00:00':'00:00'))
- ) +
- '</span>')
- .appendTo(controls.find('.mejs-time'));
- } else {
-
- // add class to current time
- controls.find('.mejs-currenttime').parent().addClass('mejs-currenttime-container');
-
- $('<div class="mejs-time mejs-duration-container">'+
- '<span class="mejs-duration">' +
- (t.options.duration > 0 ?
- mejs.Utility.secondsToTimeCode(t.options.duration, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25) :
- ((player.options.alwaysShowHours ? '00:' : '') + (player.options.showTimecodeFrameCount? '00:00:00':'00:00'))
- ) +
- '</span>' +
- '</div>')
- .appendTo(controls);
- }
-
- t.durationD = t.controls.find('.mejs-duration');
-
- media.addEventListener('timeupdate',function() {
- player.updateDuration();
- }, false);
- },
-
- updateCurrent: function() {
- var t = this;
-
- if (t.currenttime) {
- t.currenttime.html(mejs.Utility.secondsToTimeCode(t.media.currentTime, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25));
- }
- },
-
- updateDuration: function() {
- var t = this;
-
- //Toggle the long video class if the video is longer than an hour.
- t.container.toggleClass("mejs-long-video", t.media.duration > 3600);
-
- if (t.durationD && (t.options.duration > 0 || t.media.duration)) {
- t.durationD.html(mejs.Utility.secondsToTimeCode(t.options.duration > 0 ? t.options.duration : t.media.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25));
- }
- }
- });
-
-})(mejs.$); \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-tracks.js b/files_videoviewer/mediaelement/src/js/mep-feature-tracks.js
deleted file mode 100755
index f3d3ce8af..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-tracks.js
+++ /dev/null
@@ -1,673 +0,0 @@
-(function($) {
-
- // add extra default options
- $.extend(mejs.MepDefaults, {
- // this will automatically turn on a <track>
- startLanguage: '',
-
- tracksText: 'Captions/Subtitles',
-
- // option to remove the [cc] button when no <track kind="subtitles"> are present
- hideCaptionsButtonWhenEmpty: true,
-
- // If true and we only have one track, change captions to popup
- toggleCaptionsButtonWhenOnlyOne: false,
-
- // #id or .class
- slidesSelector: ''
- });
-
- $.extend(MediaElementPlayer.prototype, {
-
- hasChapters: false,
-
- buildtracks: function(player, controls, layers, media) {
- if (player.tracks.length == 0)
- return;
-
- var t = this,
- i,
- options = '';
-
- player.chapters =
- $('<div class="mejs-chapters mejs-layer"></div>')
- .prependTo(layers).hide();
- player.captions =
- $('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover"><span class="mejs-captions-text"></span></div></div>')
- .prependTo(layers).hide();
- player.captionsText = player.captions.find('.mejs-captions-text');
- player.captionsButton =
- $('<div class="mejs-button mejs-captions-button">'+
- '<button type="button" aria-controls="' + t.id + '" title="' + t.options.tracksText + '" aria-label="' + t.options.tracksText + '"></button>'+
- '<div class="mejs-captions-selector">'+
- '<ul>'+
- '<li>'+
- '<input type="radio" name="' + player.id + '_captions" id="' + player.id + '_captions_none" value="none" checked="checked" />' +
- '<label for="' + player.id + '_captions_none">None</label>'+
- '</li>' +
- '</ul>'+
- '</div>'+
- '</div>')
- .appendTo(controls);
-
-
- var subtitleCount = 0;
- for (i=0; i<player.tracks.length; i++) {
- if (player.tracks[i].kind == 'subtitles') {
- subtitleCount++;
- }
- }
-
- // if only one language then just make the button a toggle
- if (t.options.toggleCaptionsButtonWhenOnlyOne && subtitleCount == 1){
- // click
- player.captionsButton.on('click',function() {
- if (player.selectedTrack == null) {
- var lang = player.tracks[0].srclang;
- } else {
- var lang = 'none';
- }
- player.setTrack(lang);
- });
- } else {
- // hover
- player.captionsButton.hover(function() {
- $(this).find('.mejs-captions-selector').css('visibility','visible');
- }, function() {
- $(this).find('.mejs-captions-selector').css('visibility','hidden');
- })
-
- // handle clicks to the language radio buttons
- .on('click','input[type=radio]',function() {
- lang = this.value;
- player.setTrack(lang);
- });
-
- }
-
- if (!player.options.alwaysShowControls) {
- // move with controls
- player.container
- .bind('controlsshown', function () {
- // push captions above controls
- player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover');
-
- })
- .bind('controlshidden', function () {
- if (!media.paused) {
- // move back to normal place
- player.container.find('.mejs-captions-position').removeClass('mejs-captions-position-hover');
- }
- });
- } else {
- player.container.find('.mejs-captions-position').addClass('mejs-captions-position-hover');
- }
-
- player.trackToLoad = -1;
- player.selectedTrack = null;
- player.isLoadingTrack = false;
-
-
-
- // add to list
- for (i=0; i<player.tracks.length; i++) {
- if (player.tracks[i].kind == 'subtitles') {
- player.addTrackButton(player.tracks[i].srclang, player.tracks[i].label);
- }
- }
-
- // start loading tracks
- player.loadNextTrack();
-
-
- media.addEventListener('timeupdate',function(e) {
- player.displayCaptions();
- }, false);
-
- if (player.options.slidesSelector != '') {
- player.slidesContainer = $(player.options.slidesSelector);
-
- media.addEventListener('timeupdate',function(e) {
- player.displaySlides();
- }, false);
-
- }
-
- media.addEventListener('loadedmetadata', function(e) {
- player.displayChapters();
- }, false);
-
- player.container.hover(
- function () {
- // chapters
- if (player.hasChapters) {
- player.chapters.css('visibility','visible');
- player.chapters.fadeIn(200).height(player.chapters.find('.mejs-chapter').outerHeight());
- }
- },
- function () {
- if (player.hasChapters && !media.paused) {
- player.chapters.fadeOut(200, function() {
- $(this).css('visibility','hidden');
- $(this).css('display','block');
- });
- }
- });
-
- // check for autoplay
- if (player.node.getAttribute('autoplay') !== null) {
- player.chapters.css('visibility','hidden');
- }
- },
-
- setTrack: function(lang){
-
- var t = this,
- i;
-
- if (lang == 'none') {
- t.selectedTrack = null;
- t.captionsButton.removeClass('mejs-captions-enabled');
- } else {
- for (i=0; i<t.tracks.length; i++) {
- if (t.tracks[i].srclang == lang) {
- if (t.selectedTrack == null)
- t.captionsButton.addClass('mejs-captions-enabled');
- t.selectedTrack = t.tracks[i];
- t.captions.attr('lang', t.selectedTrack.srclang);
- t.displayCaptions();
- break;
- }
- }
- }
- },
-
- loadNextTrack: function() {
- var t = this;
-
- t.trackToLoad++;
- if (t.trackToLoad < t.tracks.length) {
- t.isLoadingTrack = true;
- t.loadTrack(t.trackToLoad);
- } else {
- // add done?
- t.isLoadingTrack = false;
-
- t.checkForTracks();
- }
- },
-
- loadTrack: function(index){
- var
- t = this,
- track = t.tracks[index],
- after = function() {
-
- track.isLoaded = true;
-
- // create button
- //t.addTrackButton(track.srclang);
- t.enableTrackButton(track.srclang, track.label);
-
- t.loadNextTrack();
-
- };
-
-
- $.ajax({
- url: track.src,
- dataType: "text",
- success: function(d) {
-
- // parse the loaded file
- if (typeof d == "string" && (/<tt\s+xml/ig).exec(d)) {
- track.entries = mejs.TrackFormatParser.dfxp.parse(d);
- } else {
- track.entries = mejs.TrackFormatParser.webvvt.parse(d);
- }
-
- after();
-
- if (track.kind == 'chapters') {
- t.media.addEventListener('play', function(e) {
- if (t.media.duration > 0) {
- t.displayChapters(track);
- }
- }, false);
- }
-
- if (track.kind == 'slides') {
- t.setupSlides(track);
- }
- },
- error: function() {
- t.loadNextTrack();
- }
- });
- },
-
- enableTrackButton: function(lang, label) {
- var t = this;
-
- if (label === '') {
- label = mejs.language.codes[lang] || lang;
- }
-
- t.captionsButton
- .find('input[value=' + lang + ']')
- .prop('disabled',false)
- .siblings('label')
- .html( label );
-
- // auto select
- if (t.options.startLanguage == lang) {
- $('#' + t.id + '_captions_' + lang).click();
- }
-
- t.adjustLanguageBox();
- },
-
- addTrackButton: function(lang, label) {
- var t = this;
- if (label === '') {
- label = mejs.language.codes[lang] || lang;
- }
-
- t.captionsButton.find('ul').append(
- $('<li>'+
- '<input type="radio" name="' + t.id + '_captions" id="' + t.id + '_captions_' + lang + '" value="' + lang + '" disabled="disabled" />' +
- '<label for="' + t.id + '_captions_' + lang + '">' + label + ' (loading)' + '</label>'+
- '</li>')
- );
-
- t.adjustLanguageBox();
-
- // remove this from the dropdownlist (if it exists)
- t.container.find('.mejs-captions-translations option[value=' + lang + ']').remove();
- },
-
- adjustLanguageBox:function() {
- var t = this;
- // adjust the size of the outer box
- t.captionsButton.find('.mejs-captions-selector').height(
- t.captionsButton.find('.mejs-captions-selector ul').outerHeight(true) +
- t.captionsButton.find('.mejs-captions-translations').outerHeight(true)
- );
- },
-
- checkForTracks: function() {
- var
- t = this,
- hasSubtitles = false;
-
- // check if any subtitles
- if (t.options.hideCaptionsButtonWhenEmpty) {
- for (i=0; i<t.tracks.length; i++) {
- if (t.tracks[i].kind == 'subtitles') {
- hasSubtitles = true;
- break;
- }
- }
-
- if (!hasSubtitles) {
- t.captionsButton.hide();
- t.setControlsSize();
- }
- }
- },
-
- displayCaptions: function() {
-
- if (typeof this.tracks == 'undefined')
- return;
-
- var
- t = this,
- i,
- track = t.selectedTrack;
-
- if (track != null && track.isLoaded) {
- for (i=0; i<track.entries.times.length; i++) {
- if (t.media.currentTime >= track.entries.times[i].start && t.media.currentTime <= track.entries.times[i].stop){
- t.captionsText.html(track.entries.text[i]);
- t.captions.show().height(0);
- return; // exit out if one is visible;
- }
- }
- t.captions.hide();
- } else {
- t.captions.hide();
- }
- },
-
- setupSlides: function(track) {
- var t = this;
-
- t.slides = track;
- t.slides.entries.imgs = [t.slides.entries.text.length];
- t.showSlide(0);
-
- },
-
- showSlide: function(index) {
- if (typeof this.tracks == 'undefined' || typeof this.slidesContainer == 'undefined') {
- return;
- }
-
- var t = this,
- url = t.slides.entries.text[index],
- img = t.slides.entries.imgs[index];
-
- if (typeof img == 'undefined' || typeof img.fadeIn == 'undefined') {
-
- t.slides.entries.imgs[index] = img = $('<img src="' + url + '">')
- .on('load', function() {
- img.appendTo(t.slidesContainer)
- .hide()
- .fadeIn()
- .siblings(':visible')
- .fadeOut();
-
- });
-
- } else {
-
- if (!img.is(':visible') && !img.is(':animated')) {
-
- console.log('showing existing slide');
-
- img.fadeIn()
- .siblings(':visible')
- .fadeOut();
- }
- }
-
- },
-
- displaySlides: function() {
-
- if (typeof this.slides == 'undefined')
- return;
-
- var
- t = this,
- slides = t.slides,
- i;
-
- for (i=0; i<slides.entries.times.length; i++) {
- if (t.media.currentTime >= slides.entries.times[i].start && t.media.currentTime <= slides.entries.times[i].stop){
-
- t.showSlide(i);
-
- return; // exit out if one is visible;
- }
- }
- },
-
- displayChapters: function() {
- var
- t = this,
- i;
-
- for (i=0; i<t.tracks.length; i++) {
- if (t.tracks[i].kind == 'chapters' && t.tracks[i].isLoaded) {
- t.drawChapters(t.tracks[i]);
- t.hasChapters = true;
- break;
- }
- }
- },
-
- drawChapters: function(chapters) {
- var
- t = this,
- i,
- dur,
- //width,
- //left,
- percent = 0,
- usedPercent = 0;
-
- t.chapters.empty();
-
- for (i=0; i<chapters.entries.times.length; i++) {
- dur = chapters.entries.times[i].stop - chapters.entries.times[i].start;
- percent = Math.floor(dur / t.media.duration * 100);
- if (percent + usedPercent > 100 || // too large
- i == chapters.entries.times.length-1 && percent + usedPercent < 100) // not going to fill it in
- {
- percent = 100 - usedPercent;
- }
- //width = Math.floor(t.width * dur / t.media.duration);
- //left = Math.floor(t.width * chapters.entries.times[i].start / t.media.duration);
- //if (left + width > t.width) {
- // width = t.width - left;
- //}
-
- t.chapters.append( $(
- '<div class="mejs-chapter" rel="' + chapters.entries.times[i].start + '" style="left: ' + usedPercent.toString() + '%;width: ' + percent.toString() + '%;">' +
- '<div class="mejs-chapter-block' + ((i==chapters.entries.times.length-1) ? ' mejs-chapter-block-last' : '') + '">' +
- '<span class="ch-title">' + chapters.entries.text[i] + '</span>' +
- '<span class="ch-time">' + mejs.Utility.secondsToTimeCode(chapters.entries.times[i].start) + '&ndash;' + mejs.Utility.secondsToTimeCode(chapters.entries.times[i].stop) + '</span>' +
- '</div>' +
- '</div>'));
- usedPercent += percent;
- }
-
- t.chapters.find('div.mejs-chapter').click(function() {
- t.media.setCurrentTime( parseFloat( $(this).attr('rel') ) );
- if (t.media.paused) {
- t.media.play();
- }
- });
-
- t.chapters.show();
- }
- });
-
-
-
- mejs.language = {
- codes: {
- af:'Afrikaans',
- sq:'Albanian',
- ar:'Arabic',
- be:'Belarusian',
- bg:'Bulgarian',
- ca:'Catalan',
- zh:'Chinese',
- 'zh-cn':'Chinese Simplified',
- 'zh-tw':'Chinese Traditional',
- hr:'Croatian',
- cs:'Czech',
- da:'Danish',
- nl:'Dutch',
- en:'English',
- et:'Estonian',
- tl:'Filipino',
- fi:'Finnish',
- fr:'French',
- gl:'Galician',
- de:'German',
- el:'Greek',
- ht:'Haitian Creole',
- iw:'Hebrew',
- hi:'Hindi',
- hu:'Hungarian',
- is:'Icelandic',
- id:'Indonesian',
- ga:'Irish',
- it:'Italian',
- ja:'Japanese',
- ko:'Korean',
- lv:'Latvian',
- lt:'Lithuanian',
- mk:'Macedonian',
- ms:'Malay',
- mt:'Maltese',
- no:'Norwegian',
- fa:'Persian',
- pl:'Polish',
- pt:'Portuguese',
- //'pt-pt':'Portuguese (Portugal)',
- ro:'Romanian',
- ru:'Russian',
- sr:'Serbian',
- sk:'Slovak',
- sl:'Slovenian',
- es:'Spanish',
- sw:'Swahili',
- sv:'Swedish',
- tl:'Tagalog',
- th:'Thai',
- tr:'Turkish',
- uk:'Ukrainian',
- vi:'Vietnamese',
- cy:'Welsh',
- yi:'Yiddish'
- }
- };
-
- /*
- Parses WebVVT format which should be formatted as
- ================================
- WEBVTT
-
- 1
- 00:00:01,1 --> 00:00:05,000
- A line of text
-
- 2
- 00:01:15,1 --> 00:02:05,000
- A second line of text
-
- ===============================
-
- Adapted from: http://www.delphiki.com/html5/playr
- */
- mejs.TrackFormatParser = {
- webvvt: {
- // match start "chapter-" (or anythingelse)
- pattern_identifier: /^([a-zA-z]+-)?[0-9]+$/,
- pattern_timecode: /^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
-
- parse: function(trackText) {
- var
- i = 0,
- lines = mejs.TrackFormatParser.split2(trackText, /\r?\n/),
- entries = {text:[], times:[]},
- timecode,
- text;
- for(; i<lines.length; i++) {
- // check for the line number
- if (this.pattern_identifier.exec(lines[i])){
- // skip to the next line where the start --> end time code should be
- i++;
- timecode = this.pattern_timecode.exec(lines[i]);
-
- if (timecode && i<lines.length){
- i++;
- // grab all the (possibly multi-line) text that follows
- text = lines[i];
- i++;
- while(lines[i] !== '' && i<lines.length){
- text = text + '\n' + lines[i];
- i++;
- }
- text = $.trim(text).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
- // Text is in a different array so I can use .join
- entries.text.push(text);
- entries.times.push(
- {
- start: (mejs.Utility.convertSMPTEtoSeconds(timecode[1]) == 0) ? 0.200 : mejs.Utility.convertSMPTEtoSeconds(timecode[1]),
- stop: mejs.Utility.convertSMPTEtoSeconds(timecode[3]),
- settings: timecode[5]
- });
- }
- }
- }
- return entries;
- }
- },
- // Thanks to Justin Capella: https://github.com/johndyer/mediaelement/pull/420
- dfxp: {
- parse: function(trackText) {
- trackText = $(trackText).filter("tt");
- var
- i = 0,
- container = trackText.children("div").eq(0),
- lines = container.find("p"),
- styleNode = trackText.find("#" + container.attr("style")),
- styles,
- begin,
- end,
- text,
- entries = {text:[], times:[]};
-
-
- if (styleNode.length) {
- var attributes = styleNode.removeAttr("id").get(0).attributes;
- if (attributes.length) {
- styles = {};
- for (i = 0; i < attributes.length; i++) {
- styles[attributes[i].name.split(":")[1]] = attributes[i].value;
- }
- }
- }
-
- for(i = 0; i<lines.length; i++) {
- var style;
- var _temp_times = {
- start: null,
- stop: null,
- style: null
- };
- if (lines.eq(i).attr("begin")) _temp_times.start = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("begin"));
- if (!_temp_times.start && lines.eq(i-1).attr("end")) _temp_times.start = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i-1).attr("end"));
- if (lines.eq(i).attr("end")) _temp_times.stop = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i).attr("end"));
- if (!_temp_times.stop && lines.eq(i+1).attr("begin")) _temp_times.stop = mejs.Utility.convertSMPTEtoSeconds(lines.eq(i+1).attr("begin"));
- if (styles) {
- style = "";
- for (var _style in styles) {
- style += _style + ":" + styles[_style] + ";";
- }
- }
- if (style) _temp_times.style = style;
- if (_temp_times.start == 0) _temp_times.start = 0.200;
- entries.times.push(_temp_times);
- text = $.trim(lines.eq(i).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
- entries.text.push(text);
- if (entries.times.start == 0) entries.times.start = 2;
- }
- return entries;
- }
- },
- split2: function (text, regex) {
- // normal version for compliant browsers
- // see below for IE fix
- return text.split(regex);
- }
- };
-
- // test for browsers with bad String.split method.
- if ('x\n\ny'.split(/\n/gi).length != 3) {
- // add super slow IE8 and below version
- mejs.TrackFormatParser.split2 = function(text, regex) {
- var
- parts = [],
- chunk = '',
- i;
-
- for (i=0; i<text.length; i++) {
- chunk += text.substring(i,i+1);
- if (regex.test(chunk)) {
- parts.push(chunk.replace(regex, ''));
- chunk = '';
- }
- }
- parts.push(chunk);
- return parts;
- }
- }
-
-})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-visualcontrols.js b/files_videoviewer/mediaelement/src/js/mep-feature-visualcontrols.js
deleted file mode 100755
index 893aabe0e..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-visualcontrols.js
+++ /dev/null
@@ -1,10 +0,0 @@
-(function($) {
-
- MediaElementPlayer.prototype.buildvisualcontrols = function(player, controls, layers, media) {
- if (!player.isVideo)
- return;
-
- // add visual controls (HSV)
- }
-
-})(mejs.$); \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/mep-feature-volume.js b/files_videoviewer/mediaelement/src/js/mep-feature-volume.js
deleted file mode 100755
index bcf2c2414..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-feature-volume.js
+++ /dev/null
@@ -1,225 +0,0 @@
-(function($) {
-
- $.extend(mejs.MepDefaults, {
- muteText: 'Mute Toggle',
- hideVolumeOnTouchDevices: true,
-
- audioVolume: 'horizontal',
- videoVolume: 'vertical'
- });
-
- $.extend(MediaElementPlayer.prototype, {
- buildvolume: function(player, controls, layers, media) {
-
- // Android and iOS don't support volume controls
- if (mejs.MediaFeatures.hasTouch && this.options.hideVolumeOnTouchDevices)
- return;
-
- var t = this,
- mode = (t.isVideo) ? t.options.videoVolume : t.options.audioVolume,
- mute = (mode == 'horizontal') ?
-
- // horizontal version
- $('<div class="mejs-button mejs-volume-button mejs-mute">'+
- '<button type="button" aria-controls="' + t.id + '" title="' + t.options.muteText + '" aria-label="' + t.options.muteText + '"></button>'+
- '</div>' +
- '<div class="mejs-horizontal-volume-slider">'+ // outer background
- '<div class="mejs-horizontal-volume-total"></div>'+ // line background
- '<div class="mejs-horizontal-volume-current"></div>'+ // current volume
- '<div class="mejs-horizontal-volume-handle"></div>'+ // handle
- '</div>'
- )
- .appendTo(controls) :
-
- // vertical version
- $('<div class="mejs-button mejs-volume-button mejs-mute">'+
- '<button type="button" aria-controls="' + t.id + '" title="' + t.options.muteText + '" aria-label="' + t.options.muteText + '"></button>'+
- '<div class="mejs-volume-slider">'+ // outer background
- '<div class="mejs-volume-total"></div>'+ // line background
- '<div class="mejs-volume-current"></div>'+ // current volume
- '<div class="mejs-volume-handle"></div>'+ // handle
- '</div>'+
- '</div>')
- .appendTo(controls),
- volumeSlider = t.container.find('.mejs-volume-slider, .mejs-horizontal-volume-slider'),
- volumeTotal = t.container.find('.mejs-volume-total, .mejs-horizontal-volume-total'),
- volumeCurrent = t.container.find('.mejs-volume-current, .mejs-horizontal-volume-current'),
- volumeHandle = t.container.find('.mejs-volume-handle, .mejs-horizontal-volume-handle'),
-
- positionVolumeHandle = function(volume, secondTry) {
-
- if (!volumeSlider.is(':visible') && typeof secondTry == 'undefined') {
- volumeSlider.show();
- positionVolumeHandle(volume, true);
- volumeSlider.hide()
- return;
- }
-
- // correct to 0-1
- volume = Math.max(0,volume);
- volume = Math.min(volume,1);
-
- // ajust mute button style
- if (volume == 0) {
- mute.removeClass('mejs-mute').addClass('mejs-unmute');
- } else {
- mute.removeClass('mejs-unmute').addClass('mejs-mute');
- }
-
- // position slider
- if (mode == 'vertical') {
- var
-
- // height of the full size volume slider background
- totalHeight = volumeTotal.height(),
-
- // top/left of full size volume slider background
- totalPosition = volumeTotal.position(),
-
- // the new top position based on the current volume
- // 70% volume on 100px height == top:30px
- newTop = totalHeight - (totalHeight * volume);
-
- // handle
- volumeHandle.css('top', Math.round(totalPosition.top + newTop - (volumeHandle.height() / 2)));
-
- // show the current visibility
- volumeCurrent.height(totalHeight - newTop );
- volumeCurrent.css('top', totalPosition.top + newTop);
- } else {
- var
-
- // height of the full size volume slider background
- totalWidth = volumeTotal.width(),
-
- // top/left of full size volume slider background
- totalPosition = volumeTotal.position(),
-
- // the new left position based on the current volume
- newLeft = totalWidth * volume;
-
- // handle
- volumeHandle.css('left', Math.round(totalPosition.left + newLeft - (volumeHandle.width() / 2)));
-
- // rezize the current part of the volume bar
- volumeCurrent.width( Math.round(newLeft) );
- }
- },
- handleVolumeMove = function(e) {
-
- var volume = null,
- totalOffset = volumeTotal.offset();
-
- // calculate the new volume based on the moust position
- if (mode == 'vertical') {
-
- var
- railHeight = volumeTotal.height(),
- totalTop = parseInt(volumeTotal.css('top').replace(/px/,''),10),
- newY = e.pageY - totalOffset.top;
-
- volume = (railHeight - newY) / railHeight;
-
- // the controls just hide themselves (usually when mouse moves too far up)
- if (totalOffset.top == 0 || totalOffset.left == 0)
- return;
-
- } else {
- var
- railWidth = volumeTotal.width(),
- newX = e.pageX - totalOffset.left;
-
- volume = newX / railWidth;
- }
-
- // ensure the volume isn't outside 0-1
- volume = Math.max(0,volume);
- volume = Math.min(volume,1);
-
- // position the slider and handle
- positionVolumeHandle(volume);
-
- // set the media object (this will trigger the volumechanged event)
- if (volume == 0) {
- media.setMuted(true);
- } else {
- media.setMuted(false);
- }
- media.setVolume(volume);
- },
- mouseIsDown = false,
- mouseIsOver = false;
-
- // SLIDER
-
- mute
- .hover(function() {
- volumeSlider.show();
- mouseIsOver = true;
- }, function() {
- mouseIsOver = false;
-
- if (!mouseIsDown && mode == 'vertical') {
- volumeSlider.hide();
- }
- });
-
- volumeSlider
- .bind('mouseover', function() {
- mouseIsOver = true;
- })
- .bind('mousedown', function (e) {
- handleVolumeMove(e);
- t.globalBind('mousemove.vol', function(e) {
- handleVolumeMove(e);
- });
- t.globalBind('mouseup.vol', function () {
- mouseIsDown = false;
- t.globalUnbind('.vol');
-
- if (!mouseIsOver && mode == 'vertical') {
- volumeSlider.hide();
- }
- });
- mouseIsDown = true;
-
- return false;
- });
-
-
- // MUTE button
- mute.find('button').click(function() {
- media.setMuted( !media.muted );
- });
-
- // listen for volume change events from other sources
- media.addEventListener('volumechange', function(e) {
- if (!mouseIsDown) {
- if (media.muted) {
- positionVolumeHandle(0);
- mute.removeClass('mejs-mute').addClass('mejs-unmute');
- } else {
- positionVolumeHandle(media.volume);
- mute.removeClass('mejs-unmute').addClass('mejs-mute');
- }
- }
- }, false);
-
- if (t.container.is(':visible')) {
- // set initial volume
- positionVolumeHandle(player.options.startVolume);
-
- // mutes the media and sets the volume icon muted if the initial volume is set to 0
- if (player.options.startVolume === 0) {
- media.setMuted(true);
- }
-
- // shim gets the startvolume as a parameter, but we have to set it on the native <video> and <audio> elements
- if (media.pluginType === 'native') {
- media.setVolume(player.options.startVolume);
- }
- }
- }
- });
-
-})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/js/mep-header.js b/files_videoviewer/mediaelement/src/js/mep-header.js
deleted file mode 100755
index ef283252e..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-header.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*!
- * MediaElementPlayer
- * http://mediaelementjs.com/
- *
- * Creates a controller bar for HTML5 <video> add <audio> tags
- * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
- *
- * Copyright 2010-2012, John Dyer (http://j.hn/)
- * License: MIT
- *
- */ \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/mep-library.js b/files_videoviewer/mediaelement/src/js/mep-library.js
deleted file mode 100755
index 9bdb99be2..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-library.js
+++ /dev/null
@@ -1,5 +0,0 @@
-if (typeof jQuery != 'undefined') {
- mejs.$ = jQuery;
-} else if (typeof ender != 'undefined') {
- mejs.$ = ender;
-} \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/js/mep-player.js b/files_videoviewer/mediaelement/src/js/mep-player.js
deleted file mode 100755
index 58c97585e..000000000
--- a/files_videoviewer/mediaelement/src/js/mep-player.js
+++ /dev/null
@@ -1,1165 +0,0 @@
-(function ($) {
-
- // default player values
- mejs.MepDefaults = {
- // url to poster (to fix iOS 3.x)
- poster: '',
- // default if the <video width> is not specified
- defaultVideoWidth: 480,
- // default if the <video height> is not specified
- defaultVideoHeight: 270,
- // if set, overrides <video width>
- videoWidth: -1,
- // if set, overrides <video height>
- videoHeight: -1,
- // default if the user doesn't specify
- defaultAudioWidth: 400,
- // default if the user doesn't specify
- defaultAudioHeight: 30,
-
- // default amount to move back when back key is pressed
- defaultSeekBackwardInterval: function(media) {
- return (media.duration * 0.05);
- },
- // default amount to move forward when forward key is pressed
- defaultSeekForwardInterval: function(media) {
- return (media.duration * 0.05);
- },
-
- // width of audio player
- audioWidth: -1,
- // height of audio player
- audioHeight: -1,
- // initial volume when the player starts (overrided by user cookie)
- startVolume: 0.8,
- // useful for <audio> player loops
- loop: false,
- // rewind to beginning when media ends
- autoRewind: true,
- // resize to media dimensions
- enableAutosize: true,
- // forces the hour marker (##:00:00)
- alwaysShowHours: false,
-
- // show framecount in timecode (##:00:00:00)
- showTimecodeFrameCount: false,
- // used when showTimecodeFrameCount is set to true
- framesPerSecond: 25,
-
- // automatically calculate the width of the progress bar based on the sizes of other elements
- autosizeProgress : true,
- // Hide controls when playing and mouse is not over the video
- alwaysShowControls: false,
- // Display the video control
- hideVideoControlsOnLoad: false,
- // Enable click video element to toggle play/pause
- clickToPlayPause: true,
- // force iPad's native controls
- iPadUseNativeControls: false,
- // force iPhone's native controls
- iPhoneUseNativeControls: false,
- // force Android's native controls
- AndroidUseNativeControls: false,
- // features to show
- features: ['playpause','current','progress','duration','tracks','volume','fullscreen'],
- // only for dynamic
- isVideo: true,
-
- // turns keyboard support on and off for this instance
- enableKeyboard: true,
-
- // whenthis player starts, it will pause other players
- pauseOtherPlayers: true,
-
- // array of keyboard actions such as play pause
- keyActions: [
- {
- keys: [
- 32, // SPACE
- 179 // GOOGLE play/pause button
- ],
- action: function(player, media) {
- if (media.paused || media.ended) {
- media.play();
- } else {
- media.pause();
- }
- }
- },
- {
- keys: [38], // UP
- action: function(player, media) {
- var newVolume = Math.min(media.volume + 0.1, 1);
- media.setVolume(newVolume);
- }
- },
- {
- keys: [40], // DOWN
- action: function(player, media) {
- var newVolume = Math.max(media.volume - 0.1, 0);
- media.setVolume(newVolume);
- }
- },
- {
- keys: [
- 37, // LEFT
- 227 // Google TV rewind
- ],
- action: function(player, media) {
- if (!isNaN(media.duration) && media.duration > 0) {
- if (player.isVideo) {
- player.showControls();
- player.startControlsTimer();
- }
-
- // 5%
- var newTime = Math.max(media.currentTime - player.options.defaultSeekBackwardInterval(media), 0);
- media.setCurrentTime(newTime);
- }
- }
- },
- {
- keys: [
- 39, // RIGHT
- 228 // Google TV forward
- ],
- action: function(player, media) {
- if (!isNaN(media.duration) && media.duration > 0) {
- if (player.isVideo) {
- player.showControls();
- player.startControlsTimer();
- }
-
- // 5%
- var newTime = Math.min(media.currentTime + player.options.defaultSeekForwardInterval(media), media.duration);
- media.setCurrentTime(newTime);
- }
- }
- },
- {
- keys: [70], // f
- action: function(player, media) {
- if (typeof player.enterFullScreen != 'undefined') {
- if (player.isFullScreen) {
- player.exitFullScreen();
- } else {
- player.enterFullScreen();
- }
- }
- }
- }
- ]
- };
-
- mejs.mepIndex = 0;
-
- mejs.players = {};
-
- // wraps a MediaElement object in player controls
- mejs.MediaElementPlayer = function(node, o) {
- // enforce object, even without "new" (via John Resig)
- if ( !(this instanceof mejs.MediaElementPlayer) ) {
- return new mejs.MediaElementPlayer(node, o);
- }
-
- var t = this;
-
- // these will be reset after the MediaElement.success fires
- t.$media = t.$node = $(node);
- t.node = t.media = t.$media[0];
-
- // check for existing player
- if (typeof t.node.player != 'undefined') {
- return t.node.player;
- } else {
- // attach player to DOM node for reference
- t.node.player = t;
- }
-
-
- // try to get options from data-mejsoptions
- if (typeof o == 'undefined') {
- o = t.$node.data('mejsoptions');
- }
-
- // extend default options
- t.options = $.extend({},mejs.MepDefaults,o);
-
- // unique ID
- t.id = 'mep_' + mejs.mepIndex++;
-
- // add to player array (for focus events)
- mejs.players[t.id] = t;
-
- // start up
- t.init();
-
- return t;
- };
-
- // actual player
- mejs.MediaElementPlayer.prototype = {
-
- hasFocus: false,
-
- controlsAreVisible: true,
-
- init: function() {
-
- var
- t = this,
- mf = mejs.MediaFeatures,
- // options for MediaElement (shim)
- meOptions = $.extend(true, {}, t.options, {
- success: function(media, domNode) { t.meReady(media, domNode); },
- error: function(e) { t.handleError(e);}
- }),
- tagName = t.media.tagName.toLowerCase();
-
- t.isDynamic = (tagName !== 'audio' && tagName !== 'video');
-
- if (t.isDynamic) {
- // get video from src or href?
- t.isVideo = t.options.isVideo;
- } else {
- t.isVideo = (tagName !== 'audio' && t.options.isVideo);
- }
-
- // use native controls in iPad, iPhone, and Android
- if ((mf.isiPad && t.options.iPadUseNativeControls) || (mf.isiPhone && t.options.iPhoneUseNativeControls)) {
-
- // add controls and stop
- t.$media.attr('controls', 'controls');
-
- // attempt to fix iOS 3 bug
- //t.$media.removeAttr('poster');
- // no Issue found on iOS3 -ttroxell
-
- // override Apple's autoplay override for iPads
- if (mf.isiPad && t.media.getAttribute('autoplay') !== null) {
- t.media.load();
- t.media.play();
- }
-
- } else if (mf.isAndroid && t.options.AndroidUseNativeControls) {
-
- // leave default player
-
- } else {
-
- // DESKTOP: use MediaElementPlayer controls
-
- // remove native controls
- t.$media.removeAttr('controls');
-
- // build container
- t.container =
- $('<div id="' + t.id + '" class="mejs-container ' + (mejs.MediaFeatures.svg ? 'svg' : 'no-svg') + '">'+
- '<div class="mejs-inner">'+
- '<div class="mejs-mediaelement"></div>'+
- '<div class="mejs-layers"></div>'+
- '<div class="mejs-controls"></div>'+
- '<div class="mejs-clear"></div>'+
- '</div>' +
- '</div>')
- .addClass(t.$media[0].className)
- .insertBefore(t.$media);
-
- // add classes for user and content
- t.container.addClass(
- (mf.isAndroid ? 'mejs-android ' : '') +
- (mf.isiOS ? 'mejs-ios ' : '') +
- (mf.isiPad ? 'mejs-ipad ' : '') +
- (mf.isiPhone ? 'mejs-iphone ' : '') +
- (t.isVideo ? 'mejs-video ' : 'mejs-audio ')
- );
-
-
- // move the <video/video> tag into the right spot
- if (mf.isiOS) {
-
- // sadly, you can't move nodes in iOS, so we have to destroy and recreate it!
- var $newMedia = t.$media.clone();
-
- t.container.find('.mejs-mediaelement').append($newMedia);
-
- t.$media.remove();
- t.$node = t.$media = $newMedia;
- t.node = t.media = $newMedia[0]
-
- } else {
-
- // normal way of moving it into place (doesn't work on iOS)
- t.container.find('.mejs-mediaelement').append(t.$media);
- }
-
- // find parts
- t.controls = t.container.find('.mejs-controls');
- t.layers = t.container.find('.mejs-layers');
-
- // determine the size
-
- /* size priority:
- (1) videoWidth (forced),
- (2) style="width;height;"
- (3) width attribute,
- (4) defaultVideoWidth (for unspecified cases)
- */
-
- var tagType = (t.isVideo ? 'video' : 'audio'),
- capsTagName = tagType.substring(0,1).toUpperCase() + tagType.substring(1);
-
-
- if (t.options[tagType + 'Width'] > 0 || t.options[tagType + 'Width'].toString().indexOf('%') > -1) {
- t.width = t.options[tagType + 'Width'];
- } else if (t.media.style.width !== '' && t.media.style.width !== null) {
- t.width = t.media.style.width;
- } else if (t.media.getAttribute('width') !== null) {
- t.width = t.$media.attr('width');
- } else {
- t.width = t.options['default' + capsTagName + 'Width'];
- }
-
- if (t.options[tagType + 'Height'] > 0 || t.options[tagType + 'Height'].toString().indexOf('%') > -1) {
- t.height = t.options[tagType + 'Height'];
- } else if (t.media.style.height !== '' && t.media.style.height !== null) {
- t.height = t.media.style.height;
- } else if (t.$media[0].getAttribute('height') !== null) {
- t.height = t.$media.attr('height');
- } else {
- t.height = t.options['default' + capsTagName + 'Height'];
- }
-
- // set the size, while we wait for the plugins to load below
- t.setPlayerSize(t.width, t.height);
-
- // create MediaElementShim
- meOptions.pluginWidth = t.height;
- meOptions.pluginHeight = t.width;
- }
-
-
-
- // create MediaElement shim
- mejs.MediaElement(t.$media[0], meOptions);
-
- if (typeof(t.container) != 'undefined'){
- // controls are shown when loaded
- t.container.trigger('controlsshown');
- }
- },
-
- showControls: function(doAnimation) {
- var t = this;
-
- doAnimation = typeof doAnimation == 'undefined' || doAnimation;
-
- if (t.controlsAreVisible)
- return;
-
- if (doAnimation) {
- t.controls
- .css('visibility','visible')
- .stop(true, true).fadeIn(200, function() {
- t.controlsAreVisible = true;
- t.container.trigger('controlsshown');
- });
-
- // any additional controls people might add and want to hide
- t.container.find('.mejs-control')
- .css('visibility','visible')
- .stop(true, true).fadeIn(200, function() {t.controlsAreVisible = true;});
-
- } else {
- t.controls
- .css('visibility','visible')
- .css('display','block');
-
- // any additional controls people might add and want to hide
- t.container.find('.mejs-control')
- .css('visibility','visible')
- .css('display','block');
-
- t.controlsAreVisible = true;
- t.container.trigger('controlsshown');
- }
-
- t.setControlsSize();
-
- },
-
- hideControls: function(doAnimation) {
- var t = this;
-
- doAnimation = typeof doAnimation == 'undefined' || doAnimation;
-
- if (!t.controlsAreVisible)
- return;
-
- if (doAnimation) {
- // fade out main controls
- t.controls.stop(true, true).fadeOut(200, function() {
- $(this)
- .css('visibility','hidden')
- .css('display','block');
-
- t.controlsAreVisible = false;
- t.container.trigger('controlshidden');
- });
-
- // any additional controls people might add and want to hide
- t.container.find('.mejs-control').stop(true, true).fadeOut(200, function() {
- $(this)
- .css('visibility','hidden')
- .css('display','block');
- });
- } else {
-
- // hide main controls
- t.controls
- .css('visibility','hidden')
- .css('display','block');
-
- // hide others
- t.container.find('.mejs-control')
- .css('visibility','hidden')
- .css('display','block');
-
- t.controlsAreVisible = false;
- t.container.trigger('controlshidden');
- }
- },
-
- controlsTimer: null,
-
- startControlsTimer: function(timeout) {
-
- var t = this;
-
- timeout = typeof timeout != 'undefined' ? timeout : 1500;
-
- t.killControlsTimer('start');
-
- t.controlsTimer = setTimeout(function() {
- //console.log('timer fired');
- t.hideControls();
- t.killControlsTimer('hide');
- }, timeout);
- },
-
- killControlsTimer: function(src) {
-
- var t = this;
-
- if (t.controlsTimer !== null) {
- clearTimeout(t.controlsTimer);
- delete t.controlsTimer;
- t.controlsTimer = null;
- }
- },
-
- controlsEnabled: true,
-
- disableControls: function() {
- var t= this;
-
- t.killControlsTimer();
- t.hideControls(false);
- this.controlsEnabled = false;
- },
-
- enableControls: function() {
- var t= this;
-
- t.showControls(false);
-
- t.controlsEnabled = true;
- },
-
-
- // Sets up all controls and events
- meReady: function(media, domNode) {
-
-
- var t = this,
- mf = mejs.MediaFeatures,
- autoplayAttr = domNode.getAttribute('autoplay'),
- autoplay = !(typeof autoplayAttr == 'undefined' || autoplayAttr === null || autoplayAttr === 'false'),
- featureIndex,
- feature;
-
- // make sure it can't create itself again if a plugin reloads
- if (t.created)
- return;
- else
- t.created = true;
-
- t.media = media;
- t.domNode = domNode;
-
- if (!(mf.isAndroid && t.options.AndroidUseNativeControls) && !(mf.isiPad && t.options.iPadUseNativeControls) && !(mf.isiPhone && t.options.iPhoneUseNativeControls)) {
-
- // two built in features
- t.buildposter(t, t.controls, t.layers, t.media);
- t.buildkeyboard(t, t.controls, t.layers, t.media);
- t.buildoverlays(t, t.controls, t.layers, t.media);
-
- // grab for use by features
- t.findTracks();
-
- // add user-defined features/controls
- for (featureIndex in t.options.features) {
- feature = t.options.features[featureIndex];
- if (t['build' + feature]) {
- try {
- t['build' + feature](t, t.controls, t.layers, t.media);
- } catch (e) {
- // TODO: report control error
- //throw e;
- //console.log('error building ' + feature);
- //console.log(e);
- }
- }
- }
-
- t.container.trigger('controlsready');
-
- // reset all layers and controls
- t.setPlayerSize(t.width, t.height);
- t.setControlsSize();
-
-
- // controls fade
- if (t.isVideo) {
-
- if (mejs.MediaFeatures.hasTouch) {
-
- // for touch devices (iOS, Android)
- // show/hide without animation on touch
-
- t.$media.bind('touchstart', function() {
-
-
- // toggle controls
- if (t.controlsAreVisible) {
- t.hideControls(false);
- } else {
- if (t.controlsEnabled) {
- t.showControls(false);
- }
- }
- });
-
- } else {
- // click to play/pause
- t.media.addEventListener('click', function() {
- if (t.options.clickToPlayPause) {
- if (t.media.paused) {
- t.media.play();
- } else {
- t.media.pause();
- }
- }
- });
-
- // show/hide controls
- t.container
- .bind('mouseenter mouseover', function () {
- if (t.controlsEnabled) {
- if (!t.options.alwaysShowControls) {
- t.killControlsTimer('enter');
- t.showControls();
- t.startControlsTimer(2500);
- }
- }
- })
- .bind('mousemove', function() {
- if (t.controlsEnabled) {
- if (!t.controlsAreVisible) {
- t.showControls();
- }
- //t.killControlsTimer('move');
- if (!t.options.alwaysShowControls) {
- t.startControlsTimer(2500);
- }
- }
- })
- .bind('mouseleave', function () {
- if (t.controlsEnabled) {
- if (!t.media.paused && !t.options.alwaysShowControls) {
- t.startControlsTimer(1000);
- }
- }
- });
- }
-
- if(t.options.hideVideoControlsOnLoad) {
- t.hideControls(false);
- }
-
- // check for autoplay
- if (autoplay && !t.options.alwaysShowControls) {
- t.hideControls();
- }
-
- // resizer
- if (t.options.enableAutosize) {
- t.media.addEventListener('loadedmetadata', function(e) {
- // if the <video height> was not set and the options.videoHeight was not set
- // then resize to the real dimensions
- if (t.options.videoHeight <= 0 && t.domNode.getAttribute('height') === null && !isNaN(e.target.videoHeight)) {
- t.setPlayerSize(e.target.videoWidth, e.target.videoHeight);
- t.setControlsSize();
- t.media.setVideoSize(e.target.videoWidth, e.target.videoHeight);
- }
- }, false);
- }
- }
-
- // EVENTS
-
- // FOCUS: when a video starts playing, it takes focus from other players (possibily pausing them)
- media.addEventListener('play', function() {
- var playerIndex;
-
- // go through all other players
- for (playerIndex in mejs.players) {
- var p = mejs.players[playerIndex];
- if (p.id != t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended) {
- p.pause();
- }
- p.hasFocus = false;
- }
-
- t.hasFocus = true;
- },false);
-
-
- // ended for all
- t.media.addEventListener('ended', function (e) {
- if(t.options.autoRewind) {
- try{
- t.media.setCurrentTime(0);
- } catch (exp) {
-
- }
- }
- t.media.pause();
-
- if (t.setProgressRail)
- t.setProgressRail();
- if (t.setCurrentRail)
- t.setCurrentRail();
-
- if (t.options.loop) {
- t.media.play();
- } else if (!t.options.alwaysShowControls && t.controlsEnabled) {
- t.showControls();
- }
- }, false);
-
- // resize on the first play
- t.media.addEventListener('loadedmetadata', function(e) {
- if (t.updateDuration) {
- t.updateDuration();
- }
- if (t.updateCurrent) {
- t.updateCurrent();
- }
-
- if (!t.isFullScreen) {
- t.setPlayerSize(t.width, t.height);
- t.setControlsSize();
- }
- }, false);
-
-
- // webkit has trouble doing this without a delay
- setTimeout(function () {
- t.setPlayerSize(t.width, t.height);
- t.setControlsSize();
- }, 50);
-
- // adjust controls whenever window sizes (used to be in fullscreen only)
- t.globalBind('resize', function() {
-
- // don't resize for fullscreen mode
- if ( !(t.isFullScreen || (mejs.MediaFeatures.hasTrueNativeFullScreen && document.webkitIsFullScreen)) ) {
- t.setPlayerSize(t.width, t.height);
- }
-
- // always adjust controls
- t.setControlsSize();
- });
-
- // TEMP: needs to be moved somewhere else
- if (t.media.pluginType == 'youtube') {
- t.container.find('.mejs-overlay-play').hide();
- }
- }
-
- // force autoplay for HTML5
- if (autoplay && media.pluginType == 'native') {
- media.load();
- media.play();
- }
-
-
- if (t.options.success) {
-
- if (typeof t.options.success == 'string') {
- window[t.options.success](t.media, t.domNode, t);
- } else {
- t.options.success(t.media, t.domNode, t);
- }
- }
- },
-
- handleError: function(e) {
- var t = this;
-
- t.controls.hide();
-
- // Tell user that the file cannot be played
- if (t.options.error) {
- t.options.error(e);
- }
- },
-
- setPlayerSize: function(width,height) {
- var t = this;
-
- if (typeof width != 'undefined')
- t.width = width;
-
- if (typeof height != 'undefined')
- t.height = height;
-
- // detect 100% mode - use currentStyle for IE since css() doesn't return percentages
- if (t.height.toString().indexOf('%') > 0 || t.$node.css('max-width') === '100%' || (t.$node[0].currentStyle && t.$node[0].currentStyle.maxWidth === '100%')) {
-
- // do we have the native dimensions yet?
- var
- nativeWidth = t.isVideo ? ((t.media.videoWidth && t.media.videoWidth > 0) ? t.media.videoWidth : t.options.defaultVideoWidth) : t.options.defaultAudioWidth,
- nativeHeight = t.isVideo ? ((t.media.videoHeight && t.media.videoHeight > 0) ? t.media.videoHeight : t.options.defaultVideoHeight) : t.options.defaultAudioHeight,
- parentWidth = t.container.parent().closest(':visible').width(),
- newHeight = t.isVideo || !t.options.autosizeProgress ? parseInt(parentWidth * nativeHeight/nativeWidth, 10) : nativeHeight;
-
- if (t.container.parent()[0].tagName.toLowerCase() === 'body') { // && t.container.siblings().count == 0) {
- parentWidth = $(window).width();
- newHeight = $(window).height();
- }
-
- if ( newHeight != 0 && parentWidth != 0 ) {
- // set outer container size
- t.container
- .width(parentWidth)
- .height(newHeight);
-
- // set native <video> or <audio> and shims
- t.$media.add(t.container.find('.mejs-shim'))
- .width('100%')
- .height('100%');
-
- // if shim is ready, send the size to the embeded plugin
- if (t.isVideo) {
- if (t.media.setVideoSize) {
- t.media.setVideoSize(parentWidth, newHeight);
- }
- }
-
- // set the layers
- t.layers.children('.mejs-layer')
- .width('100%')
- .height('100%');
- }
-
-
- } else {
-
- t.container
- .width(t.width)
- .height(t.height);
-
- t.layers.children('.mejs-layer')
- .width(t.width)
- .height(t.height);
-
- }
- },
-
- setControlsSize: function() {
- var t = this,
- usedWidth = 0,
- railWidth = 0,
- rail = t.controls.find('.mejs-time-rail'),
- total = t.controls.find('.mejs-time-total'),
- current = t.controls.find('.mejs-time-current'),
- loaded = t.controls.find('.mejs-time-loaded'),
- others = rail.siblings();
-
-
- // allow the size to come from custom CSS
- if (t.options && !t.options.autosizeProgress) {
- // Also, frontends devs can be more flexible
- // due the opportunity of absolute positioning.
- railWidth = parseInt(rail.css('width'));
- }
-
- // attempt to autosize
- if (railWidth === 0 || !railWidth) {
-
- // find the size of all the other controls besides the rail
- others.each(function() {
- var $this = $(this);
- if ($this.css('position') != 'absolute' && $this.is(':visible')) {
- usedWidth += $(this).outerWidth(true);
- }
- });
-
- // fit the rail into the remaining space
- railWidth = t.controls.width() - usedWidth - (rail.outerWidth(true) - rail.width());
- }
-
- // outer area
- rail.width(railWidth);
- // dark space
- total.width(railWidth - (total.outerWidth(true) - total.width()));
-
- if (t.setProgressRail)
- t.setProgressRail();
- if (t.setCurrentRail)
- t.setCurrentRail();
- },
-
-
- buildposter: function(player, controls, layers, media) {
- var t = this,
- poster =
- $('<div class="mejs-poster mejs-layer">' +
- '</div>')
- .appendTo(layers),
- posterUrl = player.$media.attr('poster');
-
- // prioriy goes to option (this is useful if you need to support iOS 3.x (iOS completely fails with poster)
- if (player.options.poster !== '') {
- posterUrl = player.options.poster;
- }
-
- // second, try the real poster
- if (posterUrl !== '' && posterUrl != null) {
- t.setPoster(posterUrl);
- } else {
- poster.hide();
- }
-
- media.addEventListener('play',function() {
- poster.hide();
- }, false);
- },
-
- setPoster: function(url) {
- var t = this,
- posterDiv = t.container.find('.mejs-poster'),
- posterImg = posterDiv.find('img');
-
- if (posterImg.length == 0) {
- posterImg = $('<img width="100%" height="100%" />').appendTo(posterDiv);
- }
-
- posterImg.attr('src', url);
- },
-
- buildoverlays: function(player, controls, layers, media) {
- var t = this;
- if (!player.isVideo)
- return;
-
- var
- loading =
- $('<div class="mejs-overlay mejs-layer">'+
- '<div class="mejs-overlay-loading"><span></span></div>'+
- '</div>')
- .hide() // start out hidden
- .appendTo(layers),
- error =
- $('<div class="mejs-overlay mejs-layer">'+
- '<div class="mejs-overlay-error"></div>'+
- '</div>')
- .hide() // start out hidden
- .appendTo(layers),
- // this needs to come last so it's on top
- bigPlay =
- $('<div class="mejs-overlay mejs-layer mejs-overlay-play">'+
- '<div class="mejs-overlay-button"></div>'+
- '</div>')
- .appendTo(layers)
- .click(function() {
- if (t.options.clickToPlayPause) {
- if (media.paused) {
- media.play();
- } else {
- media.pause();
- }
- }
- });
-
- /*
- if (mejs.MediaFeatures.isiOS || mejs.MediaFeatures.isAndroid) {
- bigPlay.remove();
- loading.remove();
- }
- */
-
-
- // show/hide big play button
- media.addEventListener('play',function() {
- bigPlay.hide();
- loading.hide();
- controls.find('.mejs-time-buffering').hide();
- error.hide();
- }, false);
-
- media.addEventListener('playing', function() {
- bigPlay.hide();
- loading.hide();
- controls.find('.mejs-time-buffering').hide();
- error.hide();
- }, false);
-
- media.addEventListener('seeking', function() {
- loading.show();
- controls.find('.mejs-time-buffering').show();
- }, false);
-
- media.addEventListener('seeked', function() {
- loading.hide();
- controls.find('.mejs-time-buffering').hide();
- }, false);
-
- media.addEventListener('pause',function() {
- if (!mejs.MediaFeatures.isiPhone) {
- bigPlay.show();
- }
- }, false);
-
- media.addEventListener('waiting', function() {
- loading.show();
- controls.find('.mejs-time-buffering').show();
- }, false);
-
-
- // show/hide loading
- media.addEventListener('loadeddata',function() {
- // for some reason Chrome is firing this event
- //if (mejs.MediaFeatures.isChrome && media.getAttribute && media.getAttribute('preload') === 'none')
- // return;
-
- loading.show();
- controls.find('.mejs-time-buffering').show();
- }, false);
- media.addEventListener('canplay',function() {
- loading.hide();
- controls.find('.mejs-time-buffering').hide();
- }, false);
-
- // error handling
- media.addEventListener('error',function() {
- loading.hide();
- controls.find('.mejs-time-buffering').hide();
- error.show();
- error.find('mejs-overlay-error').html("Error loading this resource");
- }, false);
- },
-
- buildkeyboard: function(player, controls, layers, media) {
-
- var t = this;
-
- // listen for key presses
- t.globalBind('keydown', function(e) {
-
- if (player.hasFocus && player.options.enableKeyboard) {
-
- // find a matching key
- for (var i=0, il=player.options.keyActions.length; i<il; i++) {
- var keyAction = player.options.keyActions[i];
-
- for (var j=0, jl=keyAction.keys.length; j<jl; j++) {
- if (e.keyCode == keyAction.keys[j]) {
- e.preventDefault();
- keyAction.action(player, media, e.keyCode);
- return false;
- }
- }
- }
- }
-
- return true;
- });
-
- // check if someone clicked outside a player region, then kill its focus
- t.globalBind('click', function(event) {
- if ($(event.target).closest('.mejs-container').length == 0) {
- player.hasFocus = false;
- }
- });
-
- },
-
- findTracks: function() {
- var t = this,
- tracktags = t.$media.find('track');
-
- // store for use by plugins
- t.tracks = [];
- tracktags.each(function(index, track) {
-
- track = $(track);
-
- t.tracks.push({
- srclang: (track.attr('srclang')) ? track.attr('srclang').toLowerCase() : '',
- src: track.attr('src'),
- kind: track.attr('kind'),
- label: track.attr('label') || '',
- entries: [],
- isLoaded: false
- });
- });
- },
- changeSkin: function(className) {
- this.container[0].className = 'mejs-container ' + className;
- this.setPlayerSize(this.width, this.height);
- this.setControlsSize();
- },
- play: function() {
- this.media.play();
- },
- pause: function() {
- this.media.pause();
- },
- load: function() {
- this.media.load();
- },
- setMuted: function(muted) {
- this.media.setMuted(muted);
- },
- setCurrentTime: function(time) {
- this.media.setCurrentTime(time);
- },
- getCurrentTime: function() {
- return this.media.currentTime;
- },
- setVolume: function(volume) {
- this.media.setVolume(volume);
- },
- getVolume: function() {
- return this.media.volume;
- },
- setSrc: function(src) {
- this.media.setSrc(src);
- },
- remove: function() {
- var t = this, featureIndex, feature;
-
- // invoke features cleanup
- for (featureIndex in t.options.features) {
- feature = t.options.features[featureIndex];
- if (t['clean' + feature]) {
- try {
- t['clean' + feature](t);
- } catch (e) {
- // TODO: report control error
- //throw e;
- //console.log('error building ' + feature);
- //console.log(e);
- }
- }
- }
-
- if (t.media.pluginType === 'native') {
- t.$media.prop('controls', true);
- } else {
- t.media.remove();
- }
-
- // grab video and put it back in place
- if (!t.isDynamic) {
- if (t.media.pluginType === 'native') {
- // detach events from the video
- // TODO: detach event listeners better than this;
- // also detach ONLY the events attached by this plugin!
- //t.$node.clone().insertBefore(t.container);
- //t.$node.remove();
- }
- /*else*/ t.$node.insertBefore(t.container)
- }
-
- // Remove the player from the mejs.players object so that pauseOtherPlayers doesn't blow up when trying to pause a non existance flash api.
- delete mejs.players[t.id];
-
- t.container.remove();
- t.globalUnbind();
- delete t.node.player;
- }
- };
-
- (function(){
- var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;
-
- function splitEvents(events, id) {
- // add player ID as an event namespace so it's easier to unbind them all later
- var ret = {d: [], w: []};
- $.each((events || '').split(' '), function(k, v){
- ret[rwindow.test(v) ? 'w' : 'd'].push(v + '.' + id);
- });
- ret.d = ret.d.join(' ');
- ret.w = ret.w.join(' ');
- return ret;
- }
-
- mejs.MediaElementPlayer.prototype.globalBind = function(events, data, callback) {
- var t = this;
- events = splitEvents(events, t.id);
- if (events.d) $(document).bind(events.d, data, callback);
- if (events.w) $(window).bind(events.w, data, callback);
- };
-
- mejs.MediaElementPlayer.prototype.globalUnbind = function(events, callback) {
- var t = this;
- events = splitEvents(events, t.id);
- if (events.d) $(document).unbind(events.d, callback);
- if (events.w) $(window).unbind(events.w, callback);
- };
- })();
-
- // turn into jQuery plugin
- if (typeof jQuery != 'undefined') {
- jQuery.fn.mediaelementplayer = function (options) {
- if (options === false) {
- this.each(function () {
- var player = jQuery(this).data('mediaelementplayer');
- if (player) {
- player.remove();
- }
- jQuery(this).removeData('mediaelementplayer');
- });
- }
- else {
- this.each(function () {
- jQuery(this).data('mediaelementplayer', new mejs.MediaElementPlayer(this, options));
- });
- }
- return this;
- };
- }
-
- $(document).ready(function() {
- // auto enable using JSON attribute
- $('.mejs-player').mediaelementplayer();
- });
-
- // push out to window
- window.MediaElementPlayer = mejs.MediaElementPlayer;
-
-})(mejs.$);
diff --git a/files_videoviewer/mediaelement/src/silverlight/App.xaml b/files_videoviewer/mediaelement/src/silverlight/App.xaml
deleted file mode 100755
index 47cf6fb13..000000000
--- a/files_videoviewer/mediaelement/src/silverlight/App.xaml
+++ /dev/null
@@ -1,8 +0,0 @@
-<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- x:Class="SilverlightMediaElement.App"
- >
- <Application.Resources>
-
- </Application.Resources>
-</Application>
diff --git a/files_videoviewer/mediaelement/src/silverlight/App.xaml.cs b/files_videoviewer/mediaelement/src/silverlight/App.xaml.cs
deleted file mode 100755
index be67bfbf7..000000000
--- a/files_videoviewer/mediaelement/src/silverlight/App.xaml.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-
-namespace SilverlightMediaElement
-{
- public partial class App : Application
- {
-
- public App()
- {
- this.Startup += this.Application_Startup;
- this.Exit += this.Application_Exit;
- this.UnhandledException += this.Application_UnhandledException;
-
- InitializeComponent();
- }
-
- private void Application_Startup(object sender, StartupEventArgs e)
- {
- this.RootVisual = new MainPage(e.InitParams);
- }
-
- private void Application_Exit(object sender, EventArgs e)
- {
-
- }
-
- private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
- {
- // If the app is running outside of the debugger then report the exception using
- // the browser's exception mechanism. On IE this will display it a yellow alert
- // icon in the status bar and Firefox will display a script error.
- if (!System.Diagnostics.Debugger.IsAttached)
- {
-
- // NOTE: This will allow the application to continue running after an exception has been thrown
- // but not handled.
- // For production applications this error handling should be replaced with something that will
- // report the error to the website and stop the application.
- e.Handled = true;
- Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
- }
- }
-
- private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
- {
- try
- {
- string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
- errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
-
- System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
- }
- catch (Exception)
- {
- }
- }
- }
-}
diff --git a/files_videoviewer/mediaelement/src/silverlight/MainPage.xaml b/files_videoviewer/mediaelement/src/silverlight/MainPage.xaml
deleted file mode 100755
index 54af028fe..000000000
--- a/files_videoviewer/mediaelement/src/silverlight/MainPage.xaml
+++ /dev/null
@@ -1,276 +0,0 @@
-
-<UserControl
- x:Class="SilverlightMediaElement.MainPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
- mc:Ignorable="d"
- Width="640" Height="360">
- <UserControl.Resources>
- <Style x:Key="roundThumbStyle" TargetType="Thumb">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Thumb">
- <Ellipse Stroke="#FFFFFFFF" StrokeThickness="2" Fill="#FF484848"/>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="SliderStyle" TargetType="Slider">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Slider">
- <Grid x:Name="Root" Background="Transparent">
- <Grid.Resources>
- <ControlTemplate x:Key="RightRepeatButtonTemplate">
- <Rectangle Height="8" Margin="-5,0,0,0" Grid.Column="0" Grid.ColumnSpan="3"
- StrokeThickness="0.5" RadiusY="1" RadiusX="1" Fill="#FF484848"/>
- </ControlTemplate>
- <ControlTemplate x:Key="LeftRepeatButtonTemplate">
- <Rectangle Height="8" Margin="0,0,-5,0" Grid.Column="0" Grid.ColumnSpan="3"
- StrokeThickness="0.5" RadiusY="1" RadiusX="1" Fill="#FFAFAFAF"/>
- </ControlTemplate>
- </Grid.Resources>
- <Grid x:Name="HorizontalTemplate">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
-
- <RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" Grid.Column="0"
- IsTabStop="False" Template="{StaticResource LeftRepeatButtonTemplate}"/>
- <Rectangle x:Name="LeftTrack" Grid.Row="1" Fill="#00FFFFFF" Cursor="Hand" MouseLeftButtonDown="LeftTrack_MouseLeftButtonDown"/>
- <Thumb Background="#00FFFFFF" Height="10" x:Name="HorizontalThumb" Width="10"
- Grid.Column="1" Style="{StaticResource roundThumbStyle}" HorizontalAlignment="Left"
- DragStarted="HorizontalThumb_DragStarted" DragCompleted="HorizontalThumb_DragCompleted"
- Canvas.ZIndex="1"/>
- <RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" Grid.Column="2"
- IsTabStop="False" Template="{StaticResource RightRepeatButtonTemplate}"/>
- <Rectangle x:Name="RightTrack" Grid.Column="2" Grid.Row="1" Fill="#00FFFFFF" Cursor="Hand" MouseLeftButtonDown="LeftTrack_MouseLeftButtonDown"/>
- </Grid>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <ControlTemplate x:Key="PlayButtonTemplate" TargetType="ToggleButton">
- <Grid x:Name="grid" Background="Transparent">
- <vsm:VisualStateManager.VisualStateGroups>
- <vsm:VisualStateGroup x:Name="FocusStates">
- <vsm:VisualState x:Name="Focused">
- <Storyboard>
- </Storyboard>
- </vsm:VisualState>
- <vsm:VisualState x:Name="Unfocused">
- <Storyboard/>
- </vsm:VisualState>
- </vsm:VisualStateGroup>
- <vsm:VisualStateGroup x:Name="CommonStates">
- <vsm:VisualState x:Name="Normal">
- <Storyboard/>
- </vsm:VisualState>
- <vsm:VisualState x:Name="MouseOver">
- <Storyboard>
- </Storyboard>
- </vsm:VisualState>
- <vsm:VisualState x:Name="Pressed">
- <Storyboard/>
- </vsm:VisualState>
- </vsm:VisualStateGroup>
- <vsm:VisualStateGroup x:Name="CheckStates">
- <vsm:VisualState x:Name="Checked">
- <Storyboard>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000"
- Storyboard.TargetName="playSymbol"
- Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000"
- Storyboard.TargetName="pauseSymbol"
- Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </vsm:VisualState>
- <vsm:VisualState x:Name="Unchecked">
- <Storyboard>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="pauseSymbol" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </vsm:VisualState>
- </vsm:VisualStateGroup>
- </vsm:VisualStateManager.VisualStateGroups>
- <Grid Margin="11,3,0,0" HorizontalAlignment="Left" VerticalAlignment="Center"
- Opacity="1" x:Name="playSymbol" Width="21" Height="22">
- <Path Width="14" Height="15" Stretch="Fill" Fill="#FF7F7F7F"
- Data="F1 M 15.1997,22.542L 29.7776,14.89L 15.2707,6.99886L 15.1997,22.542 Z "/>
- </Grid>
- <Grid Margin="11,2,0,0" Opacity="0" x:Name="pauseSymbol" Width="31" Height="15">
- <Rectangle Stretch="Fill" Fill="#FF7F7F7F" HorizontalAlignment="Left"
- Margin="0,0,0,0" Width="6"/>
- <Rectangle Stretch="Fill" Fill="#FF7F7F7F" HorizontalAlignment="Stretch"
- Margin="6,0,13,0" Width="6"/>
- </Grid>
- </Grid>
- </ControlTemplate>
-
- <ControlTemplate x:Key="MuteButtonTemplate" TargetType="ToggleButton">
- <Grid Background="Transparent" Cursor="Hand">
- <vsm:VisualStateManager.VisualStateGroups>
- <vsm:VisualStateGroup x:Name="FocusStates">
- <vsm:VisualState x:Name="Focused">
- <Storyboard>
- </Storyboard>
- </vsm:VisualState>
- <vsm:VisualState x:Name="Unfocused">
- <Storyboard/>
- </vsm:VisualState>
- </vsm:VisualStateGroup>
- <vsm:VisualStateGroup x:Name="CommonStates">
- <vsm:VisualState x:Name="Normal">
- <Storyboard/>
- </vsm:VisualState>
- <vsm:VisualState x:Name="MouseOver">
- <Storyboard>
- </Storyboard>
- </vsm:VisualState>
- <vsm:VisualState x:Name="Pressed">
- <Storyboard/>
- </vsm:VisualState>
- </vsm:VisualStateGroup>
- <vsm:VisualStateGroup x:Name="CheckStates">
- <vsm:VisualState x:Name="Checked">
- <Storyboard>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000"
- Storyboard.TargetName="volumeSymbol"
- Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </vsm:VisualState>
- <vsm:VisualState x:Name="Unchecked">
- <Storyboard>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000"
- Storyboard.TargetName="volumeSymbol"
- Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </vsm:VisualState>
- </vsm:VisualStateGroup>
- </vsm:VisualStateManager.VisualStateGroups>
- <Grid HorizontalAlignment="Left" VerticalAlignment="Top"
- Width="17">
- <Path HorizontalAlignment="Left" Stretch="Fill"
- Fill="#FF7F7F7F" Data="F1 M 23.1457,26.5056L 23.1457,33.8944L 25.7913,33.8944L 28.8235,37.4722L 30.5346,37.4722L 30.5665,23.0833L 28.8995,23.0833L 25.8679,26.5056L 23.1457,26.5056 Z "
- Width="7.421" Height="14.389" UseLayoutRounding="False"
- Margin="0,6.5,0,6.5"/>
-
- <Grid HorizontalAlignment="Right" Width="7.003" x:Name="volumeSymbol" Margin="0,10">
- <Path HorizontalAlignment="Right" VerticalAlignment="Stretch"
- Width="2.398"
- Data="M0.5,0.5 C0.5,0.5 2.5939558,2.7128265 2.5946648,7.0504856 C2.5953746,11.391507 0.50033337,13.889001 0.50033337,13.889001"
- Stretch="Fill" Stroke="#FF7F7F7F" Margin="0,0,-0.398,0" UseLayoutRounding="False"/>
- <Path HorizontalAlignment="Stretch" Margin="2.4,2.384,2.317,1.584" VerticalAlignment="Stretch"
- Data="M0.5,0.50000006 C0.5,0.50000006 1.4786903,2.1275051 1.4781417,4.9569001 C1.4776551,7.4670725 0.35717732,9.892808 0.35717732,9.892808" Stretch="Fill" Stroke="#FF7F7F7F" UseLayoutRounding="False"/>
- <Path HorizontalAlignment="Left" Margin="0,4.36,0,3.46" VerticalAlignment="Stretch" Width="1.542"
- Data="M0.5,0.5 C0.5,0.5 1.0412779,1.4903735 1.042276,3.1459465 C1.0429831,4.3189368 0.66544437,6.0685911 0.66544437,6.0685911" Stretch="Fill" Stroke="#FF7F7F7F" d:LayoutOverrides="Width"/>
- </Grid>
- </Grid>
- </Grid>
- </ControlTemplate>
-
- <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
- <Grid Background="Transparent">
- <ContentPresenter Width="Auto"/>
- </Grid>
- </ControlTemplate>
- </UserControl.Resources>
-
- <Grid x:Name="LayoutRoot" Background="Black" Width="640" Height="360">
-
- <MediaElement Grid.Row="0" Grid.Column="0" Width="640" Height="360"
- CacheMode="BitmapCache" AutoPlay="false" Name="media">
-
- </MediaElement>
- <Button x:Name="bigPlayButton" Template="{StaticResource ButtonTemplate}"
- Click="BigPlayButton_Click" Grid.Row="0" Visibility="Collapsed">
- <Canvas Width="100" Height="100">
- <Path Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" Stretch="Fill"
- Fill="#77000000" Data="F1 M 15,0L 85,0C 93.2843,0 100,6.71573 100,15L 100,85C 100,93.2843 93.2843,100 85,100L 15,100C 6.71573,100 0,93.2843 0,85L 0,15C 0,6.71573 6.71573,0 15,0 Z "/>
- <Path Width="40.8182" Height="47.1328" Canvas.Left="34.6439"
- Canvas.Top="27.6003" Stretch="Fill" Fill="#FFFFFFFF"
- Data="F1 M 75.4621,51.1667L 34.6439,27.6003L 34.6439,74.7331L 75.4621,51.1667 Z "/>
- </Canvas>
- </Button>
- <TextBox Margin="25,25,0,0" Name="textBox1" VerticalScrollBarVisibility="Auto" Height="146" VerticalAlignment="Top" HorizontalAlignment="Left" Width="235" />
- <Button Content="" Height="36" HorizontalAlignment="Right" x:Name="FullscreenButton" VerticalAlignment="Bottom" Width="31" Click="FullscreenButton_Click" Opacity="0" Background="#00000000" Cursor="Hand" />
-
- <Grid x:Name="transportControls" VerticalAlignment="Bottom" Height="40" Background="#FF000000"
- Grid.Row="1" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="0" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" MinWidth="10" />
- <ColumnDefinition Width="Auto" MinWidth="10" />
- </Grid.ColumnDefinitions>
-
- <!-- play symbol showing is checked = false, Pause symbol showing is checked = true-->
- <ToggleButton x:Name="playPauseButton" Template="{StaticResource PlayButtonTemplate}"
- Click="PlayPauseButton_Click" IsChecked="false" Cursor="Hand"/>
-
- <Grid x:Name="time" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="40" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="10" />
- <ColumnDefinition Width="40" />
- </Grid.ColumnDefinitions>
-
- <TextBlock x:Name="currentTimeTextBlock" Margin="0,1.5,10,0" Height="12"
- FontFamily="Verdana" FontSize="10" Text="00:00" TextWrapping="Wrap"
- Foreground="#FFFFFFFF" FontStyle="Normal" HorizontalAlignment="Right"
- TextAlignment="Right" Grid.Column="0"/>
-
- <Slider x:Name="timelineSlider" Margin="0,2,0,-1"
- Maximum="1" Style="{StaticResource SliderStyle}" Grid.Column="1"
- ValueChanged="TimelineSlider_ValueChanged"
- Value="0"/>
-
- <TextBlock Margin="0,1.5,0,0" Height="12" FontFamily="Verdana" FontSize="10"
- Text="" TextWrapping="Wrap" Foreground="#FFFFFFFF"
- FontStyle="Normal" HorizontalAlignment="Center" TextAlignment="Right"
- Grid.Column="2"/>
- <TextBlock x:Name="totalTimeTextBlock" Margin="0,1.5,0,0" Height="12"
- FontFamily="Verdana" FontSize="10" Text="00:00" TextWrapping="Wrap"
- Foreground="#FFFFFFFF" FontStyle="Normal" HorizontalAlignment="Left"
- TextAlignment="Right" Grid.Column="3"/>
- </Grid>
-
- <ToggleButton IsChecked="false" Grid.Column="3" x:Name="muteButton"
- Template="{StaticResource MuteButtonTemplate}" Click="MuteButton_Click"
- VerticalAlignment="Center" Margin="0,0,6,0" Cursor="Hand"/>
-
- <Slider Grid.Column="4" HorizontalAlignment="Stretch" Margin="3,0,0,0"
- VerticalAlignment="Center" Maximum="1" x:Name="volumeSlider"
- Background="#FF777777" Style="{StaticResource SliderStyle}" Width="50"
- Value="{Binding ElementName=media, Mode=TwoWay, Path=Volume, UpdateSourceTrigger=Default}"/>
-
- <Button x:Name="fullScreenButton" Grid.Column="5" Margin="8,10,4,10" Click="FullScreenButton_Click"
- Template="{StaticResource ButtonTemplate}" VerticalAlignment="Center" Cursor="Hand">
- <Path Height="14.375" HorizontalAlignment="Stretch"
- VerticalAlignment="Bottom" RenderTransformOrigin="0.212389379739761,0.208695650100708"
- Data="M10.181361,8.375 L12.844413,11.008244 L14.125,9.7418737 L14.125,14.375 L9.675765,14.374833 L10.906104,13.158273 L8.125,10.408315 L10.181361,8.375 z M3.9666855,8.375 L6,10.431361 L3.3667567,13.094413 L4.6331258,14.375 L0,14.375 L0.00016707927,9.925765 L1.2167276,11.156104 L3.9666855,8.375 z M9.4918737,0 L14.125,0 L14.124833,4.449235 L12.908273,3.2188957 L10.158315,6 L8.125,3.943639 L10.758244,1.2805867 L9.4918737,0 z M0,0 L4.449235,0.00016686507 L3.2188957,1.2167276 L6,3.9666855 L3.943639,6 L1.280587,3.3667567 L0,4.6331258 L0,0 z"
- Fill="#FF7F7F7F" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0" />
- </Button>
- </Grid>
- </Grid>
-</UserControl> \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/silverlight/MainPage.xaml.cs b/files_videoviewer/mediaelement/src/silverlight/MainPage.xaml.cs
deleted file mode 100755
index 5f5da703f..000000000
--- a/files_videoviewer/mediaelement/src/silverlight/MainPage.xaml.cs
+++ /dev/null
@@ -1,636 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-using System.Windows.Browser;
-using System.Globalization;
-
-
-namespace SilverlightMediaElement
-{
- [ScriptableType]
- public partial class MainPage : UserControl
- {
- System.Windows.Threading.DispatcherTimer _timer;
-
- // work arounds for src, load(), play() compatibility
- bool _isLoading = false;
- bool _isAttemptingToPlay = false;
-
- // variables
- string _mediaUrl;
- string _preload;
- string _htmlid;
- bool _autoplay = false;
- bool _debug = false;
- int _width = 0;
- int _height = 0;
- int _timerRate = 0;
- double _bufferedBytes = 0;
- double _bufferedTime = 0;
- double _volume = 1;
- int _videoWidth = 0;
- int _videoHeight = 0;
-
- // state
- bool _isPaused = true;
- bool _isEnded = false;
-
- // dummy
- bool _firedCanPlay = false;
-
- // mediaElement.Position updates TimelineSlider.Value, and
- // updating TimelineSlider.Value updates mediaElement.Position,
- // this variable helps us break the infinite loop
- private bool duringTickEvent = false;
-
- private bool playVideoWhenSliderDragIsOver = false;
-
- public MainPage(IDictionary<string, string> initParams)
- {
- InitializeComponent();
-
- HtmlPage.RegisterScriptableObject("MediaElementJS", this);
-
-
- // add events
- media.BufferingProgressChanged += new RoutedEventHandler(media_BufferingProgressChanged);
- media.DownloadProgressChanged += new RoutedEventHandler(media_DownloadProgressChanged);
- media.CurrentStateChanged += new RoutedEventHandler(media_CurrentStateChanged);
- media.MediaEnded += new RoutedEventHandler(media_MediaEnded);
- media.MediaFailed += new EventHandler<ExceptionRoutedEventArgs>(media_MediaFailed);
- media.MediaOpened += new RoutedEventHandler(media_MediaOpened);
- media.MouseLeftButtonDown += new MouseButtonEventHandler(media_MouseLeftButtonDown);
- CompositionTarget.Rendering += new EventHandler(CompositionTarget_Rendering);
- transportControls.Visibility = System.Windows.Visibility.Collapsed;
-
- // get parameters
- if (initParams.ContainsKey("id"))
- _htmlid = initParams["id"];
- if (initParams.ContainsKey("file"))
- _mediaUrl = initParams["file"];
- if (initParams.ContainsKey("autoplay") && initParams["autoplay"] == "true")
- _autoplay = true;
- if (initParams.ContainsKey("debug") && initParams["debug"] == "true")
- _debug = true;
- if (initParams.ContainsKey("preload"))
- _preload = initParams["preload"].ToLower();
- else
- _preload = "";
-
- if (!(new string[] { "none", "metadata", "auto" }).Contains(_preload)){
- _preload = "none";
- }
-
- if (initParams.ContainsKey("width"))
- Int32.TryParse(initParams["width"], out _width);
- if (initParams.ContainsKey("height"))
- Int32.TryParse(initParams["height"], out _height);
- if (initParams.ContainsKey("timerate"))
- Int32.TryParse(initParams["timerrate"], out _timerRate);
- if (initParams.ContainsKey("startvolume"))
- Double.TryParse(initParams["startvolume"], out _volume);
-
- if (_timerRate == 0)
- _timerRate = 250;
-
- // timer
- _timer = new System.Windows.Threading.DispatcherTimer();
- _timer.Interval = new TimeSpan(0, 0, 0, 0, _timerRate); // 200 Milliseconds
- _timer.Tick += new EventHandler(timer_Tick);
- _timer.Stop();
-
- //_mediaUrl = "http://local.mediaelement.com/media/jsaddington.mp4";
- //_autoplay = true;
-
- // set stage and media sizes
- if (_width > 0)
- LayoutRoot.Width = media.Width = this.Width = _width;
- if (_height > 0)
- LayoutRoot.Height = media.Height = this.Height = _height;
-
- // debug
- textBox1.Visibility = (_debug) ? System.Windows.Visibility.Visible : System.Windows.Visibility.Collapsed;
- textBox1.IsEnabled = false;
- textBox1.Text = "id: " + _htmlid + "\n" +
- "file: " + _mediaUrl + "\n";
-
-
- media.AutoPlay = _autoplay;
- media.Volume = _volume;
- if (!String.IsNullOrEmpty(_mediaUrl)) {
- setSrc(_mediaUrl);
- if (_autoplay || _preload != "none")
- loadMedia();
- }
-
- media.MouseLeftButtonUp += new MouseButtonEventHandler(media_MouseLeftButtonUp);
-
- // full screen settings
- Application.Current.Host.Content.FullScreenChanged += new EventHandler(DisplaySizeInformation);
- Application.Current.Host.Content.Resized += new EventHandler(DisplaySizeInformation);
- //FullscreenButton.Visibility = System.Windows.Visibility.Collapsed;
-
- // send out init call
- //HtmlPage.Window.Invoke("html5_MediaPluginBridge_initPlugin", new object[] {_htmlid});
- try
- {
- HtmlPage.Window.Eval("mejs.MediaPluginBridge.initPlugin('" + _htmlid + "');");
- }
- catch { }
- }
-
- void media_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- switch (media.CurrentState)
- {
- case MediaElementState.Playing:
- pauseMedia();
- break;
-
- case MediaElementState.Paused:
- playMedia();
- break;
- case MediaElementState.Stopped:
-
- break;
- case MediaElementState.Buffering:
- pauseMedia();
- break;
- }
- }
-
- void media_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) {
- SendEvent("click");
- }
-
- void media_MediaOpened(object sender, RoutedEventArgs e) {
-
- _videoWidth = Convert.ToInt32(media.NaturalVideoWidth);
- _videoHeight = Convert.ToInt32(media.NaturalVideoHeight);
-
- TimeSpan duration = media.NaturalDuration.TimeSpan;
- totalTimeTextBlock.Text = TimeSpanToString(duration);
- UpdateVideoSize();
-
- playPauseButton.IsChecked = true;
-
- SendEvent("loadedmetadata");
- }
-
- void timer_Tick(object sender, EventArgs e) {
- SendEvent("timeupdate");
- }
-
- void StartTimer() {
- _timer.Start();
- }
-
- void StopTimer() {
- _timer.Stop();
- }
-
- void WriteDebug(string text) {
- textBox1.Text += text + "\n";
- }
-
- void media_MediaFailed(object sender, ExceptionRoutedEventArgs e) {
- SendEvent(e.ToString());
- }
-
- void media_MediaEnded(object sender, RoutedEventArgs e) {
- _isEnded = true;
- _isPaused = false;
- SendEvent("ended");
- StopTimer();
- }
-
- void media_CurrentStateChanged(object sender, RoutedEventArgs e) {
-
- WriteDebug("state:" + media.CurrentState.ToString());
-
- switch (media.CurrentState)
- {
- case MediaElementState.Opening:
- SendEvent("loadstart");
- break;
- case MediaElementState.Playing:
- _isEnded = false;
- _isPaused = false;
- _isAttemptingToPlay = false;
- StartTimer();
-
-
- SendEvent("play");
- SendEvent("playing");
- break;
-
- case MediaElementState.Paused:
- _isEnded = false;
- _isPaused = true;
-
- // special settings to allow play() to work
- _isLoading = false;
- WriteDebug("paused event, " + _isAttemptingToPlay);
- if (_isAttemptingToPlay) {
- this.playMedia();
- }
-
- StopTimer();
- SendEvent("paused");
- break;
- case MediaElementState.Stopped:
- _isEnded = false;
- _isPaused = true;
- StopTimer();
- SendEvent("paused");
- break;
- case MediaElementState.Buffering:
- SendEvent("progress");
- break;
- }
-
- }
-
- void media_BufferingProgressChanged(object sender, RoutedEventArgs e) {
- _bufferedTime = media.DownloadProgress * media.NaturalDuration.TimeSpan.TotalSeconds;
- _bufferedBytes = media.BufferingProgress;
-
-
- SendEvent("progress");
- }
-
- void media_DownloadProgressChanged(object sender, RoutedEventArgs e) {
- _bufferedTime = media.DownloadProgress * media.NaturalDuration.TimeSpan.TotalSeconds;
- _bufferedBytes = media.BufferingProgress;
-
- if (!_firedCanPlay) {
- SendEvent("loadeddata");
- SendEvent("canplay");
- _firedCanPlay = true;
- }
-
- SendEvent("progress");
- }
-
-
- void SendEvent(string name) {
- /*
- * INVOKE
- HtmlPage.Window.Invoke("html5_MediaPluginBridge_fireEvent",
- _htmlid,
- name,
- @"'{" +
- @"""name"": """ + name + @"""" +
- @", ""currentTime"":" + (media.Position.TotalSeconds).ToString() + @"" +
- @", ""duration"":" + (media.NaturalDuration.TimeSpan.TotalSeconds).ToString() + @"" +
- @", ""paused"":" + (_isEnded).ToString().ToLower() + @"" +
- @", ""muted"":" + (media.IsMuted).ToString().ToLower() + @"" +
- @", ""ended"":" + (_isPaused).ToString().ToLower() + @"" +
- @", ""volume"":" + (media.Volume).ToString() + @"" +
- @", ""bufferedBytes"":" + (_bufferedBytes).ToString() + @"" +
- @", ""bufferedTime"":" + (_bufferedTime).ToString() + @"" +
- @"}'");
- */
-
- /*
- * EVAL
- HtmlPage.Window.Eval("mejs.MediaPluginBridge.fireEvent('" + _htmlid + "','" + name + "'," +
- @"{" +
- @"""name"": """ + name + @"""" +
- @", ""currentTime"":" + (media.Position.TotalSeconds).ToString() + @"" +
- @", ""duration"":" + (media.NaturalDuration.TimeSpan.TotalSeconds).ToString() + @"" +
- @", ""paused"":" + (_isEnded).ToString().ToLower() + @"" +
- @", ""muted"":" + (media.IsMuted).ToString().ToLower() + @"" +
- @", ""ended"":" + (_isPaused).ToString().ToLower() + @"" +
- @", ""volume"":" + (media.Volume).ToString() + @"" +
- @", ""bufferedBytes"":" + (_bufferedBytes).ToString() + @"" +
- @", ""bufferedTime"":" + (_bufferedTime).ToString() + @"" +
- @"});");
- * */
-
- // setTimeout
- try {
- CultureInfo invCulture = CultureInfo.InvariantCulture;
-
- HtmlPage.Window.Invoke("setTimeout", "mejs.MediaPluginBridge.fireEvent('" + _htmlid + "','" + name + "'," +
- @"{" +
- @"""name"": """ + name + @"""" +
- @", ""currentTime"":" + (media.Position.TotalSeconds).ToString(invCulture) + @"" +
- @", ""duration"":" + (media.NaturalDuration.TimeSpan.TotalSeconds).ToString(invCulture) + @"" +
- @", ""paused"":" + (_isPaused).ToString().ToLower() + @"" +
- @", ""muted"":" + (media.IsMuted).ToString().ToLower() + @"" +
- @", ""ended"":" + (_isEnded).ToString().ToLower() + @"" +
- @", ""volume"":" + (media.Volume).ToString(invCulture) + @"" +
- @", ""bufferedBytes"":" + (_bufferedBytes).ToString(invCulture) + @"" +
- @", ""bufferedTime"":" + (_bufferedTime).ToString(invCulture) + @"" +
- @", ""videoWidth"":" + (_videoWidth).ToString() + @"" +
- @", ""videoHeight"":" + (_videoHeight).ToString() + @"" +
- @"});", 0);
- } catch { }
-
- }
-
- /* HTML5 wrapper methods */
- [ScriptableMember]
- public void playMedia() {
- WriteDebug("method:play " + media.CurrentState);
-
- // sometimes people forget to call load() first
- if (_mediaUrl != "" && media.Source == null) {
- _isAttemptingToPlay = true;
- loadMedia();
- }
-
- // store and trigger with the state change above
- if (media.CurrentState == MediaElementState.Closed && _isLoading) {
- WriteDebug("storing _isAttemptingToPlay ");
- _isAttemptingToPlay = true;
- }
-
- media.Play();
- _isEnded = false;
- _isPaused = false;
-
- playPauseButton.IsChecked = true;
-
- //StartTimer();
- }
-
- [ScriptableMember]
- public void pauseMedia() {
- WriteDebug("method:pause " + media.CurrentState);
-
- _isEnded = false;
- _isPaused = true;
-
- media.Pause();
- StopTimer();
- playPauseButton.IsChecked = false;
- }
-
- [ScriptableMember]
- public void loadMedia() {
- _isLoading = true;
- _firedCanPlay = false;
-
- WriteDebug("method:load " + media.CurrentState);
- WriteDebug(" - " + _mediaUrl.ToString());
-
- media.Source = new Uri(_mediaUrl, UriKind.Absolute);
- //media.Play();
- //media.Stop();
- }
-
- [ScriptableMember]
- public void stopMedia() {
- WriteDebug("method:stop " + media.CurrentState);
-
- _isEnded = true;
- _isPaused = false;
-
- media.Stop();
- StopTimer();
- playPauseButton.IsChecked = false;
- }
-
- [ScriptableMember]
- public void setVolume(Double volume) {
- WriteDebug("method:setvolume: " + volume.ToString());
-
- media.Volume = volume;
-
- SendEvent("volumechange");
- }
-
- [ScriptableMember]
- public void setMuted(bool isMuted) {
- WriteDebug("method:setmuted: " + isMuted.ToString());
-
- media.IsMuted = isMuted;
- muteButton.IsChecked = isMuted;
- SendEvent("volumechange");
-
- }
-
- [ScriptableMember]
- public void setCurrentTime(Double position) {
- WriteDebug("method:setCurrentTime: " + position.ToString());
-
- int milliseconds = Convert.ToInt32(position * 1000);
-
- SendEvent("seeking");
- media.Position = new TimeSpan(0, 0, 0, 0, milliseconds);
- SendEvent("seeked");
- }
-
- [ScriptableMember]
- public void setSrc(string url) {
- _mediaUrl = url;
- }
-
- [ScriptableMember]
- public void setFullscreen(bool goFullscreen) {
-
- FullscreenButton.Visibility = System.Windows.Visibility.Visible;
- }
-
- [ScriptableMember]
- public void setVideoSize(int width, int height) {
- this.Width = media.Width = width;
- this.Height = media.Height = height;
- }
-
- [ScriptableMember]
- public void positionFullscreenButton(int x, int y,bool visibleAndAbove) {
- if (visibleAndAbove)
- {
- //FullscreenButton.Visibility = System.Windows.Visibility.Collapsed;
- }
- else
- {
- //FullscreenButton.Visibility = System.Windows.Visibility.Visible;
- }
- }
-
- private void FullscreenButton_Click(object sender, RoutedEventArgs e) {
- Application.Current.Host.Content.IsFullScreen = true;
- //FullscreenButton.Visibility = System.Windows.Visibility.Collapsed;
- }
-
- private void DisplaySizeInformation(Object sender, EventArgs e) {
- this.Width = LayoutRoot.Width = media.Width = Application.Current.Host.Content.ActualWidth;
- this.Height = LayoutRoot.Height = media.Height = Application.Current.Host.Content.ActualHeight;
-
- UpdateVideoSize();
- }
-
-
-
-
- #region play button
-
- private void BigPlayButton_Click(object sender, RoutedEventArgs e)
- {
- playPauseButton.IsChecked = true;
- PlayPauseButton_Click(sender, e);
- }
-
- private void PlayPauseButton_Click(object sender, RoutedEventArgs e)
- {
- bigPlayButton.Visibility = Visibility.Collapsed;
-
- // this will be the toggle button state after the click has been processed
- if (playPauseButton.IsChecked == true)
- playMedia();
- else
- pauseMedia();
- }
-
-
-
- #endregion
-
- #region timelineSlider
-
- private void Seek(double percentComplete)
- {
- if (duringTickEvent)
- throw new Exception("Can't call Seek() now, you'll get an infinite loop");
-
- TimeSpan duration = media.NaturalDuration.TimeSpan;
- int newPosition = (int)(duration.TotalSeconds * percentComplete);
- media.Position = new TimeSpan(0, 0, newPosition);
-
- // let the next CompositionTarget.Rendering take care of updating the text blocks
- }
-
- private Slider GetSliderParent(object sender)
- {
- FrameworkElement element = (FrameworkElement)sender;
- do
- {
- element = (FrameworkElement)VisualTreeHelper.GetParent(element);
- } while (!(element is Slider));
- return (Slider)element;
- }
-
- private void LeftTrack_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- e.Handled = true;
- FrameworkElement lefttrack = (sender as FrameworkElement).FindName("LeftTrack") as FrameworkElement;
- FrameworkElement righttrack = (sender as FrameworkElement).FindName("RightTrack") as FrameworkElement;
- double position = e.GetPosition(lefttrack).X;
- double width = righttrack.TransformToVisual(lefttrack).Transform(new Point(righttrack.ActualWidth, righttrack.ActualHeight)).X;
- double percent = position / width;
- Slider slider = GetSliderParent(sender);
- slider.Value = percent;
- }
-
- private void HorizontalThumb_DragStarted(object sender, System.Windows.Controls.Primitives.DragStartedEventArgs e)
- {
- if (GetSliderParent(sender) != timelineSlider) return;
-
- bool notPlaying = (media.CurrentState == MediaElementState.Paused
- || media.CurrentState == MediaElementState.Stopped);
-
- if (notPlaying)
- {
- playVideoWhenSliderDragIsOver = false;
- }
- else
- {
- playVideoWhenSliderDragIsOver = true;
- media.Pause();
- }
- }
-
- private void HorizontalThumb_DragCompleted(object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e)
- {
- if (playVideoWhenSliderDragIsOver)
- media.Play();
- }
-
- private void TimelineSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
- {
- if (duringTickEvent)
- return;
-
- Seek(timelineSlider.Value);
- }
-
- #endregion
-
- #region updating current time
-
- private void CompositionTarget_Rendering(object sender, EventArgs e)
- {
- duringTickEvent = true;
-
- TimeSpan duration = media.NaturalDuration.TimeSpan;
- if (duration.TotalSeconds != 0)
- {
- double percentComplete = (media.Position.TotalSeconds / duration.TotalSeconds);
- timelineSlider.Value = percentComplete;
- string text = TimeSpanToString(media.Position);
- if (this.currentTimeTextBlock.Text != text)
- this.currentTimeTextBlock.Text = text;
- }
-
- duringTickEvent = false;
- }
-
- private static string TimeSpanToString(TimeSpan time)
- {
- return string.Format("{0:00}:{1:00}", (time.Hours * 60) + time.Minutes, time.Seconds);
- }
- #endregion
-
- private void MuteButton_Click(object sender, RoutedEventArgs e)
- {
- //media.IsMuted = (bool)muteButton.IsChecked;
- setMuted((bool)muteButton.IsChecked);
- }
-
- #region fullscreen mode
-
- private void FullScreenButton_Click(object sender, RoutedEventArgs e)
- {
- var content = Application.Current.Host.Content;
- content.IsFullScreen = !content.IsFullScreen;
- }
-
- private void Content_FullScreenChanged(object sender, EventArgs e)
- {
- UpdateVideoSize();
- }
-
- private void UpdateVideoSize()
- {
- if (App.Current.Host.Content.IsFullScreen)
- {
- transportControls.Visibility = System.Windows.Visibility.Visible;
- // mediaElement takes all available space
- //VideoRow.Height = new GridLength(1, GridUnitType.Star);
- //VideoColumn.Width = new GridLength(1, GridUnitType.Star);
- }
- else
- {
- transportControls.Visibility = System.Windows.Visibility.Collapsed;
- // mediaElement is only as big as the source video
- //VideoRow.Height = new GridLength(1, GridUnitType.Auto);
- //VideoColumn.Width = new GridLength(1, GridUnitType.Auto);
- }
- }
-
- #endregion
- }
-}
-
diff --git a/files_videoviewer/mediaelement/src/silverlight/Properties/AppManifest.xml b/files_videoviewer/mediaelement/src/silverlight/Properties/AppManifest.xml
deleted file mode 100755
index 6712a1178..000000000
--- a/files_videoviewer/mediaelement/src/silverlight/Properties/AppManifest.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
->
- <Deployment.Parts>
- </Deployment.Parts>
-</Deployment>
diff --git a/files_videoviewer/mediaelement/src/silverlight/Properties/AssemblyInfo.cs b/files_videoviewer/mediaelement/src/silverlight/Properties/AssemblyInfo.cs
deleted file mode 100755
index 8d8bbce31..000000000
--- a/files_videoviewer/mediaelement/src/silverlight/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("SilverlightMediaElement")]
-[assembly: AssemblyDescription("Silverlight player for http://mediaelementjs.com/")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("John Dyer")]
-[assembly: AssemblyProduct("SilverlightMediaElement")]
-[assembly: AssemblyCopyright("Copyright 2010 John Dyer")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("29fe7094-d10f-4359-8abb-1c76971133a4")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/files_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.csproj b/files_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.csproj
deleted file mode 100755
index 565830460..000000000
--- a/files_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.csproj
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{CE832DD6-B659-4F3E-B49B-F297E2AC923A}</ProjectGuid>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>SilverlightMediaElement</RootNamespace>
- <AssemblyName>SilverlightMediaElement</AssemblyName>
- <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
- <SilverlightApplication>true</SilverlightApplication>
- <SupportedCultures>
- </SupportedCultures>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>silverlightmediaelement.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>SilverlightMediaElement.App</SilverlightAppEntry>
- <TestPageFileName>SilverlightMediaElementTestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <ValidateXaml>true</ValidateXaml>
- <EnableOutOfBrowser>false</EnableOutOfBrowser>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <UsePlatformExtensions>false</UsePlatformExtensions>
- <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
- <LinkedServerProject>
- </LinkedServerProject>
- <SignManifests>false</SignManifests>
- <TargetFrameworkProfile />
- </PropertyGroup>
- <!-- This property group is only here to support building this project using the
- MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
- to set the TargetFrameworkVersion to v3.5 -->
- <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\..\build\</OutputPath>
- <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
- <NoStdLib>true</NoStdLib>
- <NoConfig>true</NoConfig>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\..\src\</OutputPath>
- <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
- <NoStdLib>true</NoStdLib>
- <NoConfig>true</NoConfig>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <DocumentationFile>
- </DocumentationFile>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System.Windows" />
- <Reference Include="system" />
- <Reference Include="System.Core" />
- <Reference Include="System.Net" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <Compile Include="MainPage.xaml.cs">
- <DependentUpon>MainPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ApplicationDefinition Include="App.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </ApplicationDefinition>
- <Page Include="MainPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- </ItemGroup>
- <ItemGroup>
- <None Include="Properties\AppManifest.xml" />
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.csproj.user b/files_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.csproj.user
deleted file mode 100755
index 2fe79f9ea..000000000
--- a/files_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.csproj.user
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectView>ShowAllFiles</ProjectView>
- </PropertyGroup>
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties>
- <StartPageUrl>
- </StartPageUrl>
- <StartAction>DynamicPage</StartAction>
- <AspNetDebugging>True</AspNetDebugging>
- <NativeDebugging>False</NativeDebugging>
- <SQLDebugging>False</SQLDebugging>
- <ExternalProgram>
- </ExternalProgram>
- <StartExternalURL>
- </StartExternalURL>
- <StartCmdLineArguments>
- </StartCmdLineArguments>
- <StartWorkingDirectory>
- </StartWorkingDirectory>
- <ShowWebRefOnDebugPrompt>True</ShowWebRefOnDebugPrompt>
- <OutOfBrowserProjectToDebug>
- </OutOfBrowserProjectToDebug>
- <ShowRiaSvcsOnDebugPrompt>True</ShowRiaSvcsOnDebugPrompt>
- </SilverlightProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/files_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.sln b/files_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.sln
deleted file mode 100755
index b3110c843..000000000
--- a/files_videoviewer/mediaelement/src/silverlight/SilverlightMediaElement.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightMediaElement", "SilverlightMediaElement.csproj", "{CE832DD6-B659-4F3E-B49B-F297E2AC923A}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {CE832DD6-B659-4F3E-B49B-F297E2AC923A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CE832DD6-B659-4F3E-B49B-F297E2AC923A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CE832DD6-B659-4F3E-B49B-F297E2AC923A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CE832DD6-B659-4F3E-B49B-F297E2AC923A}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/files_videoviewer/mediaelement/src/yuicompressor-2.4.2.jar b/files_videoviewer/mediaelement/src/yuicompressor-2.4.2.jar
deleted file mode 100755
index c29470bd0..000000000
--- a/files_videoviewer/mediaelement/src/yuicompressor-2.4.2.jar
+++ /dev/null
Binary files differ