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);
- 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 !== '') ?
- '' :
- '' + mejs.i18n.t('Download File') + '';
-
- 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 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];
-
- 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 (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 =
-'';
- break;
-
- case 'flash':
-
- if (mejs.MediaFeatures.isIE) {
- specialIEContainer = document.createElement('div');
- container.appendChild(specialIEContainer);
- specialIEContainer.outerHTML =
-'';
-
- } else {
-
- container.innerHTML =
-'';
- }
- 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 ='';
-
- /*
- container.innerHTML =
- '';
- */
-
- 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 = "http://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 =
- '';
- */
-
- var specialIEContainer,
- youtubeUrl = 'http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid=' + settings.pluginId + '&version=3&autoplay=0&controls=0&modestbranding=1&loop=0';
-
- if (mejs.MediaFeatures.isIE) {
-
- specialIEContainer = document.createElement('div');
- settings.container.appendChild(specialIEContainer);
- specialIEContainer.outerHTML = '';
- } else {
- settings.container.innerHTML =
- '';
- }
-
- },
-
- 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;
-
-/*!
- * 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
- * - $ - zepto || jQuery ..
- * - 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 = {
- '&': '&',
- '"': '"',
- '<': '<',
- '>': '>'
- };
- 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 + )
- *
- * @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] = '' + i18n.methods.checkPlain(args[key]) + '';
- 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;
-}(jQuery, document, mejs));
-/*!
- * This is a i18n.locale language object.
- *
- * 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));
+*/var mejs=mejs||{};mejs.version="2.11.1";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("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='x';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-1&&g==f.length-e.length){d=f.substring(0,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;e0)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],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;a0;)this.removeChild(b[0]);if(typeof a=="string")this.src=a;else{var c;for(b=0;b0&&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")){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;f0)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=
+c!==""?'':''+mejs.i18n.t("Download File")+"";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;m0?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;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='';break;case "flash":if(mejs.MediaFeatures.isIE){a=document.createElement("div");k.appendChild(a);a.outerHTML=''}else k.innerHTML='';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=
+''}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}};
+mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="http://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]=
+a;var b,c="http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML=''}else a.container.innerHTML=''},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,g,f={"&":"&",'"':""","<":"<",">":">"};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.formatString=function(d,e){for(var g in e){switch(g.charAt(0)){case "@":e[g]=c.methods.checkPlain(e[g]);break;case "!":break;default:e[g]=
+''+c.methods.checkPlain(e[g])+""}d=d.replace(g,e[g])}return d};c.methods.t=function(d,e,g){if(c.locale.strings&&c.locale.strings[g.context]&&c.locale.strings[g.context][d])d=c.locale.strings[g.context][d];if(e)d=c.methods.formatString(d,e);return d};c.t=function(d,e,g){if(typeof d==="string"&&d.length>0){var f=c.locale.getLanguage();g=g||{context:f.language};return c.methods.t(d,e,g)}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);
/*!
* MediaElementPlayer
@@ -1823,3088 +74,93 @@ window.MediaElement = mejs.MediaElement;
* Copyright 2010-2012, John Dyer (http://j.hn/)
* License: MIT
*
- */
-if (typeof jQuery != 'undefined') {
- mejs.$ = jQuery;
-} else if (typeof ender != 'undefined') {
- mejs.$ = ender;
-}
-(function ($) {
-
- // default player values
- mejs.MepDefaults = {
- // url to poster (to fix iOS 3.x)
- poster: '',
- // default if the