Version Description
None
Download this release
Release Info
Developer | johndyer |
Plugin | MediaElement.js – HTML5 Video & Audio Player |
Version | 2.9.1 |
Comparing to | |
See all releases |
Code changes from version 2.7.0 to 2.9.1
- mediaelement-js-wp.php +2 -2
- mediaelement/Thumbs.db +0 -0
- mediaelement/flashmediaelement.swf +0 -0
- mediaelement/mediaelement-and-player.js +92 -50
- mediaelement/mediaelement-and-player.min.js +72 -70
- mediaelement/mediaelement.js +49 -10
- mediaelement/mediaelement.min.js +21 -20
- mediaelement/mediaelementplayer.css +33 -4
- mediaelement/mediaelementplayer.js +423 -153
- mediaelement/mediaelementplayer.min.css +1 -1
- mediaelement/mediaelementplayer.min.js +67 -59
- readme.txt +1 -1
mediaelement-js-wp.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package MediaElementJS
|
4 |
-
* @version 2.
|
5 |
*/
|
6 |
|
7 |
/*
|
@@ -9,7 +9,7 @@ Plugin Name: MediaElement.js - HTML5 Audio and Video
|
|
9 |
Plugin URI: http://mediaelementjs.com/
|
10 |
Description: Video and audio plugin for WordPress built on MediaElement.js HTML5 video and audio player library. Embeds media in your post or page using HTML5 with Flash or Silverlight fallback support for non-HTML5 browsers. Video support: MP4, Ogg, WebM, WMV. Audio support: MP3, WMA, WAV
|
11 |
Author: John Dyer
|
12 |
-
Version: 2.
|
13 |
Author URI: http://j.hn/
|
14 |
License: GPLv3, MIT
|
15 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
* @package MediaElementJS
|
4 |
+
* @version 2.9.1
|
5 |
*/
|
6 |
|
7 |
/*
|
9 |
Plugin URI: http://mediaelementjs.com/
|
10 |
Description: Video and audio plugin for WordPress built on MediaElement.js HTML5 video and audio player library. Embeds media in your post or page using HTML5 with Flash or Silverlight fallback support for non-HTML5 browsers. Video support: MP4, Ogg, WebM, WMV. Audio support: MP3, WMA, WAV
|
11 |
Author: John Dyer
|
12 |
+
Version: 2.9.1
|
13 |
Author URI: http://j.hn/
|
14 |
License: GPLv3, MIT
|
15 |
*/
|
mediaelement/Thumbs.db
DELETED
Binary file
|
mediaelement/flashmediaelement.swf
CHANGED
Binary file
|
mediaelement/mediaelement-and-player.js
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
var mejs = mejs || {};
|
16 |
|
17 |
// version number
|
18 |
-
mejs.version = '2.
|
19 |
|
20 |
// player number (for missing, same id attr)
|
21 |
mejs.meIndex = 0;
|
@@ -26,11 +26,11 @@ mejs.plugins = {
|
|
26 |
{version: [3,0], types: ['video/mp4','video/m4v','video/mov','video/wmv','audio/wma','audio/m4a','audio/mp3','audio/wav','audio/mpeg']}
|
27 |
],
|
28 |
flash: [
|
29 |
-
{version: [9,0,124], types: ['video/mp4','video/m4v','video/mov','video/flv','video/x-flv','audio/flv','audio/x-flv','audio/mp3','audio/m4a','audio/mpeg']}
|
30 |
//,{version: [12,0], types: ['video/webm']} // for future reference (hopefully!)
|
31 |
],
|
32 |
youtube: [
|
33 |
-
{version: null, types: ['video/youtube']}
|
34 |
],
|
35 |
vimeo: [
|
36 |
{version: null, types: ['video/vimeo']}
|
@@ -1631,7 +1631,7 @@ if (typeof jQuery != 'undefined') {
|
|
1631 |
}
|
1632 |
|
1633 |
// 5%
|
1634 |
-
var newTime = Math.
|
1635 |
media.setCurrentTime(newTime);
|
1636 |
}
|
1637 |
}
|
@@ -1649,7 +1649,7 @@ if (typeof jQuery != 'undefined') {
|
|
1649 |
}
|
1650 |
|
1651 |
// 5%
|
1652 |
-
var newTime = Math.
|
1653 |
media.setCurrentTime(newTime);
|
1654 |
}
|
1655 |
}
|
@@ -2296,7 +2296,7 @@ if (typeof jQuery != 'undefined') {
|
|
2296 |
rail = t.controls.find('.mejs-time-rail'),
|
2297 |
total = t.controls.find('.mejs-time-total'),
|
2298 |
current = t.controls.find('.mejs-time-current'),
|
2299 |
-
loaded = t.controls.find('.mejs-time-loaded')
|
2300 |
others = rail.siblings();
|
2301 |
|
2302 |
|
@@ -2318,7 +2318,7 @@ if (typeof jQuery != 'undefined') {
|
|
2318 |
});
|
2319 |
|
2320 |
// fit the rail into the remaining space
|
2321 |
-
railWidth = t.controls.width() - usedWidth - (rail.outerWidth(true) - rail.
|
2322 |
}
|
2323 |
|
2324 |
// outer area
|
@@ -2386,8 +2386,7 @@ if (typeof jQuery != 'undefined') {
|
|
2386 |
'<div class="mejs-overlay-error"></div>'+
|
2387 |
'</div>')
|
2388 |
.hide() // start out hidden
|
2389 |
-
.appendTo(layers),
|
2390 |
-
|
2391 |
// this needs to come last so it's on top
|
2392 |
bigPlay =
|
2393 |
$('<div class="mejs-overlay mejs-layer mejs-overlay-play">'+
|
@@ -2414,14 +2413,26 @@ if (typeof jQuery != 'undefined') {
|
|
2414 |
media.addEventListener('play',function() {
|
2415 |
bigPlay.hide();
|
2416 |
loading.hide();
|
|
|
2417 |
error.hide();
|
2418 |
}, false);
|
2419 |
|
2420 |
media.addEventListener('playing', function() {
|
2421 |
bigPlay.hide();
|
2422 |
loading.hide();
|
|
|
2423 |
error.hide();
|
2424 |
}, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2425 |
|
2426 |
media.addEventListener('pause',function() {
|
2427 |
if (!mejs.MediaFeatures.isiPhone) {
|
@@ -2431,6 +2442,7 @@ if (typeof jQuery != 'undefined') {
|
|
2431 |
|
2432 |
media.addEventListener('waiting', function() {
|
2433 |
loading.show();
|
|
|
2434 |
}, false);
|
2435 |
|
2436 |
|
@@ -2441,14 +2453,17 @@ if (typeof jQuery != 'undefined') {
|
|
2441 |
// return;
|
2442 |
|
2443 |
loading.show();
|
|
|
2444 |
}, false);
|
2445 |
media.addEventListener('canplay',function() {
|
2446 |
loading.hide();
|
|
|
2447 |
}, false);
|
2448 |
|
2449 |
// error handling
|
2450 |
media.addEventListener('error',function() {
|
2451 |
loading.hide();
|
|
|
2452 |
error.show();
|
2453 |
error.find('mejs-overlay-error').html("Error loading this resource");
|
2454 |
}, false);
|
@@ -2546,7 +2561,7 @@ if (typeof jQuery != 'undefined') {
|
|
2546 |
|
2547 |
if (t.media.pluginType == 'flash') {
|
2548 |
t.media.remove();
|
2549 |
-
} else if (t.media.
|
2550 |
t.media.prop('controls', true);
|
2551 |
}
|
2552 |
|
@@ -2636,7 +2651,7 @@ if (typeof jQuery != 'undefined') {
|
|
2636 |
var t = this,
|
2637 |
stop =
|
2638 |
$('<div class="mejs-button mejs-stop-button mejs-stop">' +
|
2639 |
-
'<button type="button" aria-controls="' + t.id + '" title="' + t.options.stopText + '></button>' +
|
2640 |
'</div>')
|
2641 |
.appendTo(controls)
|
2642 |
.click(function() {
|
@@ -2663,6 +2678,7 @@ if (typeof jQuery != 'undefined') {
|
|
2663 |
|
2664 |
$('<div class="mejs-time-rail">'+
|
2665 |
'<span class="mejs-time-total">'+
|
|
|
2666 |
'<span class="mejs-time-loaded"></span>'+
|
2667 |
'<span class="mejs-time-current"></span>'+
|
2668 |
'<span class="mejs-time-handle"></span>'+
|
@@ -2673,6 +2689,7 @@ if (typeof jQuery != 'undefined') {
|
|
2673 |
'</span>'+
|
2674 |
'</div>')
|
2675 |
.appendTo(controls);
|
|
|
2676 |
|
2677 |
var
|
2678 |
t = this,
|
@@ -2720,31 +2737,32 @@ if (typeof jQuery != 'undefined') {
|
|
2720 |
if (e.which === 1) {
|
2721 |
mouseIsDown = true;
|
2722 |
handleMouseMove(e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2723 |
return false;
|
2724 |
-
}
|
2725 |
-
})
|
2726 |
-
|
2727 |
-
controls.find('.mejs-time-total')
|
2728 |
.bind('mouseenter', function(e) {
|
2729 |
mouseIsOver = true;
|
|
|
|
|
|
|
2730 |
if (!mejs.MediaFeatures.hasTouch) {
|
2731 |
timefloat.show();
|
2732 |
}
|
2733 |
})
|
2734 |
.bind('mouseleave',function(e) {
|
2735 |
mouseIsOver = false;
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
$(document)
|
2740 |
-
.bind('mouseup', function (e) {
|
2741 |
-
mouseIsDown = false;
|
2742 |
-
timefloat.hide();
|
2743 |
-
//handleMouseMove(e);
|
2744 |
-
})
|
2745 |
-
.bind('mousemove', function (e) {
|
2746 |
-
if (mouseIsDown || mouseIsOver) {
|
2747 |
-
handleMouseMove(e);
|
2748 |
}
|
2749 |
});
|
2750 |
|
@@ -2949,11 +2967,11 @@ if (typeof jQuery != 'undefined') {
|
|
2949 |
volumeCurrent = t.container.find('.mejs-volume-current, .mejs-horizontal-volume-current'),
|
2950 |
volumeHandle = t.container.find('.mejs-volume-handle, .mejs-horizontal-volume-handle'),
|
2951 |
|
2952 |
-
positionVolumeHandle = function(volume) {
|
2953 |
|
2954 |
-
if (!volumeSlider.is(':visible')) {
|
2955 |
volumeSlider.show();
|
2956 |
-
positionVolumeHandle(volume);
|
2957 |
volumeSlider.hide()
|
2958 |
return;
|
2959 |
}
|
@@ -3073,24 +3091,22 @@ if (typeof jQuery != 'undefined') {
|
|
3073 |
})
|
3074 |
.bind('mousedown', function (e) {
|
3075 |
handleVolumeMove(e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3076 |
mouseIsDown = true;
|
3077 |
|
3078 |
return false;
|
3079 |
});
|
3080 |
-
|
3081 |
-
$(document)
|
3082 |
-
.bind('mouseup', function (e) {
|
3083 |
-
mouseIsDown = false;
|
3084 |
-
|
3085 |
-
if (!mouseIsOver && mode == 'vertical') {
|
3086 |
-
volumeSlider.hide();
|
3087 |
-
}
|
3088 |
-
})
|
3089 |
-
.bind('mousemove', function (e) {
|
3090 |
-
if (mouseIsDown) {
|
3091 |
-
handleVolumeMove(e);
|
3092 |
-
}
|
3093 |
-
});
|
3094 |
|
3095 |
|
3096 |
// MUTE button
|
@@ -3154,7 +3170,15 @@ if (typeof jQuery != 'undefined') {
|
|
3154 |
if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
|
3155 |
|
3156 |
// chrome doesn't alays fire this in an iframe
|
3157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3158 |
//player.container.bind('webkitfullscreenchange', function(e) {
|
3159 |
|
3160 |
|
@@ -3196,7 +3220,25 @@ if (typeof jQuery != 'undefined') {
|
|
3196 |
} else {
|
3197 |
|
3198 |
var hideTimeout = null,
|
3199 |
-
supportsPointerEvents = (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3200 |
|
3201 |
if (supportsPointerEvents && !mejs.MediaFeatures.isOpera) { // opera doesn't allow this :(
|
3202 |
|
@@ -3658,7 +3700,7 @@ if (typeof jQuery != 'undefined') {
|
|
3658 |
// chapters
|
3659 |
if (player.hasChapters) {
|
3660 |
player.chapters.css('visibility','visible');
|
3661 |
-
player.chapters.fadeIn(200);
|
3662 |
}
|
3663 |
},
|
3664 |
function () {
|
@@ -3799,7 +3841,7 @@ if (typeof jQuery != 'undefined') {
|
|
3799 |
for (i=0; i<track.entries.times.length; i++) {
|
3800 |
if (t.media.currentTime >= track.entries.times[i].start && t.media.currentTime <= track.entries.times[i].stop){
|
3801 |
t.captionsText.html(track.entries.text[i]);
|
3802 |
-
t.captions.show();
|
3803 |
return; // exit out if one is visible;
|
3804 |
}
|
3805 |
}
|
@@ -4033,7 +4075,7 @@ if (typeof jQuery != 'undefined') {
|
|
4033 |
(function($) {
|
4034 |
|
4035 |
$.extend(mejs.MepDefaults,
|
4036 |
-
contextMenuItems
|
4037 |
// demo of a fullscreen option
|
4038 |
{
|
4039 |
render: function(player) {
|
@@ -4088,7 +4130,7 @@ $.extend(mejs.MepDefaults,
|
|
4088 |
window.location.href = player.media.currentSrc;
|
4089 |
}
|
4090 |
}
|
4091 |
-
]
|
4092 |
);
|
4093 |
|
4094 |
|
15 |
var mejs = mejs || {};
|
16 |
|
17 |
// version number
|
18 |
+
mejs.version = '2.9.1';
|
19 |
|
20 |
// player number (for missing, same id attr)
|
21 |
mejs.meIndex = 0;
|
26 |
{version: [3,0], types: ['video/mp4','video/m4v','video/mov','video/wmv','audio/wma','audio/m4a','audio/mp3','audio/wav','audio/mpeg']}
|
27 |
],
|
28 |
flash: [
|
29 |
+
{version: [9,0,124], types: ['video/mp4','video/m4v','video/mov','video/flv','video/x-flv','audio/flv','audio/x-flv','audio/mp3','audio/m4a','audio/mpeg', 'video/youtube', 'video/x-youtube']}
|
30 |
//,{version: [12,0], types: ['video/webm']} // for future reference (hopefully!)
|
31 |
],
|
32 |
youtube: [
|
33 |
+
{version: null, types: ['video/youtube', 'video/x-youtube']}
|
34 |
],
|
35 |
vimeo: [
|
36 |
{version: null, types: ['video/vimeo']}
|
1631 |
}
|
1632 |
|
1633 |
// 5%
|
1634 |
+
var newTime = Math.max(media.currentTime - (media.duration * 0.05), 0);
|
1635 |
media.setCurrentTime(newTime);
|
1636 |
}
|
1637 |
}
|
1649 |
}
|
1650 |
|
1651 |
// 5%
|
1652 |
+
var newTime = Math.min(media.currentTime + (media.duration * 0.05), media.duration);
|
1653 |
media.setCurrentTime(newTime);
|
1654 |
}
|
1655 |
}
|
2296 |
rail = t.controls.find('.mejs-time-rail'),
|
2297 |
total = t.controls.find('.mejs-time-total'),
|
2298 |
current = t.controls.find('.mejs-time-current'),
|
2299 |
+
loaded = t.controls.find('.mejs-time-loaded'),
|
2300 |
others = rail.siblings();
|
2301 |
|
2302 |
|
2318 |
});
|
2319 |
|
2320 |
// fit the rail into the remaining space
|
2321 |
+
railWidth = t.controls.width() - usedWidth - (rail.outerWidth(true) - rail.width());
|
2322 |
}
|
2323 |
|
2324 |
// outer area
|
2386 |
'<div class="mejs-overlay-error"></div>'+
|
2387 |
'</div>')
|
2388 |
.hide() // start out hidden
|
2389 |
+
.appendTo(layers),
|
|
|
2390 |
// this needs to come last so it's on top
|
2391 |
bigPlay =
|
2392 |
$('<div class="mejs-overlay mejs-layer mejs-overlay-play">'+
|
2413 |
media.addEventListener('play',function() {
|
2414 |
bigPlay.hide();
|
2415 |
loading.hide();
|
2416 |
+
controls.find('.mejs-time-buffering').hide();
|
2417 |
error.hide();
|
2418 |
}, false);
|
2419 |
|
2420 |
media.addEventListener('playing', function() {
|
2421 |
bigPlay.hide();
|
2422 |
loading.hide();
|
2423 |
+
controls.find('.mejs-time-buffering').hide();
|
2424 |
error.hide();
|
2425 |
}, false);
|
2426 |
+
|
2427 |
+
media.addEventListener('seeking', function() {
|
2428 |
+
loading.show();
|
2429 |
+
controls.find('.mejs-time-buffering').show();
|
2430 |
+
}, false);
|
2431 |
+
|
2432 |
+
media.addEventListener('seeked', function() {
|
2433 |
+
loading.hide();
|
2434 |
+
controls.find('.mejs-time-buffering').hide();
|
2435 |
+
}, false);
|
2436 |
|
2437 |
media.addEventListener('pause',function() {
|
2438 |
if (!mejs.MediaFeatures.isiPhone) {
|
2442 |
|
2443 |
media.addEventListener('waiting', function() {
|
2444 |
loading.show();
|
2445 |
+
controls.find('.mejs-time-buffering').show();
|
2446 |
}, false);
|
2447 |
|
2448 |
|
2453 |
// return;
|
2454 |
|
2455 |
loading.show();
|
2456 |
+
controls.find('.mejs-time-buffering').show();
|
2457 |
}, false);
|
2458 |
media.addEventListener('canplay',function() {
|
2459 |
loading.hide();
|
2460 |
+
controls.find('.mejs-time-buffering').hide();
|
2461 |
}, false);
|
2462 |
|
2463 |
// error handling
|
2464 |
media.addEventListener('error',function() {
|
2465 |
loading.hide();
|
2466 |
+
controls.find('.mejs-time-buffering').hide();
|
2467 |
error.show();
|
2468 |
error.find('mejs-overlay-error').html("Error loading this resource");
|
2469 |
}, false);
|
2561 |
|
2562 |
if (t.media.pluginType == 'flash') {
|
2563 |
t.media.remove();
|
2564 |
+
} else if (t.media.pluginType == 'native') {
|
2565 |
t.media.prop('controls', true);
|
2566 |
}
|
2567 |
|
2651 |
var t = this,
|
2652 |
stop =
|
2653 |
$('<div class="mejs-button mejs-stop-button mejs-stop">' +
|
2654 |
+
'<button type="button" aria-controls="' + t.id + '" title="' + t.options.stopText + '"></button>' +
|
2655 |
'</div>')
|
2656 |
.appendTo(controls)
|
2657 |
.click(function() {
|
2678 |
|
2679 |
$('<div class="mejs-time-rail">'+
|
2680 |
'<span class="mejs-time-total">'+
|
2681 |
+
'<span class="mejs-time-buffering"></span>'+
|
2682 |
'<span class="mejs-time-loaded"></span>'+
|
2683 |
'<span class="mejs-time-current"></span>'+
|
2684 |
'<span class="mejs-time-handle"></span>'+
|
2689 |
'</span>'+
|
2690 |
'</div>')
|
2691 |
.appendTo(controls);
|
2692 |
+
controls.find('.mejs-time-buffering').hide();
|
2693 |
|
2694 |
var
|
2695 |
t = this,
|
2737 |
if (e.which === 1) {
|
2738 |
mouseIsDown = true;
|
2739 |
handleMouseMove(e);
|
2740 |
+
$(document)
|
2741 |
+
.bind('mousemove.dur', function(e) {
|
2742 |
+
handleMouseMove(e);
|
2743 |
+
})
|
2744 |
+
.bind('mouseup.dur', function (e) {
|
2745 |
+
mouseIsDown = false;
|
2746 |
+
timefloat.hide();
|
2747 |
+
$(document).unbind('.dur');
|
2748 |
+
});
|
2749 |
return false;
|
2750 |
+
}
|
2751 |
+
})
|
|
|
|
|
2752 |
.bind('mouseenter', function(e) {
|
2753 |
mouseIsOver = true;
|
2754 |
+
$(document).bind('mousemove.dur', function(e) {
|
2755 |
+
handleMouseMove(e);
|
2756 |
+
});
|
2757 |
if (!mejs.MediaFeatures.hasTouch) {
|
2758 |
timefloat.show();
|
2759 |
}
|
2760 |
})
|
2761 |
.bind('mouseleave',function(e) {
|
2762 |
mouseIsOver = false;
|
2763 |
+
if (!mouseIsDown) {
|
2764 |
+
$(document).unbind('.dur');
|
2765 |
+
timefloat.hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2766 |
}
|
2767 |
});
|
2768 |
|
2967 |
volumeCurrent = t.container.find('.mejs-volume-current, .mejs-horizontal-volume-current'),
|
2968 |
volumeHandle = t.container.find('.mejs-volume-handle, .mejs-horizontal-volume-handle'),
|
2969 |
|
2970 |
+
positionVolumeHandle = function(volume, secondTry) {
|
2971 |
|
2972 |
+
if (!volumeSlider.is(':visible') && typeof secondTry != 'undefined') {
|
2973 |
volumeSlider.show();
|
2974 |
+
positionVolumeHandle(volume, true);
|
2975 |
volumeSlider.hide()
|
2976 |
return;
|
2977 |
}
|
3091 |
})
|
3092 |
.bind('mousedown', function (e) {
|
3093 |
handleVolumeMove(e);
|
3094 |
+
$(document)
|
3095 |
+
.bind('mousemove.vol', function(e) {
|
3096 |
+
handleVolumeMove(e);
|
3097 |
+
})
|
3098 |
+
.bind('mouseup.vol', function () {
|
3099 |
+
mouseIsDown = false;
|
3100 |
+
$(document).unbind('.vol');
|
3101 |
+
|
3102 |
+
if (!mouseIsOver && mode == 'vertical') {
|
3103 |
+
volumeSlider.hide();
|
3104 |
+
}
|
3105 |
+
});
|
3106 |
mouseIsDown = true;
|
3107 |
|
3108 |
return false;
|
3109 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3110 |
|
3111 |
|
3112 |
// MUTE button
|
3170 |
if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
|
3171 |
|
3172 |
// chrome doesn't alays fire this in an iframe
|
3173 |
+
var target = null;
|
3174 |
+
|
3175 |
+
if (mejs.MediaFeatures.hasMozNativeFullScreen) {
|
3176 |
+
target = $(document);
|
3177 |
+
} else {
|
3178 |
+
target = player.container;
|
3179 |
+
}
|
3180 |
+
|
3181 |
+
target.bind(mejs.MediaFeatures.fullScreenEventName, function(e) {
|
3182 |
//player.container.bind('webkitfullscreenchange', function(e) {
|
3183 |
|
3184 |
|
3220 |
} else {
|
3221 |
|
3222 |
var hideTimeout = null,
|
3223 |
+
supportsPointerEvents = (function() {
|
3224 |
+
// TAKEN FROM MODERNIZR
|
3225 |
+
var element = document.createElement('x'),
|
3226 |
+
documentElement = document.documentElement,
|
3227 |
+
getComputedStyle = window.getComputedStyle,
|
3228 |
+
supports;
|
3229 |
+
if(!('pointerEvents' in element.style)){
|
3230 |
+
return false;
|
3231 |
+
}
|
3232 |
+
element.style.pointerEvents = 'auto';
|
3233 |
+
element.style.pointerEvents = 'x';
|
3234 |
+
documentElement.appendChild(element);
|
3235 |
+
supports = getComputedStyle &&
|
3236 |
+
getComputedStyle(element, '').pointerEvents === 'auto';
|
3237 |
+
documentElement.removeChild(element);
|
3238 |
+
return !!supports;
|
3239 |
+
})();
|
3240 |
+
|
3241 |
+
console.log('supportsPointerEvents', supportsPointerEvents);
|
3242 |
|
3243 |
if (supportsPointerEvents && !mejs.MediaFeatures.isOpera) { // opera doesn't allow this :(
|
3244 |
|
3700 |
// chapters
|
3701 |
if (player.hasChapters) {
|
3702 |
player.chapters.css('visibility','visible');
|
3703 |
+
player.chapters.fadeIn(200).height(player.chapters.find('.mejs-chapter').outerHeight());
|
3704 |
}
|
3705 |
},
|
3706 |
function () {
|
3841 |
for (i=0; i<track.entries.times.length; i++) {
|
3842 |
if (t.media.currentTime >= track.entries.times[i].start && t.media.currentTime <= track.entries.times[i].stop){
|
3843 |
t.captionsText.html(track.entries.text[i]);
|
3844 |
+
t.captions.show().height(0);
|
3845 |
return; // exit out if one is visible;
|
3846 |
}
|
3847 |
}
|
4075 |
(function($) {
|
4076 |
|
4077 |
$.extend(mejs.MepDefaults,
|
4078 |
+
{ 'contextMenuItems': [
|
4079 |
// demo of a fullscreen option
|
4080 |
{
|
4081 |
render: function(player) {
|
4130 |
window.location.href = player.media.currentSrc;
|
4131 |
}
|
4132 |
}
|
4133 |
+
]}
|
4134 |
);
|
4135 |
|
4136 |
|
mediaelement/mediaelement-and-player.min.js
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Copyright 2010-2012, John Dyer (http://j.hn)
|
11 |
* Dual licensed under the MIT or GPL Version 2 licenses.
|
12 |
*
|
13 |
-
*/var mejs=mejs||{};mejs.version="2.
|
14 |
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='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",g,f=document.getElementsByTagName("script"),j=f.length,h=a.length;b<j;b++){g=f[b].src;for(c=0;c<h;c++){e=a[c];if(g.indexOf(e)>
|
15 |
-1){d=g.substring(0,g.indexOf(e));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],
|
16 |
10);var e=parseInt(a[1],10),g=parseInt(a[2],10),f=0,j=0;if(c)f=parseInt(a[3])/d;return j=b*3600+e*60+g+f},removeSwf:function(a){var b=document.getElementById(a);if(b&&b.nodeName=="OBJECT")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)}}};
|
@@ -70,78 +70,80 @@ c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function
|
|
70 |
*
|
71 |
*/if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
|
72 |
(function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks",
|
73 |
-
"volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,
|
74 |
-
|
75 |
-
this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof
|
76 |
-
d=a.media.tagName.toLowerCase();a.isDynamic=d!=="audio"&&d!=="video";a.isVideo=a.isDynamic?a.options.isVideo:d!=="audio"&&a.options.isVideo;if(
|
77 |
-
a.container.addClass((
|
78 |
-
a.width=a.options[d+"Width"]>0||a.options[d+"Width"].toString().indexOf("%")>-1?a.options[d+"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"+
|
79 |
-
a.options["default"+
|
80 |
-
"visible").css("display","block");
|
81 |
-
"block")})}else{
|
82 |
-
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,
|
83 |
-
!(d.isiPhone&&
|
84 |
-
else
|
85 |
-
function(){
|
86 |
-
function(){for(var h=0,o=mejs.players.length;h<o;h++){var n=mejs.players[h];n.id!=
|
87 |
-
function(){
|
88 |
-
a.pluginType=="native"){a.load();a.play()}if(
|
89 |
-
d=this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight,e=this.container.parent().width();
|
90 |
-
this.layers.children(".mejs-layer").width(this.width).height(this.height)}},setControlsSize:function(){var a=0,
|
91 |
-
|
92 |
-
|
93 |
-
d.
|
94 |
-
false)
|
95 |
-
|
96 |
-
|
97 |
-
a)})};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});
|
98 |
-
|
|
|
99 |
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.$);
|
100 |
-
(function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,c,
|
101 |
-
|
102 |
-
(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,c,
|
103 |
-
k=
|
104 |
-
|
105 |
-
this.
|
106 |
-
this.total.width()*this.media.currentTime/this.media.duration,
|
107 |
-
(function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" <span> | </span> "});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,c,
|
108 |
-
c,
|
109 |
-
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(
|
110 |
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(){if(this.media.duration&&this.durationD)this.durationD.html(mejs.Utility.secondsToTimeCode(this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
|
111 |
-
(function(f){f.extend(mejs.MepDefaults,{muteText:"Mute Toggle",hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,c,
|
112 |
-
'"></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(
|
113 |
-
k=this.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),h=this.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),o=this.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),n=this.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),p=function(
|
114 |
-
h.height(),
|
115 |
-
|
116 |
g.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(this.container.is(":visible")){p(a.options.startVolume);d.pluginType==="native"&&d.setVolume(a.options.startVolume)}}}})})(mejs.$);
|
117 |
-
(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:"Fullscreen"});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,docStyleOverflow:null,isInIframe:false,buildfullscreen:function(a,c,
|
118 |
-
true;a.setControlsSize()}else{a.isNativeFullScreen=false;a.exitFullScreen()}})
|
119 |
-
else{var k=null;
|
120 |
-
|
121 |
-
g.
|
122 |
-
|
123 |
-
if(a.media.pluginType
|
124 |
-
|
125 |
-
|
126 |
-
(
|
127 |
-
this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");this.setControlsSize();this.isFullScreen=
|
128 |
-
|
129 |
-
a.
|
|
|
130 |
"hidden")}).delegate("input[type=radio]","click",function(){lang=this.value;if(lang=="none")a.selectedTrack=null;else for(e=0;e<a.tracks.length;e++)if(a.tracks[e].srclang==lang){a.selectedTrack=a.tracks[e];a.captions.attr("lang",a.selectedTrack.srclang);a.displayCaptions();break}});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("mouseenter",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("mouseleave",
|
131 |
function(){d.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(e=0;e<a.tracks.length;e++)a.tracks[e].kind=="subtitles"&&a.addTrackButton(a.tracks[e].srclang,a.tracks[e].label);a.loadNextTrack();d.addEventListener("timeupdate",function(){a.displayCaptions()},false);d.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility",
|
132 |
-
"visible");a.chapters.fadeIn(200)}},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")}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else this.isLoadingTrack=false},loadTrack:function(a){var
|
133 |
-
true;
|
134 |
-
a+"]").prop("disabled",false).siblings("label").html(
|
135 |
-
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))},displayCaptions:function(){if(typeof this.tracks!="undefined"){var a,
|
136 |
-
this.captions.show();return}this.captions.hide()}},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
|
137 |
-
a.entries.times[
|
138 |
-
|
139 |
-
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={pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,
|
140 |
-
split2:function(a,
|
141 |
-
function(a,
|
142 |
-
(function(f){f.extend(mejs.MepDefaults,contextMenuItems
|
143 |
-
f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(
|
144 |
-
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,
|
145 |
-
k;g++)if(e[g].isSeparator)d+='<div class="mejs-contextmenu-separator"></div>';else{var h=e[g].render(
|
146 |
-
"undefined"&&p.click(
|
147 |
|
10 |
* Copyright 2010-2012, John Dyer (http://j.hn)
|
11 |
* Dual licensed under the MIT or GPL Version 2 licenses.
|
12 |
*
|
13 |
+
*/var mejs=mejs||{};mejs.version="2.9.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/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"]}],vimeo:[{version:null,types:["video/vimeo"]}]};
|
14 |
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='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",g,f=document.getElementsByTagName("script"),j=f.length,h=a.length;b<j;b++){g=f[b].src;for(c=0;c<h;c++){e=a[c];if(g.indexOf(e)>
|
15 |
-1){d=g.substring(0,g.indexOf(e));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],
|
16 |
10);var e=parseInt(a[1],10),g=parseInt(a[2],10),f=0,j=0;if(c)f=parseInt(a[3])/d;return j=b*3600+e*60+g+f},removeSwf:function(a){var b=document.getElementById(a);if(b&&b.nodeName=="OBJECT")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)}}};
|
70 |
*
|
71 |
*/if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
|
72 |
(function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks",
|
73 |
+
"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()}b.setCurrentTime(Math.max(b.currentTime-b.duration*0.05,0))}}},{keys:[39,
|
74 |
+
228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}b.setCurrentTime(Math.min(b.currentTime+b.duration*0.05,b.duration))}}},{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);
|
75 |
+
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);mejs.players.push(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)}}),
|
76 |
+
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.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.id="mep_"+mejs.mepIndex++;a.container=f('<div id="'+a.id+'" class="mejs-container"><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);
|
77 |
+
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=d.substring(0,1).toUpperCase()+d.substring(1);
|
78 |
+
a.width=a.options[d+"Width"]>0||a.options[d+"Width"].toString().indexOf("%")>-1?a.options[d+"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"+b+"Width"];a.height=a.options[d+"Height"]>0||a.options[d+"Height"].toString().indexOf("%")>-1?a.options[d+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!==null?a.$media.attr("height"):
|
79 |
+
a.options["default"+b+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.height;c.pluginHeight=a.width}mejs.MediaElement(a.$media[0],c)},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.find(".mejs-control").css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility",
|
80 |
+
"visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true}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.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display",
|
81 |
+
"block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false}},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;
|
82 |
+
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)&&
|
83 |
+
!(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);
|
84 |
+
else c.controlsEnabled&&c.showControls(false)});else{(c.media.pluginType=="native"?c.$media:f(c.media.pluginElement)).click(function(){a.paused?a.play():a.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",
|
85 |
+
function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControls&&c.startControlsTimer(1E3)})}e&&!c.options.alwaysShowControls&&c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(h){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(h.target.videoHeight)){c.setPlayerSize(h.target.videoWidth,h.target.videoHeight);c.setControlsSize();c.media.setVideoSize(h.target.videoWidth,h.target.videoHeight)}},false)}a.addEventListener("play",
|
86 |
+
function(){for(var h=0,o=mejs.players.length;h<o;h++){var n=mejs.players[h];n.id!=c.id&&c.options.pauseOtherPlayers&&!n.paused&&!n.ended&&n.pause();n.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){try{c.media.setCurrentTime(0)}catch(h){}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",
|
87 |
+
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);f(window).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&&
|
88 |
+
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){var c=this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth,
|
89 |
+
d=this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight,e=this.container.parent().width();c=parseInt(e*d/c,10);if(this.container.parent()[0].tagName.toLowerCase()==="body"){e=f(window).width();c=f(window).height()}this.container.width(e).height(c);this.$media.width("100%").height("100%");this.container.find("object, embed, iframe").width("100%").height("100%");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);
|
90 |
+
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(){if(f(this).css("position")!="absolute")a+=f(this).outerWidth(true)});b=this.controls.width()-a-(c.outerWidth(true)-
|
91 |
+
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==
|
92 |
+
0)c=f('<img width="100%" height="100%" />').appendTo(b);c.attr("src",a)},buildoverlays:function(a,b,c,d){if(a.isVideo){var e=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(c),g=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(c),k=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(c).click(function(){d.paused?d.play():
|
93 |
+
d.pause()});d.addEventListener("play",function(){k.hide();e.hide();b.find(".mejs-time-buffering").hide();g.hide()},false);d.addEventListener("playing",function(){k.hide();e.hide();b.find(".mejs-time-buffering").hide();g.hide()},false);d.addEventListener("seeking",function(){e.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("seeked",function(){e.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||k.show()},
|
94 |
+
false);d.addEventListener("waiting",function(){e.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("loadeddata",function(){e.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("canplay",function(){e.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener("error",function(){e.hide();b.find(".mejs-time-buffering").hide();g.show();g.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,d){f(document).keydown(function(e){if(a.hasFocus&&
|
95 |
+
a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g<k;g++)for(var h=a.options.keyActions[g],o=0,n=h.keys.length;o<n;o++)if(e.keyCode==h.keys[o]){e.preventDefault();h.action(a,d);return false}return true});f(document).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").toLowerCase(),src:d.attr("src"),kind:d.attr("kind"),
|
96 |
+
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)},
|
97 |
+
getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){if(this.media.pluginType=="flash")this.media.remove();else this.media.pluginType=="native"&&this.media.prop("controls",true);this.isDynamic||this.$node.insertBefore(this.container);this.container.remove()}};if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){return this.each(function(){new mejs.MediaElementPlayer(this,a)})};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});
|
98 |
+
window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
|
99 |
+
(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+'"></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);
|
100 |
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.$);
|
101 |
+
(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+'"></button></div>').appendTo(b).click(function(){d.paused||d.pause();if(d.currentTime>0){d.setCurrentTime(0);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));
|
102 |
+
b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$);
|
103 |
+
(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=
|
104 |
+
b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var g=b.find(".mejs-time-current"),k=b.find(".mejs-time-handle"),h=b.find(".mejs-time-float"),o=b.find(".mejs-time-float-current"),n=function(l){l=l.pageX;var q=e.offset(),i=e.outerWidth(),j=0;j=0;var m=l-q.left;if(l>q.left&&l<=i+q.left&&d.duration){j=(l-q.left)/i;j=j<=0.02?0:j*d.duration;p&&d.setCurrentTime(j);if(!mejs.MediaFeatures.hasTouch){h.css("left",m);o.html(mejs.Utility.secondsToTimeCode(j));h.show()}}},p=false;e.bind("mousedown",function(l){if(l.which===
|
105 |
+
1){p=true;n(l);f(document).bind("mousemove.dur",function(q){n(q)}).bind("mouseup.dur",function(){p=false;h.hide();f(document).unbind(".dur")});return false}}).bind("mouseenter",function(){f(document).bind("mousemove.dur",function(l){n(l)});mejs.MediaFeatures.hasTouch||h.show()}).bind("mouseleave",function(){if(!p){f(document).unbind(".dur");h.hide()}});d.addEventListener("progress",function(l){a.setProgressRail(l);a.setCurrentRail(l)},false);d.addEventListener("timeupdate",function(l){a.setProgressRail(l);
|
106 |
+
a.setCurrentRail(l)},false);this.loaded=c;this.total=e;this.current=g;this.handle=k},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()*
|
107 |
+
c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=this.total.width()*this.media.currentTime/this.media.duration,b=a-this.handle.outerWidth(true)/2;this.current.width(a);this.handle.css("left",b)}}})})(mejs.$);
|
108 |
+
(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,
|
109 |
+
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");
|
110 |
+
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()},
|
111 |
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(){if(this.media.duration&&this.durationD)this.durationD.html(mejs.Utility.secondsToTimeCode(this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
|
112 |
+
(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.isVideo?this.options.videoVolume:this.options.audioVolume,g=e=="horizontal"?f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+this.id+'" title="'+this.options.muteText+
|
113 |
+
'"></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="'+this.id+'" title="'+this.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),
|
114 |
+
k=this.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),h=this.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),o=this.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),n=this.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),p=function(j,m){if(!k.is(":visible")&&typeof m!="undefined"){k.show();p(j,true);k.hide()}else{j=Math.max(0,j);j=Math.min(j,1);j==0?g.removeClass("mejs-mute").addClass("mejs-unmute"):g.removeClass("mejs-unmute").addClass("mejs-mute");
|
115 |
+
if(e=="vertical"){var r=h.height(),s=h.position(),t=r-r*j;n.css("top",s.top+t-n.height()/2);o.height(r-t);o.css("top",s.top+t)}else{r=h.width();s=h.position();r=r*j;n.css("left",s.left+r-n.width()/2);o.width(r)}}},l=function(j){var m=null,r=h.offset();if(e=="vertical"){m=h.height();parseInt(h.css("top").replace(/px/,""),10);m=(m-(j.pageY-r.top))/m;if(r.top==0||r.left==0)return}else{m=h.width();m=(j.pageX-r.left)/m}m=Math.max(0,m);m=Math.min(m,1);p(m);m==0?d.setMuted(true):d.setMuted(false);d.setVolume(m)},
|
116 |
+
q=false,i=false;g.hover(function(){k.show();i=true},function(){i=false;!q&&e=="vertical"&&k.hide()});k.bind("mouseover",function(){i=true}).bind("mousedown",function(j){l(j);f(document).bind("mousemove.vol",function(m){l(m)}).bind("mouseup.vol",function(){q=false;f(document).unbind(".vol");!i&&e=="vertical"&&k.hide()});q=true;return false});g.find("button").click(function(){d.setMuted(!d.muted)});d.addEventListener("volumechange",function(){if(!q)if(d.muted){p(0);g.removeClass("mejs-mute").addClass("mejs-unmute")}else{p(d.volume);
|
117 |
g.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(this.container.is(":visible")){p(a.options.startVolume);d.pluginType==="native"&&d.setVolume(a.options.startVolume)}}}})})(mejs.$);
|
118 |
+
(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:"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=null;c=mejs.MediaFeatures.hasMozNativeFullScreen?f(document):a.container;c.bind(mejs.MediaFeatures.fullScreenEventName,
|
119 |
+
function(){if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen=false;a.exitFullScreen()}})}var e=this,g=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+e.id+'" title="'+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()||
|
120 |
+
a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;b=function(){var i=document.createElement("x"),j=document.documentElement,m=window.getComputedStyle;if(!("pointerEvents"in i.style))return false;i.style.pointerEvents="auto";i.style.pointerEvents="x";j.appendChild(i);m=m&&m(i,"").pointerEvents==="auto";j.removeChild(i);return!!m}();console.log("supportsPointerEvents",b);if(b&&!mejs.MediaFeatures.isOpera){var h=false,o=function(){if(h){n.hide();p.hide();l.hide();g.css("pointer-events",
|
121 |
+
"");e.controls.css("pointer-events","");h=false}},n=f('<div class="mejs-fullscreen-hover" />').appendTo(e.container).mouseover(o),p=f('<div class="mejs-fullscreen-hover" />').appendTo(e.container).mouseover(o),l=f('<div class="mejs-fullscreen-hover" />').appendTo(e.container).mouseover(o),q=function(){var i={position:"absolute",top:0,left:0};n.css(i);p.css(i);l.css(i);n.width(e.container.width()).height(e.container.height()-e.controls.height());i=g.offset().left-e.container.offset().left;fullScreenBtnWidth=
|
122 |
+
g.outerWidth(true);p.width(i).height(e.controls.height()).css({top:e.container.height()-e.controls.height()});l.width(e.container.width()-i-fullScreenBtnWidth).height(e.controls.height()).css({top:e.container.height()-e.controls.height(),left:i+fullScreenBtnWidth})};f(document).resize(function(){q()});g.mouseover(function(){if(!e.isFullScreen){var i=g.offset(),j=a.container.offset();d.positionFullscreenButton(i.left-j.left,i.top-j.top,false);g.css("pointer-events","none");e.controls.css("pointer-events",
|
123 |
+
"none");n.show();l.show();p.show();q();h=true}});d.addEventListener("fullscreenchange",function(){o()})}else g.mouseover(function(){if(k!==null){clearTimeout(k);delete k}var i=g.offset(),j=a.container.offset();d.positionFullscreenButton(i.left-j.left,i.top-j.top,true)}).mouseout(function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){d.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;f(document).bind("keydown",function(i){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||
|
124 |
+
e.isFullScreen)&&i.keyCode==27)a.exitFullScreen()})}},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&&
|
125 |
+
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")}},
|
126 |
+
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%");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("object, embed, iframe").width("100%").height("100%");a.media.setVideoSize(f(window).width(),
|
127 |
+
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(){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=
|
128 |
+
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=
|
129 |
+
false}}})})(mejs.$);
|
130 |
+
(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:"Captions/Subtitles"});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,d){if(a.isVideo)if(a.tracks.length!=0){var e;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"><span class="mejs-captions-text"></span></div></div>').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");
|
131 |
+
a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+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).hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},function(){f(this).find(".mejs-captions-selector").css("visibility",
|
132 |
"hidden")}).delegate("input[type=radio]","click",function(){lang=this.value;if(lang=="none")a.selectedTrack=null;else for(e=0;e<a.tracks.length;e++)if(a.tracks[e].srclang==lang){a.selectedTrack=a.tracks[e];a.captions.attr("lang",a.selectedTrack.srclang);a.displayCaptions();break}});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("mouseenter",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("mouseleave",
|
133 |
function(){d.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(e=0;e<a.tracks.length;e++)a.tracks[e].kind=="subtitles"&&a.addTrackButton(a.tracks[e].srclang,a.tracks[e].label);a.loadNextTrack();d.addEventListener("timeupdate",function(){a.displayCaptions()},false);d.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility",
|
134 |
+
"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")}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else this.isLoadingTrack=false},loadTrack:function(a){var b=
|
135 |
+
this,c=b.tracks[a],d=function(){c.isLoaded=true;b.enableTrackButton(c.srclang,c.label);b.loadNextTrack()};c.isTranslation?mejs.TrackFormatParser.translateTrackText(b.tracks[0].entries,b.tracks[0].srclang,c.srclang,b.options.googleApiKey,function(e){c.entries=e;d()}):f.ajax({url:c.src,success:function(e){c.entries=mejs.TrackFormatParser.parse(e);d();c.kind=="chapters"&&b.media.duration>0&&b.drawChapters(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||
|
136 |
+
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();
|
137 |
+
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))},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&&
|
138 |
+
this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},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/
|
139 |
+
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)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+
|
140 |
+
"</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",
|
141 |
+
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={pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,
|
142 |
+
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})?)(.*)$/,split2:function(a,b){return a.split(b)},parse:function(a){var b=0;a=this.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++}c.text.push(e);c.times.push({start:mejs.Utility.timeCodeToSeconds(d[1]),stop:mejs.Utility.timeCodeToSeconds(d[3]),
|
143 |
+
settings:d[5]})}}return c}};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.$);
|
144 |
+
(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}}]});
|
145 |
+
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()})},isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=
|
146 |
+
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<
|
147 |
+
k;g++)if(e[g].isSeparator)d+='<div class="mejs-contextmenu-separator"></div>';else{var h=e[g].render(c);if(h!=null)d+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+Math.random()*1E6+'">'+h+"</div>"}c.contextMenu.empty().append(f(d)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var o=f(this),n=parseInt(o.data("itemindex"),10),p=c.options.contextMenuItems[n];typeof p.show!="undefined"&&p.show(o,c);o.click(function(){typeof p.click!=
|
148 |
+
"undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
|
149 |
|
mediaelement/mediaelement.js
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* for browsers that don't understand HTML5 or can't play the provided codec
|
8 |
* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
|
9 |
*
|
10 |
-
* Copyright 2010-
|
11 |
* Dual licensed under the MIT or GPL Version 2 licenses.
|
12 |
*
|
13 |
*/
|
@@ -15,7 +15,7 @@
|
|
15 |
var mejs = mejs || {};
|
16 |
|
17 |
// version number
|
18 |
-
mejs.version = '2.
|
19 |
|
20 |
// player number (for missing, same id attr)
|
21 |
mejs.meIndex = 0;
|
@@ -26,11 +26,11 @@ mejs.plugins = {
|
|
26 |
{version: [3,0], types: ['video/mp4','video/m4v','video/mov','video/wmv','audio/wma','audio/m4a','audio/mp3','audio/wav','audio/mpeg']}
|
27 |
],
|
28 |
flash: [
|
29 |
-
{version: [9,0,124], types: ['video/mp4','video/m4v','video/mov','video/flv','video/x-flv','audio/flv','audio/x-flv','audio/mp3','audio/m4a','audio/mpeg']}
|
30 |
//,{version: [12,0], types: ['video/webm']} // for future reference (hopefully!)
|
31 |
],
|
32 |
youtube: [
|
33 |
-
{version: null, types: ['video/youtube']}
|
34 |
],
|
35 |
vimeo: [
|
36 |
{version: null, types: ['video/vimeo']}
|
@@ -59,11 +59,13 @@ mejs.Utility = {
|
|
59 |
path = '',
|
60 |
name = '',
|
61 |
script,
|
62 |
-
scripts = document.getElementsByTagName('script')
|
|
|
|
|
63 |
|
64 |
-
for (; i <
|
65 |
script = scripts[i].src;
|
66 |
-
for (j = 0; j <
|
67 |
name = scriptNames[j];
|
68 |
if (script.indexOf(name) > -1) {
|
69 |
path = script.substring(0, script.indexOf(name));
|
@@ -276,6 +278,7 @@ mejs.MediaFeatures = {
|
|
276 |
t.isFirefox = (ua.match(/firefox/gi) !== null);
|
277 |
t.isWebkit = (ua.match(/webkit/gi) !== null);
|
278 |
t.isGecko = (ua.match(/gecko/gi) !== null) && !t.isWebkit;
|
|
|
279 |
t.hasTouch = ('ontouchstart' in window);
|
280 |
|
281 |
// create HTML5 media elements for IE before 9, get a <video> element for fullscreen detection
|
@@ -435,6 +438,7 @@ mejs.PluginMediaElement.prototype = {
|
|
435 |
seeking: false,
|
436 |
duration: 0,
|
437 |
error: null,
|
|
|
438 |
|
439 |
// HTML5 get/set properties, but only set (updated by event handlers)
|
440 |
muted: false,
|
@@ -509,9 +513,9 @@ mejs.PluginMediaElement.prototype = {
|
|
509 |
return false;
|
510 |
},
|
511 |
|
512 |
-
positionFullscreenButton: function(x,y) {
|
513 |
if (this.pluginApi != null && this.pluginApi.positionFullscreenButton) {
|
514 |
-
this.pluginApi.positionFullscreenButton(x,y);
|
515 |
}
|
516 |
},
|
517 |
|
@@ -649,6 +653,24 @@ mejs.PluginMediaElement.prototype = {
|
|
649 |
},
|
650 |
// end: fake events
|
651 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
652 |
remove: function() {
|
653 |
mejs.Utility.removeSwf(this.pluginElement.id);
|
654 |
}
|
@@ -763,6 +785,8 @@ mejs.MediaElementDefaults = {
|
|
763 |
pluginWidth: -1,
|
764 |
// overrides <video height>
|
765 |
pluginHeight: -1,
|
|
|
|
|
766 |
// rate in milliseconds for Flash and Silverlight to fire the timeupdate event
|
767 |
// larger number is less accurate, but less strain on plugin->JavaScript bridge
|
768 |
timerRate: 250,
|
@@ -1018,7 +1042,7 @@ mejs.HtmlMediaElementShim = {
|
|
1018 |
} catch (e) {}
|
1019 |
|
1020 |
errorContainer.innerHTML = (poster !== '') ?
|
1021 |
-
'<a href="' + playback.url + '"><img src="' + poster + '" /></a>' :
|
1022 |
'<a href="' + playback.url + '"><span>Download File</span></a>';
|
1023 |
|
1024 |
htmlMediaElement.parentNode.insertBefore(errorContainer, htmlMediaElement);
|
@@ -1039,6 +1063,17 @@ mejs.HtmlMediaElementShim = {
|
|
1039 |
node,
|
1040 |
initVars;
|
1041 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1042 |
// check for placement inside a <p> tag (sometimes WYSIWYG editors do this)
|
1043 |
node = htmlMediaElement.parentNode;
|
1044 |
while (node !== null && node.tagName.toLowerCase() != 'body') {
|
@@ -1105,6 +1140,9 @@ mejs.HtmlMediaElementShim = {
|
|
1105 |
if (controls) {
|
1106 |
initVars.push('controls=true'); // shows controls in the plugin if desired
|
1107 |
}
|
|
|
|
|
|
|
1108 |
|
1109 |
switch (playback.method) {
|
1110 |
case 'silverlight':
|
@@ -1355,6 +1393,7 @@ mejs.YouTubeApi = {
|
|
1355 |
|
1356 |
iFrameReady: function() {
|
1357 |
|
|
|
1358 |
this.isIframeLoaded = true;
|
1359 |
|
1360 |
while (this.iframeQueue.length > 0) {
|
7 |
* for browsers that don't understand HTML5 or can't play the provided codec
|
8 |
* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
|
9 |
*
|
10 |
+
* Copyright 2010-2012, John Dyer (http://j.hn)
|
11 |
* Dual licensed under the MIT or GPL Version 2 licenses.
|
12 |
*
|
13 |
*/
|
15 |
var mejs = mejs || {};
|
16 |
|
17 |
// version number
|
18 |
+
mejs.version = '2.9.1';
|
19 |
|
20 |
// player number (for missing, same id attr)
|
21 |
mejs.meIndex = 0;
|
26 |
{version: [3,0], types: ['video/mp4','video/m4v','video/mov','video/wmv','audio/wma','audio/m4a','audio/mp3','audio/wav','audio/mpeg']}
|
27 |
],
|
28 |
flash: [
|
29 |
+
{version: [9,0,124], types: ['video/mp4','video/m4v','video/mov','video/flv','video/x-flv','audio/flv','audio/x-flv','audio/mp3','audio/m4a','audio/mpeg', 'video/youtube', 'video/x-youtube']}
|
30 |
//,{version: [12,0], types: ['video/webm']} // for future reference (hopefully!)
|
31 |
],
|
32 |
youtube: [
|
33 |
+
{version: null, types: ['video/youtube', 'video/x-youtube']}
|
34 |
],
|
35 |
vimeo: [
|
36 |
{version: null, types: ['video/vimeo']}
|
59 |
path = '',
|
60 |
name = '',
|
61 |
script,
|
62 |
+
scripts = document.getElementsByTagName('script'),
|
63 |
+
il = scripts.length,
|
64 |
+
jl = scriptNames.length;
|
65 |
|
66 |
+
for (; i < il; i++) {
|
67 |
script = scripts[i].src;
|
68 |
+
for (j = 0; j < jl; j++) {
|
69 |
name = scriptNames[j];
|
70 |
if (script.indexOf(name) > -1) {
|
71 |
path = script.substring(0, script.indexOf(name));
|
278 |
t.isFirefox = (ua.match(/firefox/gi) !== null);
|
279 |
t.isWebkit = (ua.match(/webkit/gi) !== null);
|
280 |
t.isGecko = (ua.match(/gecko/gi) !== null) && !t.isWebkit;
|
281 |
+
t.isOpera = (ua.match(/opera/gi) !== null);
|
282 |
t.hasTouch = ('ontouchstart' in window);
|
283 |
|
284 |
// create HTML5 media elements for IE before 9, get a <video> element for fullscreen detection
|
438 |
seeking: false,
|
439 |
duration: 0,
|
440 |
error: null,
|
441 |
+
tagName: '',
|
442 |
|
443 |
// HTML5 get/set properties, but only set (updated by event handlers)
|
444 |
muted: false,
|
513 |
return false;
|
514 |
},
|
515 |
|
516 |
+
positionFullscreenButton: function(x,y,visibleAndAbove) {
|
517 |
if (this.pluginApi != null && this.pluginApi.positionFullscreenButton) {
|
518 |
+
this.pluginApi.positionFullscreenButton(x,y,visibleAndAbove);
|
519 |
}
|
520 |
},
|
521 |
|
653 |
},
|
654 |
// end: fake events
|
655 |
|
656 |
+
// fake DOM attribute methods
|
657 |
+
attributes: {},
|
658 |
+
hasAttribute: function(name){
|
659 |
+
return (name in this.attributes);
|
660 |
+
},
|
661 |
+
removeAttribute: function(name){
|
662 |
+
delete this.attributes[name];
|
663 |
+
},
|
664 |
+
getAttribute: function(name){
|
665 |
+
if (this.hasAttribute(name)) {
|
666 |
+
return this.attributes[name];
|
667 |
+
}
|
668 |
+
return '';
|
669 |
+
},
|
670 |
+
setAttribute: function(name, value){
|
671 |
+
this.attributes[name] = value;
|
672 |
+
},
|
673 |
+
|
674 |
remove: function() {
|
675 |
mejs.Utility.removeSwf(this.pluginElement.id);
|
676 |
}
|
785 |
pluginWidth: -1,
|
786 |
// overrides <video height>
|
787 |
pluginHeight: -1,
|
788 |
+
// additional plugin variables in 'key=value' form
|
789 |
+
pluginVars: [],
|
790 |
// rate in milliseconds for Flash and Silverlight to fire the timeupdate event
|
791 |
// larger number is less accurate, but less strain on plugin->JavaScript bridge
|
792 |
timerRate: 250,
|
1042 |
} catch (e) {}
|
1043 |
|
1044 |
errorContainer.innerHTML = (poster !== '') ?
|
1045 |
+
'<a href="' + playback.url + '"><img src="' + poster + '" width="100%" height="100%" /></a>' :
|
1046 |
'<a href="' + playback.url + '"><span>Download File</span></a>';
|
1047 |
|
1048 |
htmlMediaElement.parentNode.insertBefore(errorContainer, htmlMediaElement);
|
1063 |
node,
|
1064 |
initVars;
|
1065 |
|
1066 |
+
// copy tagName from html media element
|
1067 |
+
pluginMediaElement.tagName = htmlMediaElement.tagName
|
1068 |
+
|
1069 |
+
// copy attributes from html media element to plugin media element
|
1070 |
+
for (var i = 0; i < htmlMediaElement.attributes.length; i++) {
|
1071 |
+
var attribute = htmlMediaElement.attributes[i];
|
1072 |
+
if (attribute.specified == true) {
|
1073 |
+
pluginMediaElement.setAttribute(attribute.name, attribute.value);
|
1074 |
+
}
|
1075 |
+
}
|
1076 |
+
|
1077 |
// check for placement inside a <p> tag (sometimes WYSIWYG editors do this)
|
1078 |
node = htmlMediaElement.parentNode;
|
1079 |
while (node !== null && node.tagName.toLowerCase() != 'body') {
|
1140 |
if (controls) {
|
1141 |
initVars.push('controls=true'); // shows controls in the plugin if desired
|
1142 |
}
|
1143 |
+
if (options.pluginVars) {
|
1144 |
+
initVars = initVars.concat(options.pluginVars);
|
1145 |
+
}
|
1146 |
|
1147 |
switch (playback.method) {
|
1148 |
case 'silverlight':
|
1393 |
|
1394 |
iFrameReady: function() {
|
1395 |
|
1396 |
+
this.isLoaded = true;
|
1397 |
this.isIframeLoaded = true;
|
1398 |
|
1399 |
while (this.iframeQueue.length > 0) {
|
mediaelement/mediaelement.min.js
CHANGED
@@ -7,52 +7,53 @@
|
|
7 |
* for browsers that don't understand HTML5 or can't play the provided codec
|
8 |
* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
|
9 |
*
|
10 |
-
* Copyright 2010-
|
11 |
* Dual licensed under the MIT or GPL Version 2 licenses.
|
12 |
*
|
13 |
-
*/var mejs=mejs||{};mejs.version="2.
|
14 |
-
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='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",g,f=document.getElementsByTagName("script")
|
15 |
-
g.indexOf(e));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],
|
16 |
-
10),g=parseInt(a[2],10),f=0,j=0;if(c)f=parseInt(a[3])/d;return j=b*3600+e*60+g+f},removeSwf:function(a){var b=document.getElementById(a);if(b&&b.nodeName=="OBJECT")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)}}};
|
17 |
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)&&
|
18 |
!(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}};
|
19 |
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});
|
20 |
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});
|
21 |
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.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)!==
|
22 |
-
null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit;a.hasTouch="ontouchstart"in window;for(c=0;c<g.length;c++)e=document.createElement(g[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||
|
23 |
-
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(f){if(a.hasWebkitNativeFullScreen)f.webkitRequestFullScreen();
|
24 |
else a.hasMozNativeFullScreen&&f.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();
|
25 |
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}}},setVideoSize:function(a,b){this.width=a;this.height=b}};
|
26 |
mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={}};
|
27 |
-
mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,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=
|
28 |
-
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 true}return false},
|
29 |
-
positionFullscreenButton:function(a,b){this.pluginApi!=null&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(a,b)},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));
|
30 |
this.src=mejs.Utility.absolutizeUrl(a)}}}},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);
|
31 |
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&&
|
32 |
-
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)}},
|
|
|
33 |
mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},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,
|
34 |
c)}},fireEvent:function(a,b,c){var d,e;a=this.pluginMediaElements[a];a.ended=false;a.paused=true;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)}};
|
35 |
-
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",enablePluginSmoothing:false,silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,timerRate:250,startVolume:0.8,success:function(){},
|
36 |
-
mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
|
37 |
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 j=d.getAttribute("autoplay"),h=d.getAttribute("preload"),l=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;h=typeof h=="undefined"||h===null||h==="false"?
|
38 |
"none":h;j=!(typeof j=="undefined"||j===null||j==="false");l=!(typeof l=="undefined"||l===null||l==="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,j,h)}else if(k.method!=="")return this.createPlugin(k,c,e,j,h,l);else{this.createErrorMessage(k,c,e);return this}},
|
39 |
determinePlayback:function(a,b,c,d,e){var g=[],f,j,h={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},l,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){j=this.formatType(e,a.getAttribute("type"));g.push({type:j,url:e})}else for(f=0;f<a.childNodes.length;f++){j=a.childNodes[f];if(j.nodeType==1&&j.tagName.toLowerCase()=="source"){e=j.getAttribute("src");
|
40 |
j=this.formatType(e,j.getAttribute("type"));g.push({type:j,url:e})}}if(!d&&g.length>0&&g[0].url!==null&&this.getTypeFromFile(g[0].url).indexOf("audio")>-1)h.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==="native")){if(!d){f=document.createElement(h.isVideo?"video":"audio");a.parentNode.insertBefore(f,a);a.style.display="none";h.htmlMediaElement=a=f}for(f=0;f<g.length;f++)if(a.canPlayType(g[f].type).replace(/no/,
|
41 |
"")!==""||a.canPlayType(g[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){h.method="native";h.url=g[f].url;break}if(h.method==="native"){if(h.url!==null)a.src=h.url;return h}}if(b.mode==="auto"||b.mode==="shim")for(f=0;f<g.length;f++){j=g[f].type;for(a=0;a<b.plugins.length;a++){e=b.plugins[a];l=mejs.plugins[e];for(c=0;c<l.length;c++){k=l[c];if(k.version==null||mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(j==k.types[d]){h.method=e;h.url=g[f].url;return h}}}}if(h.method===
|
42 |
""&&g.length>0)h.url=g[0].url;return h},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.substring(a.lastIndexOf(".")+1);return(/(mp4|m4v|ogg|ogv|webm|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+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!==
|
43 |
-
""?'<a href="'+a.url+'"><img src="'+c+'" /></a>':'<a href="'+a.url+'"><span>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,j=1,h="me_"+a.method+"_"+mejs.meIndex++,l=new mejs.PluginMediaElement(h,a.method,a.url),k=document.createElement("div"),m;for(m=
|
44 |
-
break}m=m.parentNode}if(a.isVideo){f=b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;j=b.videoHeight>0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;f=mejs.Utility.encodeUrl(f);j=mejs.Utility.encodeUrl(j)}else if(b.enablePluginDebug){f=320;j=240}l.success=
|
45 |
-
c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+h,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+f,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"height="+j];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");
|
46 |
-
'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+h+'" name="'+h+'" width="'+f+'" height="'+j+'"><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="'+
|
47 |
-
k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+h+'" width="'+f+'" height="'+j+'"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&")+'" /><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=
|
48 |
'<embed id="'+h+'" name="'+h+'" 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="'+j+'"></embed>';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:l,pluginId:h,videoId:b,
|
49 |
height:j,width:f};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":console.log("vimeoid");l.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML='<object width="'+f+'" height="'+j+'"><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='+
|
50 |
l.vimeoid+'&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" /><embed src="//vimeo.com/moogaloop.swf?api=1&clip_id='+l.vimeoid+'&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'+f+'" height="'+j+'"></embed></object>'}c.style.display=
|
51 |
"none";return l},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}};
|
52 |
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,
|
53 |
{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;
|
54 |
-
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=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=
|
55 |
-
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='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'"><param name="movie" value="'+c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else a.container.innerHTML=
|
56 |
'<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; "><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,
|
57 |
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,
|
58 |
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;
|
7 |
* for browsers that don't understand HTML5 or can't play the provided codec
|
8 |
* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
|
9 |
*
|
10 |
+
* Copyright 2010-2012, John Dyer (http://j.hn)
|
11 |
* Dual licensed under the MIT or GPL Version 2 licenses.
|
12 |
*
|
13 |
+
*/var mejs=mejs||{};mejs.version="2.9.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/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"]}],vimeo:[{version:null,types:["video/vimeo"]}]};
|
14 |
+
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='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",g,f=document.getElementsByTagName("script"),j=f.length,h=a.length;b<j;b++){g=f[b].src;for(c=0;c<h;c++){e=a[c];if(g.indexOf(e)>
|
15 |
+
-1){d=g.substring(0,g.indexOf(e));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],
|
16 |
+
10);var e=parseInt(a[1],10),g=parseInt(a[2],10),f=0,j=0;if(c)f=parseInt(a[3])/d;return j=b*3600+e*60+g+f},removeSwf:function(a){var b=document.getElementById(a);if(b&&b.nodeName=="OBJECT")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)}}};
|
17 |
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)&&
|
18 |
!(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}};
|
19 |
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});
|
20 |
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});
|
21 |
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.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)!==
|
22 |
+
null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit;a.isOpera=d.match(/opera/gi)!==null;a.hasTouch="ontouchstart"in window;for(c=0;c<g.length;c++)e=document.createElement(g[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||
|
23 |
+
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(f){if(a.hasWebkitNativeFullScreen)f.webkitRequestFullScreen();
|
24 |
else a.hasMozNativeFullScreen&&f.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();
|
25 |
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}}},setVideoSize:function(a,b){this.width=a;this.height=b}};
|
26 |
mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={}};
|
27 |
+
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=
|
28 |
+
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 true}return false},
|
29 |
+
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));
|
30 |
this.src=mejs.Utility.absolutizeUrl(a)}}}},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);
|
31 |
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&&
|
32 |
+
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)}},attributes:{},
|
33 |
+
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)}};
|
34 |
mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},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,
|
35 |
c)}},fireEvent:function(a,b,c){var d,e;a=this.pluginMediaElements[a];a.ended=false;a.paused=true;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)}};
|
36 |
+
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",enablePluginSmoothing:false,silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},
|
37 |
+
error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
|
38 |
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 j=d.getAttribute("autoplay"),h=d.getAttribute("preload"),l=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;h=typeof h=="undefined"||h===null||h==="false"?
|
39 |
"none":h;j=!(typeof j=="undefined"||j===null||j==="false");l=!(typeof l=="undefined"||l===null||l==="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,j,h)}else if(k.method!=="")return this.createPlugin(k,c,e,j,h,l);else{this.createErrorMessage(k,c,e);return this}},
|
40 |
determinePlayback:function(a,b,c,d,e){var g=[],f,j,h={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},l,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){j=this.formatType(e,a.getAttribute("type"));g.push({type:j,url:e})}else for(f=0;f<a.childNodes.length;f++){j=a.childNodes[f];if(j.nodeType==1&&j.tagName.toLowerCase()=="source"){e=j.getAttribute("src");
|
41 |
j=this.formatType(e,j.getAttribute("type"));g.push({type:j,url:e})}}if(!d&&g.length>0&&g[0].url!==null&&this.getTypeFromFile(g[0].url).indexOf("audio")>-1)h.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==="native")){if(!d){f=document.createElement(h.isVideo?"video":"audio");a.parentNode.insertBefore(f,a);a.style.display="none";h.htmlMediaElement=a=f}for(f=0;f<g.length;f++)if(a.canPlayType(g[f].type).replace(/no/,
|
42 |
"")!==""||a.canPlayType(g[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){h.method="native";h.url=g[f].url;break}if(h.method==="native"){if(h.url!==null)a.src=h.url;return h}}if(b.mode==="auto"||b.mode==="shim")for(f=0;f<g.length;f++){j=g[f].type;for(a=0;a<b.plugins.length;a++){e=b.plugins[a];l=mejs.plugins[e];for(c=0;c<l.length;c++){k=l[c];if(k.version==null||mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(j==k.types[d]){h.method=e;h.url=g[f].url;return h}}}}if(h.method===
|
43 |
""&&g.length>0)h.url=g[0].url;return h},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.substring(a.lastIndexOf(".")+1);return(/(mp4|m4v|ogg|ogv|webm|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+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!==
|
44 |
+
""?'<a href="'+a.url+'"><img src="'+c+'" width="100%" height="100%" /></a>':'<a href="'+a.url+'"><span>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,j=1,h="me_"+a.method+"_"+mejs.meIndex++,l=new mejs.PluginMediaElement(h,a.method,a.url),k=document.createElement("div"),m;l.tagName=c.tagName;for(m=0;m<c.attributes.length;m++){var n=c.attributes[m];n.specified==true&&l.setAttribute(n.name,n.value)}for(m=
|
45 |
+
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.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;j=b.videoHeight>0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;f=mejs.Utility.encodeUrl(f);j=mejs.Utility.encodeUrl(j)}else if(b.enablePluginDebug){f=320;j=240}l.success=
|
46 |
+
b.success;mejs.MediaPluginBridge.registerPluginElement(h,l,c);k.className="me-plugin";k.id=h+"_container";a.isVideo?c.parentNode.insertBefore(k,c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+h,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+f,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"height="+j];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");
|
47 |
+
b.enablePluginSmoothing&&d.push("smoothing=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="'+h+'" name="'+h+'" width="'+f+'" height="'+j+'"><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="'+
|
48 |
+
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="'+h+'" width="'+f+'" height="'+j+'"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&")+'" /><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=
|
49 |
'<embed id="'+h+'" name="'+h+'" 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="'+j+'"></embed>';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:l,pluginId:h,videoId:b,
|
50 |
height:j,width:f};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":console.log("vimeoid");l.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML='<object width="'+f+'" height="'+j+'"><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='+
|
51 |
l.vimeoid+'&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" /><embed src="//vimeo.com/moogaloop.swf?api=1&clip_id='+l.vimeoid+'&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'+f+'" height="'+j+'"></embed></object>'}c.style.display=
|
52 |
"none";return l},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}};
|
53 |
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,
|
54 |
{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;
|
55 |
+
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]=
|
56 |
+
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='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'"><param name="movie" value="'+c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else a.container.innerHTML=
|
57 |
'<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; "><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,
|
58 |
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,
|
59 |
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;
|
mediaelement/mediaelementplayer.css
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
}
|
8 |
|
9 |
.me-plugin {
|
10 |
-
position: absolute;
|
11 |
}
|
12 |
|
13 |
.mejs-embed, .mejs-embed body {
|
@@ -45,7 +45,7 @@
|
|
45 |
top: 0;
|
46 |
left: 0;
|
47 |
width: 100%;
|
48 |
-
height: 100%;
|
49 |
}
|
50 |
.mejs-poster {
|
51 |
position: absolute;
|
@@ -88,11 +88,11 @@
|
|
88 |
background: #333;
|
89 |
background: url(background.png);
|
90 |
background: rgba(0, 0, 0, 0.9);
|
91 |
-
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.9)), to(rgba(0,0,0,0.9)));
|
92 |
background: -webkit-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
93 |
background: -moz-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
94 |
background: -o-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
95 |
-
background: -ms-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
96 |
background: linear-gradient(rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
97 |
}
|
98 |
.mejs-overlay-loading span {
|
@@ -172,6 +172,9 @@
|
|
172 |
overflow: hidden;
|
173 |
text-align: center;
|
174 |
padding: auto 4px;
|
|
|
|
|
|
|
175 |
}
|
176 |
.mejs-container .mejs-controls .mejs-time span {
|
177 |
font-size: 11px;
|
@@ -227,6 +230,31 @@
|
|
227 |
background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
228 |
background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
229 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
.mejs-controls .mejs-time-rail .mejs-time-loaded {
|
231 |
background: #3caac8;
|
232 |
background: rgba(60,170,200,0.8);
|
@@ -540,6 +568,7 @@
|
|
540 |
left: 0;
|
541 |
-xborder-right: solid 1px #fff;
|
542 |
width: 10000px;
|
|
|
543 |
}
|
544 |
.mejs-chapters .mejs-chapter {
|
545 |
position: absolute;
|
7 |
}
|
8 |
|
9 |
.me-plugin {
|
10 |
+
position: absolute;
|
11 |
}
|
12 |
|
13 |
.mejs-embed, .mejs-embed body {
|
45 |
top: 0;
|
46 |
left: 0;
|
47 |
width: 100%;
|
48 |
+
height: 100%;
|
49 |
}
|
50 |
.mejs-poster {
|
51 |
position: absolute;
|
88 |
background: #333;
|
89 |
background: url(background.png);
|
90 |
background: rgba(0, 0, 0, 0.9);
|
91 |
+
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.9)), to(rgba(0,0,0,0.9)));
|
92 |
background: -webkit-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
93 |
background: -moz-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
94 |
background: -o-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
95 |
+
background: -ms-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
96 |
background: linear-gradient(rgba(50,50,50,0.9), rgba(0,0,0,0.9));
|
97 |
}
|
98 |
.mejs-overlay-loading span {
|
172 |
overflow: hidden;
|
173 |
text-align: center;
|
174 |
padding: auto 4px;
|
175 |
+
box-sizing: content-box;
|
176 |
+
-moz-box-sizing: content-box;
|
177 |
+
-webkit-box-sizing: content-box;
|
178 |
}
|
179 |
.mejs-container .mejs-controls .mejs-time span {
|
180 |
font-size: 11px;
|
230 |
background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
231 |
background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8));
|
232 |
}
|
233 |
+
.mejs-controls .mejs-time-rail .mejs-time-buffering {
|
234 |
+
width:100%;
|
235 |
+
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);
|
236 |
+
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));
|
237 |
+
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);
|
238 |
+
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);
|
239 |
+
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);
|
240 |
+
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);
|
241 |
+
-webkit-background-size: 15px 15px;
|
242 |
+
-moz-background-size: 15px 15px;
|
243 |
+
-o-background-size: 15px 15px;
|
244 |
+
background-size: 15px 15px;
|
245 |
+
-webkit-animation: buffering-stripes 2s linear infinite;
|
246 |
+
-moz-animation: buffering-stripes 2s linear infinite;
|
247 |
+
-ms-animation: buffering-stripes 2s linear infinite;
|
248 |
+
-o-animation: buffering-stripes 2s linear infinite;
|
249 |
+
animation: buffering-stripes 2s linear infinite;
|
250 |
+
}
|
251 |
+
|
252 |
+
@-webkit-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
|
253 |
+
@-moz-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
|
254 |
+
@-ms-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
|
255 |
+
@-o-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
|
256 |
+
@keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} }
|
257 |
+
|
258 |
.mejs-controls .mejs-time-rail .mejs-time-loaded {
|
259 |
background: #3caac8;
|
260 |
background: rgba(60,170,200,0.8);
|
568 |
left: 0;
|
569 |
-xborder-right: solid 1px #fff;
|
570 |
width: 10000px;
|
571 |
+
z-index: 1;
|
572 |
}
|
573 |
.mejs-chapters .mejs-chapter {
|
574 |
position: absolute;
|
mediaelement/mediaelementplayer.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Creates a controller bar for HTML5 <video> add <audio> tags
|
6 |
* using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
|
7 |
*
|
8 |
-
* Copyright 2010-
|
9 |
* Dual licensed under the MIT or GPL Version 2 licenses.
|
10 |
*
|
11 |
*/
|
@@ -56,9 +56,9 @@ if (typeof jQuery != 'undefined') {
|
|
56 |
alwaysShowControls: false,
|
57 |
// force iPad's native controls
|
58 |
iPadUseNativeControls: false,
|
59 |
-
// force
|
60 |
iPhoneUseNativeControls: false,
|
61 |
-
// force
|
62 |
AndroidUseNativeControls: false,
|
63 |
// features to show
|
64 |
features: ['playpause','current','progress','duration','tracks','volume','fullscreen'],
|
@@ -113,7 +113,7 @@ if (typeof jQuery != 'undefined') {
|
|
113 |
}
|
114 |
|
115 |
// 5%
|
116 |
-
var newTime = Math.
|
117 |
media.setCurrentTime(newTime);
|
118 |
}
|
119 |
}
|
@@ -131,7 +131,7 @@ if (typeof jQuery != 'undefined') {
|
|
131 |
}
|
132 |
|
133 |
// 5%
|
134 |
-
var newTime = Math.
|
135 |
media.setCurrentTime(newTime);
|
136 |
}
|
137 |
}
|
@@ -229,7 +229,8 @@ if (typeof jQuery != 'undefined') {
|
|
229 |
t.$media.attr('controls', 'controls');
|
230 |
|
231 |
// attempt to fix iOS 3 bug
|
232 |
-
t.$media.removeAttr('poster');
|
|
|
233 |
|
234 |
// override Apple's autoplay override for iPads
|
235 |
if (mf.isiPad && t.media.getAttribute('autoplay') !== null) {
|
@@ -709,7 +710,14 @@ if (typeof jQuery != 'undefined') {
|
|
709 |
|
710 |
setPlayerSize: function(width,height) {
|
711 |
var t = this;
|
712 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
713 |
if (t.height.toString().indexOf('%') > 0) {
|
714 |
|
715 |
// do we have the native dimensions yet?
|
@@ -770,7 +778,7 @@ if (typeof jQuery != 'undefined') {
|
|
770 |
rail = t.controls.find('.mejs-time-rail'),
|
771 |
total = t.controls.find('.mejs-time-total'),
|
772 |
current = t.controls.find('.mejs-time-current'),
|
773 |
-
loaded = t.controls.find('.mejs-time-loaded')
|
774 |
others = rail.siblings();
|
775 |
|
776 |
|
@@ -792,7 +800,7 @@ if (typeof jQuery != 'undefined') {
|
|
792 |
});
|
793 |
|
794 |
// fit the rail into the remaining space
|
795 |
-
railWidth = t.controls.width() - usedWidth - (rail.outerWidth(true) - rail.
|
796 |
}
|
797 |
|
798 |
// outer area
|
@@ -860,8 +868,7 @@ if (typeof jQuery != 'undefined') {
|
|
860 |
'<div class="mejs-overlay-error"></div>'+
|
861 |
'</div>')
|
862 |
.hide() // start out hidden
|
863 |
-
.appendTo(layers),
|
864 |
-
|
865 |
// this needs to come last so it's on top
|
866 |
bigPlay =
|
867 |
$('<div class="mejs-overlay mejs-layer mejs-overlay-play">'+
|
@@ -888,14 +895,26 @@ if (typeof jQuery != 'undefined') {
|
|
888 |
media.addEventListener('play',function() {
|
889 |
bigPlay.hide();
|
890 |
loading.hide();
|
|
|
891 |
error.hide();
|
892 |
}, false);
|
893 |
|
894 |
media.addEventListener('playing', function() {
|
895 |
bigPlay.hide();
|
896 |
loading.hide();
|
|
|
897 |
error.hide();
|
898 |
}, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
899 |
|
900 |
media.addEventListener('pause',function() {
|
901 |
if (!mejs.MediaFeatures.isiPhone) {
|
@@ -905,6 +924,7 @@ if (typeof jQuery != 'undefined') {
|
|
905 |
|
906 |
media.addEventListener('waiting', function() {
|
907 |
loading.show();
|
|
|
908 |
}, false);
|
909 |
|
910 |
|
@@ -915,14 +935,17 @@ if (typeof jQuery != 'undefined') {
|
|
915 |
// return;
|
916 |
|
917 |
loading.show();
|
|
|
918 |
}, false);
|
919 |
media.addEventListener('canplay',function() {
|
920 |
loading.hide();
|
|
|
921 |
}, false);
|
922 |
|
923 |
// error handling
|
924 |
media.addEventListener('error',function() {
|
925 |
loading.hide();
|
|
|
926 |
error.show();
|
927 |
error.find('mejs-overlay-error').html("Error loading this resource");
|
928 |
}, false);
|
@@ -969,12 +992,15 @@ if (typeof jQuery != 'undefined') {
|
|
969 |
|
970 |
// store for use by plugins
|
971 |
t.tracks = [];
|
972 |
-
tracktags.each(function() {
|
|
|
|
|
|
|
973 |
t.tracks.push({
|
974 |
-
srclang:
|
975 |
-
src:
|
976 |
-
kind:
|
977 |
-
label:
|
978 |
entries: [],
|
979 |
isLoaded: false
|
980 |
});
|
@@ -982,7 +1008,7 @@ if (typeof jQuery != 'undefined') {
|
|
982 |
},
|
983 |
changeSkin: function(className) {
|
984 |
this.container[0].className = 'mejs-container ' + className;
|
985 |
-
this.setPlayerSize();
|
986 |
this.setControlsSize();
|
987 |
},
|
988 |
play: function() {
|
@@ -1017,7 +1043,7 @@ if (typeof jQuery != 'undefined') {
|
|
1017 |
|
1018 |
if (t.media.pluginType == 'flash') {
|
1019 |
t.media.remove();
|
1020 |
-
} else if (t.media.
|
1021 |
t.media.prop('controls', true);
|
1022 |
}
|
1023 |
|
@@ -1047,7 +1073,8 @@ if (typeof jQuery != 'undefined') {
|
|
1047 |
// push out to window
|
1048 |
window.MediaElementPlayer = mejs.MediaElementPlayer;
|
1049 |
|
1050 |
-
})(mejs.$);
|
|
|
1051 |
(function($) {
|
1052 |
|
1053 |
$.extend(mejs.MepDefaults, {
|
@@ -1106,7 +1133,7 @@ if (typeof jQuery != 'undefined') {
|
|
1106 |
var t = this,
|
1107 |
stop =
|
1108 |
$('<div class="mejs-button mejs-stop-button mejs-stop">' +
|
1109 |
-
'<button type="button" aria-controls="' + t.id + '" title="' + t.options.stopText + '></button>' +
|
1110 |
'</div>')
|
1111 |
.appendTo(controls)
|
1112 |
.click(function() {
|
@@ -1133,6 +1160,7 @@ if (typeof jQuery != 'undefined') {
|
|
1133 |
|
1134 |
$('<div class="mejs-time-rail">'+
|
1135 |
'<span class="mejs-time-total">'+
|
|
|
1136 |
'<span class="mejs-time-loaded"></span>'+
|
1137 |
'<span class="mejs-time-current"></span>'+
|
1138 |
'<span class="mejs-time-handle"></span>'+
|
@@ -1143,6 +1171,7 @@ if (typeof jQuery != 'undefined') {
|
|
1143 |
'</span>'+
|
1144 |
'</div>')
|
1145 |
.appendTo(controls);
|
|
|
1146 |
|
1147 |
var
|
1148 |
t = this,
|
@@ -1190,31 +1219,32 @@ if (typeof jQuery != 'undefined') {
|
|
1190 |
if (e.which === 1) {
|
1191 |
mouseIsDown = true;
|
1192 |
handleMouseMove(e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1193 |
return false;
|
1194 |
-
}
|
1195 |
-
})
|
1196 |
-
|
1197 |
-
controls.find('.mejs-time-total')
|
1198 |
.bind('mouseenter', function(e) {
|
1199 |
mouseIsOver = true;
|
|
|
|
|
|
|
1200 |
if (!mejs.MediaFeatures.hasTouch) {
|
1201 |
timefloat.show();
|
1202 |
}
|
1203 |
})
|
1204 |
.bind('mouseleave',function(e) {
|
1205 |
mouseIsOver = false;
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
$(document)
|
1210 |
-
.bind('mouseup', function (e) {
|
1211 |
-
mouseIsDown = false;
|
1212 |
-
timefloat.hide();
|
1213 |
-
//handleMouseMove(e);
|
1214 |
-
})
|
1215 |
-
.bind('mousemove', function (e) {
|
1216 |
-
if (mouseIsDown || mouseIsOver) {
|
1217 |
-
handleMouseMove(e);
|
1218 |
}
|
1219 |
});
|
1220 |
|
@@ -1294,7 +1324,8 @@ if (typeof jQuery != 'undefined') {
|
|
1294 |
|
1295 |
// options
|
1296 |
$.extend(mejs.MepDefaults, {
|
1297 |
-
duration: -1
|
|
|
1298 |
});
|
1299 |
|
1300 |
|
@@ -1321,7 +1352,7 @@ if (typeof jQuery != 'undefined') {
|
|
1321 |
var t = this;
|
1322 |
|
1323 |
if (controls.children().last().find('.mejs-currenttime').length > 0) {
|
1324 |
-
$(
|
1325 |
'<span class="mejs-duration">' +
|
1326 |
(t.options.duration > 0 ?
|
1327 |
mejs.Utility.secondsToTimeCode(t.options.duration, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25) :
|
@@ -1374,18 +1405,36 @@ if (typeof jQuery != 'undefined') {
|
|
1374 |
|
1375 |
$.extend(mejs.MepDefaults, {
|
1376 |
muteText: 'Mute Toggle',
|
1377 |
-
hideVolumeOnTouchDevices: true
|
|
|
|
|
|
|
1378 |
});
|
1379 |
|
1380 |
$.extend(MediaElementPlayer.prototype, {
|
1381 |
buildvolume: function(player, controls, layers, media) {
|
1382 |
-
|
1383 |
// Android and iOS don't support volume controls
|
1384 |
if (mejs.MediaFeatures.hasTouch && this.options.hideVolumeOnTouchDevices)
|
1385 |
return;
|
1386 |
|
1387 |
var t = this,
|
1388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1389 |
$('<div class="mejs-button mejs-volume-button mejs-mute">'+
|
1390 |
'<button type="button" aria-controls="' + t.id + '" title="' + t.options.muteText + '"></button>'+
|
1391 |
'<div class="mejs-volume-slider">'+ // outer background
|
@@ -1394,89 +1443,118 @@ if (typeof jQuery != 'undefined') {
|
|
1394 |
'<div class="mejs-volume-handle"></div>'+ // handle
|
1395 |
'</div>'+
|
1396 |
'</div>')
|
1397 |
-
|
1398 |
-
volumeSlider =
|
1399 |
-
volumeTotal =
|
1400 |
-
volumeCurrent =
|
1401 |
-
volumeHandle =
|
1402 |
|
1403 |
-
positionVolumeHandle = function(volume) {
|
1404 |
|
1405 |
-
if (!volumeSlider.is(':visible')) {
|
1406 |
volumeSlider.show();
|
1407 |
-
positionVolumeHandle(volume);
|
1408 |
volumeSlider.hide()
|
1409 |
return;
|
1410 |
}
|
1411 |
-
|
1412 |
-
|
|
|
|
|
1413 |
|
1414 |
-
|
1415 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1416 |
|
1417 |
-
|
1418 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1419 |
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
|
|
|
|
|
|
|
|
|
|
1430 |
},
|
1431 |
handleVolumeMove = function(e) {
|
1432 |
-
|
1433 |
-
|
1434 |
-
totalOffset = volumeTotal.offset()
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1442 |
|
1443 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1444 |
volume = Math.max(0,volume);
|
1445 |
-
volume = Math.min(volume,1);
|
1446 |
-
|
1447 |
-
//
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
else if (newY > railHeight)
|
1452 |
-
newY = railHeight;
|
1453 |
-
|
1454 |
-
// move the handle to match the mouse
|
1455 |
-
volumeHandle.css('top', newY - (volumeHandle.height() / 2) + totalTop );
|
1456 |
-
|
1457 |
-
// show the current visibility
|
1458 |
-
volumeCurrent.height(railHeight-newY);
|
1459 |
-
volumeCurrent.css('top',newY+totalTop);
|
1460 |
-
|
1461 |
-
// set mute status
|
1462 |
if (volume == 0) {
|
1463 |
media.setMuted(true);
|
1464 |
-
mute.removeClass('mejs-mute').addClass('mejs-unmute');
|
1465 |
} else {
|
1466 |
media.setMuted(false);
|
1467 |
-
mute.removeClass('mejs-unmute').addClass('mejs-mute');
|
1468 |
}
|
1469 |
-
|
1470 |
-
volume = Math.max(0,volume);
|
1471 |
-
volume = Math.min(volume,1);
|
1472 |
-
|
1473 |
-
// set the volume
|
1474 |
-
media.setVolume(volume);
|
1475 |
},
|
1476 |
mouseIsDown = false,
|
1477 |
mouseIsOver = false;
|
1478 |
|
1479 |
// SLIDER
|
|
|
1480 |
mute
|
1481 |
.hover(function() {
|
1482 |
volumeSlider.show();
|
@@ -1484,7 +1562,7 @@ if (typeof jQuery != 'undefined') {
|
|
1484 |
}, function() {
|
1485 |
mouseIsOver = false;
|
1486 |
|
1487 |
-
if (!mouseIsDown) {
|
1488 |
volumeSlider.hide();
|
1489 |
}
|
1490 |
});
|
@@ -1495,31 +1573,27 @@ if (typeof jQuery != 'undefined') {
|
|
1495 |
})
|
1496 |
.bind('mousedown', function (e) {
|
1497 |
handleVolumeMove(e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1498 |
mouseIsDown = true;
|
1499 |
|
1500 |
return false;
|
1501 |
});
|
1502 |
-
|
1503 |
-
$(document)
|
1504 |
-
.bind('mouseup', function (e) {
|
1505 |
-
mouseIsDown = false;
|
1506 |
-
|
1507 |
-
if (!mouseIsOver) {
|
1508 |
-
volumeSlider.hide();
|
1509 |
-
}
|
1510 |
-
})
|
1511 |
-
.bind('mousemove', function (e) {
|
1512 |
-
if (mouseIsDown) {
|
1513 |
-
handleVolumeMove(e);
|
1514 |
-
}
|
1515 |
-
});
|
1516 |
|
1517 |
|
1518 |
// MUTE button
|
1519 |
mute.find('button').click(function() {
|
1520 |
-
|
1521 |
media.setMuted( !media.muted );
|
1522 |
-
|
1523 |
});
|
1524 |
|
1525 |
// listen for volume change events from other sources
|
@@ -1535,13 +1609,14 @@ if (typeof jQuery != 'undefined') {
|
|
1535 |
}
|
1536 |
}, false);
|
1537 |
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
|
|
1545 |
}
|
1546 |
}
|
1547 |
});
|
@@ -1551,7 +1626,7 @@ if (typeof jQuery != 'undefined') {
|
|
1551 |
(function($) {
|
1552 |
|
1553 |
$.extend(mejs.MepDefaults, {
|
1554 |
-
usePluginFullScreen:
|
1555 |
newWindowCallback: function() { return '';},
|
1556 |
fullscreenText: 'Fullscreen'
|
1557 |
});
|
@@ -1576,7 +1651,16 @@ if (typeof jQuery != 'undefined') {
|
|
1576 |
// native events
|
1577 |
if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
|
1578 |
|
1579 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1580 |
//player.container.bind('webkitfullscreenchange', function(e) {
|
1581 |
|
1582 |
|
@@ -1617,35 +1701,179 @@ if (typeof jQuery != 'undefined') {
|
|
1617 |
|
1618 |
} else {
|
1619 |
|
1620 |
-
var hideTimeout = null
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
|
|
1628 |
}
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1632 |
|
1633 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1634 |
|
1635 |
-
|
1636 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1637 |
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1642 |
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1646 |
|
|
|
|
|
1647 |
|
1648 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1649 |
}
|
1650 |
|
1651 |
player.fullscreenBtn = fullscreenBtn;
|
@@ -1684,6 +1912,27 @@ if (typeof jQuery != 'undefined') {
|
|
1684 |
mejs.MediaFeatures.requestFullScreen(t.container[0]);
|
1685 |
//return;
|
1686 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1687 |
} else if (mejs.MediaFeatures.hasSemiNativeFullScreen) {
|
1688 |
t.media.webkitEnterFullscreen();
|
1689 |
return;
|
@@ -1933,7 +2182,7 @@ if (typeof jQuery != 'undefined') {
|
|
1933 |
// chapters
|
1934 |
if (player.hasChapters) {
|
1935 |
player.chapters.css('visibility','visible');
|
1936 |
-
player.chapters.fadeIn(200);
|
1937 |
}
|
1938 |
},
|
1939 |
function () {
|
@@ -2074,7 +2323,7 @@ if (typeof jQuery != 'undefined') {
|
|
2074 |
for (i=0; i<track.entries.times.length; i++) {
|
2075 |
if (t.media.currentTime >= track.entries.times[i].start && t.media.currentTime <= track.entries.times[i].stop){
|
2076 |
t.captionsText.html(track.entries.text[i]);
|
2077 |
-
t.captions.show();
|
2078 |
return; // exit out if one is visible;
|
2079 |
}
|
2080 |
}
|
@@ -2275,6 +2524,27 @@ if (typeof jQuery != 'undefined') {
|
|
2275 |
return entries;
|
2276 |
}
|
2277 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2278 |
|
2279 |
})(mejs.$);
|
2280 |
|
@@ -2287,7 +2557,7 @@ if (typeof jQuery != 'undefined') {
|
|
2287 |
(function($) {
|
2288 |
|
2289 |
$.extend(mejs.MepDefaults,
|
2290 |
-
contextMenuItems
|
2291 |
// demo of a fullscreen option
|
2292 |
{
|
2293 |
render: function(player) {
|
@@ -2342,7 +2612,7 @@ $.extend(mejs.MepDefaults,
|
|
2342 |
window.location.href = player.media.currentSrc;
|
2343 |
}
|
2344 |
}
|
2345 |
-
]
|
2346 |
);
|
2347 |
|
2348 |
|
5 |
* Creates a controller bar for HTML5 <video> add <audio> tags
|
6 |
* using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
|
7 |
*
|
8 |
+
* Copyright 2010-2012, John Dyer (http://j.hn/)
|
9 |
* Dual licensed under the MIT or GPL Version 2 licenses.
|
10 |
*
|
11 |
*/
|
56 |
alwaysShowControls: false,
|
57 |
// force iPad's native controls
|
58 |
iPadUseNativeControls: false,
|
59 |
+
// force iPhone's native controls
|
60 |
iPhoneUseNativeControls: false,
|
61 |
+
// force Android's native controls
|
62 |
AndroidUseNativeControls: false,
|
63 |
// features to show
|
64 |
features: ['playpause','current','progress','duration','tracks','volume','fullscreen'],
|
113 |
}
|
114 |
|
115 |
// 5%
|
116 |
+
var newTime = Math.max(media.currentTime - (media.duration * 0.05), 0);
|
117 |
media.setCurrentTime(newTime);
|
118 |
}
|
119 |
}
|
131 |
}
|
132 |
|
133 |
// 5%
|
134 |
+
var newTime = Math.min(media.currentTime + (media.duration * 0.05), media.duration);
|
135 |
media.setCurrentTime(newTime);
|
136 |
}
|
137 |
}
|
229 |
t.$media.attr('controls', 'controls');
|
230 |
|
231 |
// attempt to fix iOS 3 bug
|
232 |
+
//t.$media.removeAttr('poster');
|
233 |
+
// no Issue found on iOS3 -ttroxell
|
234 |
|
235 |
// override Apple's autoplay override for iPads
|
236 |
if (mf.isiPad && t.media.getAttribute('autoplay') !== null) {
|
710 |
|
711 |
setPlayerSize: function(width,height) {
|
712 |
var t = this;
|
713 |
+
|
714 |
+
if (typeof width != 'undefined')
|
715 |
+
t.width = width;
|
716 |
+
|
717 |
+
if (typeof height != 'undefined')
|
718 |
+
t.height = height;
|
719 |
+
|
720 |
+
// detect 100% mode
|
721 |
if (t.height.toString().indexOf('%') > 0) {
|
722 |
|
723 |
// do we have the native dimensions yet?
|
778 |
rail = t.controls.find('.mejs-time-rail'),
|
779 |
total = t.controls.find('.mejs-time-total'),
|
780 |
current = t.controls.find('.mejs-time-current'),
|
781 |
+
loaded = t.controls.find('.mejs-time-loaded'),
|
782 |
others = rail.siblings();
|
783 |
|
784 |
|
800 |
});
|
801 |
|
802 |
// fit the rail into the remaining space
|
803 |
+
railWidth = t.controls.width() - usedWidth - (rail.outerWidth(true) - rail.width());
|
804 |
}
|
805 |
|
806 |
// outer area
|
868 |
'<div class="mejs-overlay-error"></div>'+
|
869 |
'</div>')
|
870 |
.hide() // start out hidden
|
871 |
+
.appendTo(layers),
|
|
|
872 |
// this needs to come last so it's on top
|
873 |
bigPlay =
|
874 |
$('<div class="mejs-overlay mejs-layer mejs-overlay-play">'+
|
895 |
media.addEventListener('play',function() {
|
896 |
bigPlay.hide();
|
897 |
loading.hide();
|
898 |
+
controls.find('.mejs-time-buffering').hide();
|
899 |
error.hide();
|
900 |
}, false);
|
901 |
|
902 |
media.addEventListener('playing', function() {
|
903 |
bigPlay.hide();
|
904 |
loading.hide();
|
905 |
+
controls.find('.mejs-time-buffering').hide();
|
906 |
error.hide();
|
907 |
}, false);
|
908 |
+
|
909 |
+
media.addEventListener('seeking', function() {
|
910 |
+
loading.show();
|
911 |
+
controls.find('.mejs-time-buffering').show();
|
912 |
+
}, false);
|
913 |
+
|
914 |
+
media.addEventListener('seeked', function() {
|
915 |
+
loading.hide();
|
916 |
+
controls.find('.mejs-time-buffering').hide();
|
917 |
+
}, false);
|
918 |
|
919 |
media.addEventListener('pause',function() {
|
920 |
if (!mejs.MediaFeatures.isiPhone) {
|
924 |
|
925 |
media.addEventListener('waiting', function() {
|
926 |
loading.show();
|
927 |
+
controls.find('.mejs-time-buffering').show();
|
928 |
}, false);
|
929 |
|
930 |
|
935 |
// return;
|
936 |
|
937 |
loading.show();
|
938 |
+
controls.find('.mejs-time-buffering').show();
|
939 |
}, false);
|
940 |
media.addEventListener('canplay',function() {
|
941 |
loading.hide();
|
942 |
+
controls.find('.mejs-time-buffering').hide();
|
943 |
}, false);
|
944 |
|
945 |
// error handling
|
946 |
media.addEventListener('error',function() {
|
947 |
loading.hide();
|
948 |
+
controls.find('.mejs-time-buffering').hide();
|
949 |
error.show();
|
950 |
error.find('mejs-overlay-error').html("Error loading this resource");
|
951 |
}, false);
|
992 |
|
993 |
// store for use by plugins
|
994 |
t.tracks = [];
|
995 |
+
tracktags.each(function(index, track) {
|
996 |
+
|
997 |
+
track = $(track);
|
998 |
+
|
999 |
t.tracks.push({
|
1000 |
+
srclang: track.attr('srclang').toLowerCase(),
|
1001 |
+
src: track.attr('src'),
|
1002 |
+
kind: track.attr('kind'),
|
1003 |
+
label: track.attr('label') || '',
|
1004 |
entries: [],
|
1005 |
isLoaded: false
|
1006 |
});
|
1008 |
},
|
1009 |
changeSkin: function(className) {
|
1010 |
this.container[0].className = 'mejs-container ' + className;
|
1011 |
+
this.setPlayerSize(this.width, this.height);
|
1012 |
this.setControlsSize();
|
1013 |
},
|
1014 |
play: function() {
|
1043 |
|
1044 |
if (t.media.pluginType == 'flash') {
|
1045 |
t.media.remove();
|
1046 |
+
} else if (t.media.pluginType == 'native') {
|
1047 |
t.media.prop('controls', true);
|
1048 |
}
|
1049 |
|
1073 |
// push out to window
|
1074 |
window.MediaElementPlayer = mejs.MediaElementPlayer;
|
1075 |
|
1076 |
+
})(mejs.$);
|
1077 |
+
|
1078 |
(function($) {
|
1079 |
|
1080 |
$.extend(mejs.MepDefaults, {
|
1133 |
var t = this,
|
1134 |
stop =
|
1135 |
$('<div class="mejs-button mejs-stop-button mejs-stop">' +
|
1136 |
+
'<button type="button" aria-controls="' + t.id + '" title="' + t.options.stopText + '"></button>' +
|
1137 |
'</div>')
|
1138 |
.appendTo(controls)
|
1139 |
.click(function() {
|
1160 |
|
1161 |
$('<div class="mejs-time-rail">'+
|
1162 |
'<span class="mejs-time-total">'+
|
1163 |
+
'<span class="mejs-time-buffering"></span>'+
|
1164 |
'<span class="mejs-time-loaded"></span>'+
|
1165 |
'<span class="mejs-time-current"></span>'+
|
1166 |
'<span class="mejs-time-handle"></span>'+
|
1171 |
'</span>'+
|
1172 |
'</div>')
|
1173 |
.appendTo(controls);
|
1174 |
+
controls.find('.mejs-time-buffering').hide();
|
1175 |
|
1176 |
var
|
1177 |
t = this,
|
1219 |
if (e.which === 1) {
|
1220 |
mouseIsDown = true;
|
1221 |
handleMouseMove(e);
|
1222 |
+
$(document)
|
1223 |
+
.bind('mousemove.dur', function(e) {
|
1224 |
+
handleMouseMove(e);
|
1225 |
+
})
|
1226 |
+
.bind('mouseup.dur', function (e) {
|
1227 |
+
mouseIsDown = false;
|
1228 |
+
timefloat.hide();
|
1229 |
+
$(document).unbind('.dur');
|
1230 |
+
});
|
1231 |
return false;
|
1232 |
+
}
|
1233 |
+
})
|
|
|
|
|
1234 |
.bind('mouseenter', function(e) {
|
1235 |
mouseIsOver = true;
|
1236 |
+
$(document).bind('mousemove.dur', function(e) {
|
1237 |
+
handleMouseMove(e);
|
1238 |
+
});
|
1239 |
if (!mejs.MediaFeatures.hasTouch) {
|
1240 |
timefloat.show();
|
1241 |
}
|
1242 |
})
|
1243 |
.bind('mouseleave',function(e) {
|
1244 |
mouseIsOver = false;
|
1245 |
+
if (!mouseIsDown) {
|
1246 |
+
$(document).unbind('.dur');
|
1247 |
+
timefloat.hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1248 |
}
|
1249 |
});
|
1250 |
|
1324 |
|
1325 |
// options
|
1326 |
$.extend(mejs.MepDefaults, {
|
1327 |
+
duration: -1,
|
1328 |
+
timeAndDurationSeparator: ' <span> | </span> '
|
1329 |
});
|
1330 |
|
1331 |
|
1352 |
var t = this;
|
1353 |
|
1354 |
if (controls.children().last().find('.mejs-currenttime').length > 0) {
|
1355 |
+
$(t.options.timeAndDurationSeparator +
|
1356 |
'<span class="mejs-duration">' +
|
1357 |
(t.options.duration > 0 ?
|
1358 |
mejs.Utility.secondsToTimeCode(t.options.duration, t.options.alwaysShowHours || t.media.duration > 3600, t.options.showTimecodeFrameCount, t.options.framesPerSecond || 25) :
|
1405 |
|
1406 |
$.extend(mejs.MepDefaults, {
|
1407 |
muteText: 'Mute Toggle',
|
1408 |
+
hideVolumeOnTouchDevices: true,
|
1409 |
+
|
1410 |
+
audioVolume: 'horizontal',
|
1411 |
+
videoVolume: 'vertical'
|
1412 |
});
|
1413 |
|
1414 |
$.extend(MediaElementPlayer.prototype, {
|
1415 |
buildvolume: function(player, controls, layers, media) {
|
1416 |
+
|
1417 |
// Android and iOS don't support volume controls
|
1418 |
if (mejs.MediaFeatures.hasTouch && this.options.hideVolumeOnTouchDevices)
|
1419 |
return;
|
1420 |
|
1421 |
var t = this,
|
1422 |
+
mode = (t.isVideo) ? t.options.videoVolume : t.options.audioVolume,
|
1423 |
+
mute = (mode == 'horizontal') ?
|
1424 |
+
|
1425 |
+
// horizontal version
|
1426 |
+
$('<div class="mejs-button mejs-volume-button mejs-mute">'+
|
1427 |
+
'<button type="button" aria-controls="' + t.id + '" title="' + t.options.muteText + '"></button>'+
|
1428 |
+
'</div>' +
|
1429 |
+
'<div class="mejs-horizontal-volume-slider">'+ // outer background
|
1430 |
+
'<div class="mejs-horizontal-volume-total"></div>'+ // line background
|
1431 |
+
'<div class="mejs-horizontal-volume-current"></div>'+ // current volume
|
1432 |
+
'<div class="mejs-horizontal-volume-handle"></div>'+ // handle
|
1433 |
+
'</div>'
|
1434 |
+
)
|
1435 |
+
.appendTo(controls) :
|
1436 |
+
|
1437 |
+
// vertical version
|
1438 |
$('<div class="mejs-button mejs-volume-button mejs-mute">'+
|
1439 |
'<button type="button" aria-controls="' + t.id + '" title="' + t.options.muteText + '"></button>'+
|
1440 |
'<div class="mejs-volume-slider">'+ // outer background
|
1443 |
'<div class="mejs-volume-handle"></div>'+ // handle
|
1444 |
'</div>'+
|
1445 |
'</div>')
|
1446 |
+
.appendTo(controls),
|
1447 |
+
volumeSlider = t.container.find('.mejs-volume-slider, .mejs-horizontal-volume-slider'),
|
1448 |
+
volumeTotal = t.container.find('.mejs-volume-total, .mejs-horizontal-volume-total'),
|
1449 |
+
volumeCurrent = t.container.find('.mejs-volume-current, .mejs-horizontal-volume-current'),
|
1450 |
+
volumeHandle = t.container.find('.mejs-volume-handle, .mejs-horizontal-volume-handle'),
|
1451 |
|
1452 |
+
positionVolumeHandle = function(volume, secondTry) {
|
1453 |
|
1454 |
+
if (!volumeSlider.is(':visible') && typeof secondTry != 'undefined') {
|
1455 |
volumeSlider.show();
|
1456 |
+
positionVolumeHandle(volume, true);
|
1457 |
volumeSlider.hide()
|
1458 |
return;
|
1459 |
}
|
1460 |
+
|
1461 |
+
// correct to 0-1
|
1462 |
+
volume = Math.max(0,volume);
|
1463 |
+
volume = Math.min(volume,1);
|
1464 |
|
1465 |
+
// ajust mute button style
|
1466 |
+
if (volume == 0) {
|
1467 |
+
mute.removeClass('mejs-mute').addClass('mejs-unmute');
|
1468 |
+
} else {
|
1469 |
+
mute.removeClass('mejs-unmute').addClass('mejs-mute');
|
1470 |
+
}
|
1471 |
+
|
1472 |
+
// position slider
|
1473 |
+
if (mode == 'vertical') {
|
1474 |
+
var
|
1475 |
|
1476 |
+
// height of the full size volume slider background
|
1477 |
+
totalHeight = volumeTotal.height(),
|
1478 |
+
|
1479 |
+
// top/left of full size volume slider background
|
1480 |
+
totalPosition = volumeTotal.position(),
|
1481 |
+
|
1482 |
+
// the new top position based on the current volume
|
1483 |
+
// 70% volume on 100px height == top:30px
|
1484 |
+
newTop = totalHeight - (totalHeight * volume);
|
1485 |
+
|
1486 |
+
// handle
|
1487 |
+
volumeHandle.css('top', totalPosition.top + newTop - (volumeHandle.height() / 2));
|
1488 |
+
|
1489 |
+
// show the current visibility
|
1490 |
+
volumeCurrent.height(totalHeight - newTop );
|
1491 |
+
volumeCurrent.css('top', totalPosition.top + newTop);
|
1492 |
+
} else {
|
1493 |
+
var
|
1494 |
|
1495 |
+
// height of the full size volume slider background
|
1496 |
+
totalWidth = volumeTotal.width(),
|
1497 |
+
|
1498 |
+
// top/left of full size volume slider background
|
1499 |
+
totalPosition = volumeTotal.position(),
|
1500 |
+
|
1501 |
+
// the new left position based on the current volume
|
1502 |
+
newLeft = totalWidth * volume;
|
1503 |
+
|
1504 |
+
// handle
|
1505 |
+
volumeHandle.css('left', totalPosition.left + newLeft - (volumeHandle.width() / 2));
|
1506 |
+
|
1507 |
+
// rezize the current part of the volume bar
|
1508 |
+
volumeCurrent.width( newLeft );
|
1509 |
+
}
|
1510 |
},
|
1511 |
handleVolumeMove = function(e) {
|
1512 |
+
|
1513 |
+
var volume = null,
|
1514 |
+
totalOffset = volumeTotal.offset();
|
1515 |
+
|
1516 |
+
// calculate the new volume based on the moust position
|
1517 |
+
if (mode == 'vertical') {
|
1518 |
+
|
1519 |
+
var
|
1520 |
+
railHeight = volumeTotal.height(),
|
1521 |
+
totalTop = parseInt(volumeTotal.css('top').replace(/px/,''),10),
|
1522 |
+
newY = e.pageY - totalOffset.top;
|
1523 |
+
|
1524 |
+
volume = (railHeight - newY) / railHeight;
|
1525 |
+
|
1526 |
+
// the controls just hide themselves (usually when mouse moves too far up)
|
1527 |
+
if (totalOffset.top == 0 || totalOffset.left == 0)
|
1528 |
+
return;
|
1529 |
|
1530 |
+
} else {
|
1531 |
+
var
|
1532 |
+
railWidth = volumeTotal.width(),
|
1533 |
+
newX = e.pageX - totalOffset.left;
|
1534 |
+
|
1535 |
+
volume = newX / railWidth;
|
1536 |
+
}
|
1537 |
+
|
1538 |
+
// ensure the volume isn't outside 0-1
|
1539 |
volume = Math.max(0,volume);
|
1540 |
+
volume = Math.min(volume,1);
|
1541 |
+
|
1542 |
+
// position the slider and handle
|
1543 |
+
positionVolumeHandle(volume);
|
1544 |
+
|
1545 |
+
// set the media object (this will trigger the volumechanged event)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1546 |
if (volume == 0) {
|
1547 |
media.setMuted(true);
|
|
|
1548 |
} else {
|
1549 |
media.setMuted(false);
|
|
|
1550 |
}
|
1551 |
+
media.setVolume(volume);
|
|
|
|
|
|
|
|
|
|
|
1552 |
},
|
1553 |
mouseIsDown = false,
|
1554 |
mouseIsOver = false;
|
1555 |
|
1556 |
// SLIDER
|
1557 |
+
|
1558 |
mute
|
1559 |
.hover(function() {
|
1560 |
volumeSlider.show();
|
1562 |
}, function() {
|
1563 |
mouseIsOver = false;
|
1564 |
|
1565 |
+
if (!mouseIsDown && mode == 'vertical') {
|
1566 |
volumeSlider.hide();
|
1567 |
}
|
1568 |
});
|
1573 |
})
|
1574 |
.bind('mousedown', function (e) {
|
1575 |
handleVolumeMove(e);
|
1576 |
+
$(document)
|
1577 |
+
.bind('mousemove.vol', function(e) {
|
1578 |
+
handleVolumeMove(e);
|
1579 |
+
})
|
1580 |
+
.bind('mouseup.vol', function () {
|
1581 |
+
mouseIsDown = false;
|
1582 |
+
$(document).unbind('.vol');
|
1583 |
+
|
1584 |
+
if (!mouseIsOver && mode == 'vertical') {
|
1585 |
+
volumeSlider.hide();
|
1586 |
+
}
|
1587 |
+
});
|
1588 |
mouseIsDown = true;
|
1589 |
|
1590 |
return false;
|
1591 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1592 |
|
1593 |
|
1594 |
// MUTE button
|
1595 |
mute.find('button').click(function() {
|
|
|
1596 |
media.setMuted( !media.muted );
|
|
|
1597 |
});
|
1598 |
|
1599 |
// listen for volume change events from other sources
|
1609 |
}
|
1610 |
}, false);
|
1611 |
|
1612 |
+
if (t.container.is(':visible')) {
|
1613 |
+
// set initial volume
|
1614 |
+
positionVolumeHandle(player.options.startVolume);
|
1615 |
+
|
1616 |
+
// shim gets the startvolume as a parameter, but we have to set it on the native <video> and <audio> elements
|
1617 |
+
if (media.pluginType === 'native') {
|
1618 |
+
media.setVolume(player.options.startVolume);
|
1619 |
+
}
|
1620 |
}
|
1621 |
}
|
1622 |
});
|
1626 |
(function($) {
|
1627 |
|
1628 |
$.extend(mejs.MepDefaults, {
|
1629 |
+
usePluginFullScreen: true,
|
1630 |
newWindowCallback: function() { return '';},
|
1631 |
fullscreenText: 'Fullscreen'
|
1632 |
});
|
1651 |
// native events
|
1652 |
if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
|
1653 |
|
1654 |
+
// chrome doesn't alays fire this in an iframe
|
1655 |
+
var target = null;
|
1656 |
+
|
1657 |
+
if (mejs.MediaFeatures.hasMozNativeFullScreen) {
|
1658 |
+
target = $(document);
|
1659 |
+
} else {
|
1660 |
+
target = player.container;
|
1661 |
+
}
|
1662 |
+
|
1663 |
+
target.bind(mejs.MediaFeatures.fullScreenEventName, function(e) {
|
1664 |
//player.container.bind('webkitfullscreenchange', function(e) {
|
1665 |
|
1666 |
|
1701 |
|
1702 |
} else {
|
1703 |
|
1704 |
+
var hideTimeout = null,
|
1705 |
+
supportsPointerEvents = (function() {
|
1706 |
+
// TAKEN FROM MODERNIZR
|
1707 |
+
var element = document.createElement('x'),
|
1708 |
+
documentElement = document.documentElement,
|
1709 |
+
getComputedStyle = window.getComputedStyle,
|
1710 |
+
supports;
|
1711 |
+
if(!('pointerEvents' in element.style)){
|
1712 |
+
return false;
|
1713 |
}
|
1714 |
+
element.style.pointerEvents = 'auto';
|
1715 |
+
element.style.pointerEvents = 'x';
|
1716 |
+
documentElement.appendChild(element);
|
1717 |
+
supports = getComputedStyle &&
|
1718 |
+
getComputedStyle(element, '').pointerEvents === 'auto';
|
1719 |
+
documentElement.removeChild(element);
|
1720 |
+
return !!supports;
|
1721 |
+
})();
|
1722 |
+
|
1723 |
+
console.log('supportsPointerEvents', supportsPointerEvents);
|
1724 |
+
|
1725 |
+
if (supportsPointerEvents && !mejs.MediaFeatures.isOpera) { // opera doesn't allow this :(
|
1726 |
+
|
1727 |
+
// allows clicking through the fullscreen button and controls down directly to Flash
|
1728 |
+
|
1729 |
+
/*
|
1730 |
+
When a user puts his mouse over the fullscreen button, the controls are disabled
|
1731 |
+
So we put a div over the video and another one on iether side of the fullscreen button
|
1732 |
+
that caputre mouse movement
|
1733 |
+
and restore the controls once the mouse moves outside of the fullscreen button
|
1734 |
+
*/
|
1735 |
+
|
1736 |
+
var fullscreenIsDisabled = false,
|
1737 |
+
restoreControls = function() {
|
1738 |
+
if (fullscreenIsDisabled) {
|
1739 |
+
// hide the hovers
|
1740 |
+
videoHoverDiv.hide();
|
1741 |
+
controlsLeftHoverDiv.hide();
|
1742 |
+
controlsRightHoverDiv.hide();
|
1743 |
+
|
1744 |
+
// restore the control bar
|
1745 |
+
fullscreenBtn.css('pointer-events', '');
|
1746 |
+
t.controls.css('pointer-events', '');
|
1747 |
+
|
1748 |
+
// store for later
|
1749 |
+
fullscreenIsDisabled = false;
|
1750 |
+
}
|
1751 |
+
},
|
1752 |
+
videoHoverDiv = $('<div class="mejs-fullscreen-hover" />').appendTo(t.container).mouseover(restoreControls),
|
1753 |
+
controlsLeftHoverDiv = $('<div class="mejs-fullscreen-hover" />').appendTo(t.container).mouseover(restoreControls),
|
1754 |
+
controlsRightHoverDiv = $('<div class="mejs-fullscreen-hover" />').appendTo(t.container).mouseover(restoreControls),
|
1755 |
+
positionHoverDivs = function() {
|
1756 |
+
var style = {position: 'absolute', top: 0, left: 0}; //, backgroundColor: '#f00'};
|
1757 |
+
videoHoverDiv.css(style);
|
1758 |
+
controlsLeftHoverDiv.css(style);
|
1759 |
+
controlsRightHoverDiv.css(style);
|
1760 |
+
|
1761 |
+
// over video, but not controls
|
1762 |
+
videoHoverDiv
|
1763 |
+
.width( t.container.width() )
|
1764 |
+
.height( t.container.height() - t.controls.height() );
|
1765 |
|
1766 |
+
// over controls, but not the fullscreen button
|
1767 |
+
var fullScreenBtnOffset = fullscreenBtn.offset().left - t.container.offset().left;
|
1768 |
+
fullScreenBtnWidth = fullscreenBtn.outerWidth(true);
|
1769 |
+
|
1770 |
+
controlsLeftHoverDiv
|
1771 |
+
.width( fullScreenBtnOffset )
|
1772 |
+
.height( t.controls.height() )
|
1773 |
+
.css({top: t.container.height() - t.controls.height()});
|
1774 |
+
|
1775 |
+
// after the fullscreen button
|
1776 |
+
controlsRightHoverDiv
|
1777 |
+
.width( t.container.width() - fullScreenBtnOffset - fullScreenBtnWidth )
|
1778 |
+
.height( t.controls.height() )
|
1779 |
+
.css({top: t.container.height() - t.controls.height(),
|
1780 |
+
left: fullScreenBtnOffset + fullScreenBtnWidth});
|
1781 |
+
};
|
1782 |
|
1783 |
+
$(document).resize(function() {
|
1784 |
+
positionHoverDivs();
|
1785 |
+
});
|
1786 |
+
|
1787 |
+
// on hover, kill the fullscreen button's HTML handling, allowing clicks down to Flash
|
1788 |
+
fullscreenBtn
|
1789 |
+
.mouseover(function() {
|
1790 |
+
|
1791 |
+
if (!t.isFullScreen) {
|
1792 |
+
|
1793 |
+
var buttonPos = fullscreenBtn.offset(),
|
1794 |
+
containerPos = player.container.offset();
|
1795 |
+
|
1796 |
+
// move the button in Flash into place
|
1797 |
+
media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, false);
|
1798 |
+
|
1799 |
+
// allows click through
|
1800 |
+
fullscreenBtn.css('pointer-events', 'none');
|
1801 |
+
t.controls.css('pointer-events', 'none');
|
1802 |
+
|
1803 |
+
// show the divs that will restore things
|
1804 |
+
videoHoverDiv.show();
|
1805 |
+
controlsRightHoverDiv.show();
|
1806 |
+
controlsLeftHoverDiv.show();
|
1807 |
+
positionHoverDivs();
|
1808 |
+
|
1809 |
+
fullscreenIsDisabled = true;
|
1810 |
+
}
|
1811 |
+
|
1812 |
+
});
|
1813 |
|
1814 |
+
// restore controls anytime the user enters or leaves fullscreen
|
1815 |
+
media.addEventListener('fullscreenchange', function(e) {
|
1816 |
+
restoreControls();
|
1817 |
+
});
|
1818 |
+
|
1819 |
+
|
1820 |
+
// the mouseout event doesn't work on the fullscren button, because we already killed the pointer-events
|
1821 |
+
// so we use the document.mousemove event to restore controls when the mouse moves outside the fullscreen button
|
1822 |
+
/*
|
1823 |
+
$(document).mousemove(function(e) {
|
1824 |
|
1825 |
+
// if the mouse is anywhere but the fullsceen button, then restore it all
|
1826 |
+
if (fullscreenIsDisabled) {
|
1827 |
+
|
1828 |
+
var fullscreenBtnPos = fullscreenBtn.offset();
|
1829 |
+
|
1830 |
+
|
1831 |
+
if (e.pageY < fullscreenBtnPos.top || e.pageY > fullscreenBtnPos.top + fullscreenBtn.outerHeight(true) ||
|
1832 |
+
e.pageX < fullscreenBtnPos.left || e.pageX > fullscreenBtnPos.left + fullscreenBtn.outerWidth(true)
|
1833 |
+
) {
|
1834 |
+
|
1835 |
+
fullscreenBtn.css('pointer-events', '');
|
1836 |
+
t.controls.css('pointer-events', '');
|
1837 |
+
|
1838 |
+
fullscreenIsDisabled = false;
|
1839 |
+
}
|
1840 |
+
}
|
1841 |
+
});
|
1842 |
+
*/
|
1843 |
+
|
1844 |
+
|
1845 |
+
} else {
|
1846 |
+
|
1847 |
+
// the hover state will show the fullscreen button in Flash to hover up and click
|
1848 |
+
|
1849 |
+
fullscreenBtn
|
1850 |
+
.mouseover(function() {
|
1851 |
+
|
1852 |
+
if (hideTimeout !== null) {
|
1853 |
+
clearTimeout(hideTimeout);
|
1854 |
+
delete hideTimeout;
|
1855 |
+
}
|
1856 |
+
|
1857 |
+
var buttonPos = fullscreenBtn.offset(),
|
1858 |
+
containerPos = player.container.offset();
|
1859 |
+
|
1860 |
+
media.positionFullscreenButton(buttonPos.left - containerPos.left, buttonPos.top - containerPos.top, true);
|
1861 |
|
1862 |
+
})
|
1863 |
+
.mouseout(function() {
|
1864 |
|
1865 |
+
if (hideTimeout !== null) {
|
1866 |
+
clearTimeout(hideTimeout);
|
1867 |
+
delete hideTimeout;
|
1868 |
+
}
|
1869 |
+
|
1870 |
+
hideTimeout = setTimeout(function() {
|
1871 |
+
media.hideFullscreenButton();
|
1872 |
+
}, 1500);
|
1873 |
+
|
1874 |
+
|
1875 |
+
});
|
1876 |
+
}
|
1877 |
}
|
1878 |
|
1879 |
player.fullscreenBtn = fullscreenBtn;
|
1912 |
mejs.MediaFeatures.requestFullScreen(t.container[0]);
|
1913 |
//return;
|
1914 |
|
1915 |
+
if (t.isInIframe) {
|
1916 |
+
// sometimes exiting from fullscreen doesn't work
|
1917 |
+
// notably in Chrome <iframe>. Fixed in version 17
|
1918 |
+
setTimeout(function checkFullscreen() {
|
1919 |
+
|
1920 |
+
if (t.isNativeFullScreen) {
|
1921 |
+
|
1922 |
+
// check if the video is suddenly not really fullscreen
|
1923 |
+
if ($(window).width() !== screen.width) {
|
1924 |
+
// manually exit
|
1925 |
+
t.exitFullScreen();
|
1926 |
+
} else {
|
1927 |
+
// test again
|
1928 |
+
setTimeout(checkFullscreen, 500);
|
1929 |
+
}
|
1930 |
+
}
|
1931 |
+
|
1932 |
+
|
1933 |
+
}, 500);
|
1934 |
+
}
|
1935 |
+
|
1936 |
} else if (mejs.MediaFeatures.hasSemiNativeFullScreen) {
|
1937 |
t.media.webkitEnterFullscreen();
|
1938 |
return;
|
2182 |
// chapters
|
2183 |
if (player.hasChapters) {
|
2184 |
player.chapters.css('visibility','visible');
|
2185 |
+
player.chapters.fadeIn(200).height(player.chapters.find('.mejs-chapter').outerHeight());
|
2186 |
}
|
2187 |
},
|
2188 |
function () {
|
2323 |
for (i=0; i<track.entries.times.length; i++) {
|
2324 |
if (t.media.currentTime >= track.entries.times[i].start && t.media.currentTime <= track.entries.times[i].stop){
|
2325 |
t.captionsText.html(track.entries.text[i]);
|
2326 |
+
t.captions.show().height(0);
|
2327 |
return; // exit out if one is visible;
|
2328 |
}
|
2329 |
}
|
2524 |
return entries;
|
2525 |
}
|
2526 |
};
|
2527 |
+
|
2528 |
+
// test for browsers with bad String.split method.
|
2529 |
+
if ('x\n\ny'.split(/\n/gi).length != 3) {
|
2530 |
+
// add super slow IE8 and below version
|
2531 |
+
mejs.TrackFormatParser.split2 = function(text, regex) {
|
2532 |
+
var
|
2533 |
+
parts = [],
|
2534 |
+
chunk = '',
|
2535 |
+
i;
|
2536 |
+
|
2537 |
+
for (i=0; i<text.length; i++) {
|
2538 |
+
chunk += text.substring(i,i+1);
|
2539 |
+
if (regex.test(chunk)) {
|
2540 |
+
parts.push(chunk.replace(regex, ''));
|
2541 |
+
chunk = '';
|
2542 |
+
}
|
2543 |
+
}
|
2544 |
+
parts.push(chunk);
|
2545 |
+
return parts;
|
2546 |
+
}
|
2547 |
+
}
|
2548 |
|
2549 |
})(mejs.$);
|
2550 |
|
2557 |
(function($) {
|
2558 |
|
2559 |
$.extend(mejs.MepDefaults,
|
2560 |
+
{ 'contextMenuItems': [
|
2561 |
// demo of a fullscreen option
|
2562 |
{
|
2563 |
render: function(player) {
|
2612 |
window.location.href = player.media.currentSrc;
|
2613 |
}
|
2614 |
}
|
2615 |
+
]}
|
2616 |
);
|
2617 |
|
2618 |
|
mediaelement/mediaelementplayer.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;text-align:left;vertical-align:top;}.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%;}.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.png) no-repeat;}.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;}.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.png) no-repeat;}.mejs-controls .mejs-button button:focus{outline:solid 1px yellow;}.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;}.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;}.mejs-controls .mejs-play button{background-position:0 0;}.mejs-controls .mejs-pause button{background-position:0 -16px;}.mejs-controls .mejs-stop button{background-position:-112px 0;}.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-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-controls .mejs-fullscreen-button button{background-position:-32px 0;}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px;}.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 .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;}.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;}.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 .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;}.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:#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;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);}.mejs-clear{clear:both;}.me-cannotplay a{color:#fff;font-weight:bold;}.me-cannotplay span{padding:15px;display:block;}.mejs-controls .mejs-loop-off button{background-position:-64px -16px;}.mejs-controls .mejs-loop-on button{background-position:-64px 0;}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px;}.mejs-controls .mejs-backlight-on button{background-position:-80px 0;}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0;}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001;}.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;}.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;}
|
1 |
+
.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;text-align:left;vertical-align:top;}.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%;}.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.png) no-repeat;}.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;}.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.png) no-repeat;}.mejs-controls .mejs-button button:focus{outline:solid 1px yellow;}.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;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-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;}.mejs-controls .mejs-play button{background-position:0 0;}.mejs-controls .mejs-pause button{background-position:0 -16px;}.mejs-controls .mejs-stop button{background-position:-112px 0;}.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-controls .mejs-fullscreen-button button{background-position:-32px 0;}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px;}.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 .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;}.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;}.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 .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:#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;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);}.mejs-clear{clear:both;}.me-cannotplay a{color:#fff;font-weight:bold;}.me-cannotplay span{padding:15px;display:block;}.mejs-controls .mejs-loop-off button{background-position:-64px -16px;}.mejs-controls .mejs-loop-on button{background-position:-64px 0;}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px;}.mejs-controls .mejs-backlight-on button{background-position:-80px 0;}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0;}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001;}.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;}.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;}
|
mediaelement/mediaelementplayer.min.js
CHANGED
@@ -5,76 +5,84 @@
|
|
5 |
* Creates a controller bar for HTML5 <video> add <audio> tags
|
6 |
* using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
|
7 |
*
|
8 |
-
* Copyright 2010-
|
9 |
* Dual licensed under the MIT or GPL Version 2 licenses.
|
10 |
*
|
11 |
*/if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
|
12 |
(function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks",
|
13 |
-
"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()}b.setCurrentTime(Math.
|
14 |
-
|
15 |
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);mejs.players.push(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)}}),
|
16 |
-
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");
|
17 |
-
|
18 |
-
a
|
19 |
-
|
20 |
-
"visible").
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
c.
|
25 |
-
function(){
|
26 |
-
function(
|
27 |
-
function(){
|
28 |
-
|
29 |
-
|
30 |
-
this
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
d.addEventListener("waiting",function(){e.show()},false);d.addEventListener("loadeddata",function(){e.show()},false);d.addEventListener("canplay",function(){e.hide()},false);d.addEventListener("error",function(){e.hide();g.show();g.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,d){f(document).keydown(function(e){if(a.hasFocus&&
|
35 |
-
|
36 |
-
"mejs-container "+a;this.setPlayerSize();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)},
|
37 |
-
"flash")this.media.remove();else this.media.
|
|
|
38 |
(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+'"></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);
|
39 |
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.$);
|
40 |
-
(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+"></button></div>
|
41 |
b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$);
|
42 |
-
(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-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);
|
43 |
-
|
44 |
-
|
45 |
-
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()*
|
46 |
-
this.total.width()*this.media.currentTime/this.media.duration,b=a-this.handle.outerWidth(true)/2;this.current.width(a);this.handle.css("left",b)}}})})(mejs.$);
|
47 |
-
(function(f){f.extend(mejs.MepDefaults,{duration:-1});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,
|
48 |
-
0)f('
|
49 |
-
(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()},
|
50 |
-
this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){if(this.media.duration&&this.durationD)this.durationD.html(mejs.Utility.secondsToTimeCode(this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
|
51 |
-
(function(f){f.extend(mejs.MepDefaults,{muteText:"Mute Toggle",hideVolumeOnTouchDevices:true});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,d){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var e=f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+this.id+'" title="'+this.options.muteText+
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
(function(
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
a.
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:"Captions/Subtitles"});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,d){if(a.isVideo)if(a.tracks.length!=0){var e;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"><span class="mejs-captions-text"></span></div></div>').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");
|
64 |
a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+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).hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},function(){f(this).find(".mejs-captions-selector").css("visibility",
|
65 |
"hidden")}).delegate("input[type=radio]","click",function(){lang=this.value;if(lang=="none")a.selectedTrack=null;else for(e=0;e<a.tracks.length;e++)if(a.tracks[e].srclang==lang){a.selectedTrack=a.tracks[e];a.captions.attr("lang",a.selectedTrack.srclang);a.displayCaptions();break}});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("mouseenter",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("mouseleave",
|
66 |
function(){d.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(e=0;e<a.tracks.length;e++)a.tracks[e].kind=="subtitles"&&a.addTrackButton(a.tracks[e].srclang,a.tracks[e].label);a.loadNextTrack();d.addEventListener("timeupdate",function(){a.displayCaptions()},false);d.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility",
|
67 |
-
"visible");a.chapters.fadeIn(200)}},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")}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else this.isLoadingTrack=false},loadTrack:function(a){var b=
|
68 |
-
true;b.enableTrackButton(c.srclang,c.label);b.loadNextTrack()};c.isTranslation?mejs.TrackFormatParser.translateTrackText(b.tracks[0].entries,b.tracks[0].srclang,c.srclang,b.options.googleApiKey,function(e){c.entries=e;d()}):f.ajax({url:c.src,success:function(e){c.entries=mejs.TrackFormatParser.parse(e);d();c.kind=="chapters"&&b.media.duration>0&&b.drawChapters(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||
|
69 |
-
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();
|
70 |
-
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))},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&&
|
71 |
-
this.captions.show();return}this.captions.hide()}},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/
|
72 |
-
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)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+
|
73 |
-
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",
|
74 |
-
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={pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,
|
75 |
-
split2:function(a,b){return a.split(b)},parse:function(a){var b=0;a=this.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++}c.text.push(e);c.times.push({start:mejs.Utility.timeCodeToSeconds(d[1]),stop:mejs.Utility.timeCodeToSeconds(d[3]),
|
76 |
-
(
|
|
|
77 |
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()})},isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=
|
78 |
-
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,
|
79 |
-
|
80 |
"undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
|
5 |
* Creates a controller bar for HTML5 <video> add <audio> tags
|
6 |
* using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
|
7 |
*
|
8 |
+
* Copyright 2010-2012, John Dyer (http://j.hn/)
|
9 |
* Dual licensed under the MIT or GPL Version 2 licenses.
|
10 |
*
|
11 |
*/if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
|
12 |
(function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks",
|
13 |
+
"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()}b.setCurrentTime(Math.max(b.currentTime-b.duration*0.05,0))}}},{keys:[39,
|
14 |
+
228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}b.setCurrentTime(Math.min(b.currentTime+b.duration*0.05,b.duration))}}},{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);
|
15 |
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);mejs.players.push(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)}}),
|
16 |
+
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.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.id="mep_"+mejs.mepIndex++;a.container=f('<div id="'+a.id+'" class="mejs-container"><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);
|
17 |
+
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=d.substring(0,1).toUpperCase()+d.substring(1);
|
18 |
+
a.width=a.options[d+"Width"]>0||a.options[d+"Width"].toString().indexOf("%")>-1?a.options[d+"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"+b+"Width"];a.height=a.options[d+"Height"]>0||a.options[d+"Height"].toString().indexOf("%")>-1?a.options[d+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!==null?a.$media.attr("height"):
|
19 |
+
a.options["default"+b+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.height;c.pluginHeight=a.width}mejs.MediaElement(a.$media[0],c)},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.find(".mejs-control").css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility",
|
20 |
+
"visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true}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.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display",
|
21 |
+
"block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false}},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;
|
22 |
+
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)&&
|
23 |
+
!(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);
|
24 |
+
else c.controlsEnabled&&c.showControls(false)});else{(c.media.pluginType=="native"?c.$media:f(c.media.pluginElement)).click(function(){a.paused?a.play():a.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",
|
25 |
+
function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControls&&c.startControlsTimer(1E3)})}e&&!c.options.alwaysShowControls&&c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(h){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(h.target.videoHeight)){c.setPlayerSize(h.target.videoWidth,h.target.videoHeight);c.setControlsSize();c.media.setVideoSize(h.target.videoWidth,h.target.videoHeight)}},false)}a.addEventListener("play",
|
26 |
+
function(){for(var h=0,o=mejs.players.length;h<o;h++){var n=mejs.players[h];n.id!=c.id&&c.options.pauseOtherPlayers&&!n.paused&&!n.ended&&n.pause();n.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){try{c.media.setCurrentTime(0)}catch(h){}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",
|
27 |
+
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);f(window).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&&
|
28 |
+
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){var c=this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth,
|
29 |
+
d=this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight,e=this.container.parent().width();c=parseInt(e*d/c,10);if(this.container.parent()[0].tagName.toLowerCase()==="body"){e=f(window).width();c=f(window).height()}this.container.width(e).height(c);this.$media.width("100%").height("100%");this.container.find("object, embed, iframe").width("100%").height("100%");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);
|
30 |
+
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(){if(f(this).css("position")!="absolute")a+=f(this).outerWidth(true)});b=this.controls.width()-a-(c.outerWidth(true)-
|
31 |
+
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==
|
32 |
+
0)c=f('<img width="100%" height="100%" />').appendTo(b);c.attr("src",a)},buildoverlays:function(a,b,c,d){if(a.isVideo){var e=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(c),g=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(c),k=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(c).click(function(){d.paused?d.play():
|
33 |
+
d.pause()});d.addEventListener("play",function(){k.hide();e.hide();b.find(".mejs-time-buffering").hide();g.hide()},false);d.addEventListener("playing",function(){k.hide();e.hide();b.find(".mejs-time-buffering").hide();g.hide()},false);d.addEventListener("seeking",function(){e.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("seeked",function(){e.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||k.show()},
|
34 |
+
false);d.addEventListener("waiting",function(){e.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("loadeddata",function(){e.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("canplay",function(){e.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener("error",function(){e.hide();b.find(".mejs-time-buffering").hide();g.show();g.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,d){f(document).keydown(function(e){if(a.hasFocus&&
|
35 |
+
a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g<k;g++)for(var h=a.options.keyActions[g],o=0,n=h.keys.length;o<n;o++)if(e.keyCode==h.keys[o]){e.preventDefault();h.action(a,d);return false}return true});f(document).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").toLowerCase(),src:d.attr("src"),kind:d.attr("kind"),
|
36 |
+
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)},
|
37 |
+
getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){if(this.media.pluginType=="flash")this.media.remove();else this.media.pluginType=="native"&&this.media.prop("controls",true);this.isDynamic||this.$node.insertBefore(this.container);this.container.remove()}};if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){return this.each(function(){new mejs.MediaElementPlayer(this,a)})};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});
|
38 |
+
window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
|
39 |
(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+'"></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);
|
40 |
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.$);
|
41 |
+
(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+'"></button></div>').appendTo(b).click(function(){d.paused||d.pause();if(d.currentTime>0){d.setCurrentTime(0);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));
|
42 |
b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$);
|
43 |
+
(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=
|
44 |
+
b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var g=b.find(".mejs-time-current"),k=b.find(".mejs-time-handle"),h=b.find(".mejs-time-float"),o=b.find(".mejs-time-float-current"),n=function(l){l=l.pageX;var q=e.offset(),i=e.outerWidth(),j=0;j=0;var m=l-q.left;if(l>q.left&&l<=i+q.left&&d.duration){j=(l-q.left)/i;j=j<=0.02?0:j*d.duration;p&&d.setCurrentTime(j);if(!mejs.MediaFeatures.hasTouch){h.css("left",m);o.html(mejs.Utility.secondsToTimeCode(j));h.show()}}},p=false;e.bind("mousedown",function(l){if(l.which===
|
45 |
+
1){p=true;n(l);f(document).bind("mousemove.dur",function(q){n(q)}).bind("mouseup.dur",function(){p=false;h.hide();f(document).unbind(".dur")});return false}}).bind("mouseenter",function(){f(document).bind("mousemove.dur",function(l){n(l)});mejs.MediaFeatures.hasTouch||h.show()}).bind("mouseleave",function(){if(!p){f(document).unbind(".dur");h.hide()}});d.addEventListener("progress",function(l){a.setProgressRail(l);a.setCurrentRail(l)},false);d.addEventListener("timeupdate",function(l){a.setProgressRail(l);
|
46 |
+
a.setCurrentRail(l)},false);this.loaded=c;this.total=e;this.current=g;this.handle=k},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()*
|
47 |
+
c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=this.total.width()*this.media.currentTime/this.media.duration,b=a-this.handle.outerWidth(true)/2;this.current.width(a);this.handle.css("left",b)}}})})(mejs.$);
|
48 |
+
(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,
|
49 |
+
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");
|
50 |
+
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()},
|
51 |
+
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(){if(this.media.duration&&this.durationD)this.durationD.html(mejs.Utility.secondsToTimeCode(this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
|
52 |
+
(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.isVideo?this.options.videoVolume:this.options.audioVolume,g=e=="horizontal"?f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+this.id+'" title="'+this.options.muteText+
|
53 |
+
'"></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="'+this.id+'" title="'+this.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),
|
54 |
+
k=this.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),h=this.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),o=this.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),n=this.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),p=function(j,m){if(!k.is(":visible")&&typeof m!="undefined"){k.show();p(j,true);k.hide()}else{j=Math.max(0,j);j=Math.min(j,1);j==0?g.removeClass("mejs-mute").addClass("mejs-unmute"):g.removeClass("mejs-unmute").addClass("mejs-mute");
|
55 |
+
if(e=="vertical"){var r=h.height(),s=h.position(),t=r-r*j;n.css("top",s.top+t-n.height()/2);o.height(r-t);o.css("top",s.top+t)}else{r=h.width();s=h.position();r=r*j;n.css("left",s.left+r-n.width()/2);o.width(r)}}},l=function(j){var m=null,r=h.offset();if(e=="vertical"){m=h.height();parseInt(h.css("top").replace(/px/,""),10);m=(m-(j.pageY-r.top))/m;if(r.top==0||r.left==0)return}else{m=h.width();m=(j.pageX-r.left)/m}m=Math.max(0,m);m=Math.min(m,1);p(m);m==0?d.setMuted(true):d.setMuted(false);d.setVolume(m)},
|
56 |
+
q=false,i=false;g.hover(function(){k.show();i=true},function(){i=false;!q&&e=="vertical"&&k.hide()});k.bind("mouseover",function(){i=true}).bind("mousedown",function(j){l(j);f(document).bind("mousemove.vol",function(m){l(m)}).bind("mouseup.vol",function(){q=false;f(document).unbind(".vol");!i&&e=="vertical"&&k.hide()});q=true;return false});g.find("button").click(function(){d.setMuted(!d.muted)});d.addEventListener("volumechange",function(){if(!q)if(d.muted){p(0);g.removeClass("mejs-mute").addClass("mejs-unmute")}else{p(d.volume);
|
57 |
+
g.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(this.container.is(":visible")){p(a.options.startVolume);d.pluginType==="native"&&d.setVolume(a.options.startVolume)}}}})})(mejs.$);
|
58 |
+
(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:"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=null;c=mejs.MediaFeatures.hasMozNativeFullScreen?f(document):a.container;c.bind(mejs.MediaFeatures.fullScreenEventName,
|
59 |
+
function(){if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen=false;a.exitFullScreen()}})}var e=this,g=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+e.id+'" title="'+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()||
|
60 |
+
a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;b=function(){var i=document.createElement("x"),j=document.documentElement,m=window.getComputedStyle;if(!("pointerEvents"in i.style))return false;i.style.pointerEvents="auto";i.style.pointerEvents="x";j.appendChild(i);m=m&&m(i,"").pointerEvents==="auto";j.removeChild(i);return!!m}();console.log("supportsPointerEvents",b);if(b&&!mejs.MediaFeatures.isOpera){var h=false,o=function(){if(h){n.hide();p.hide();l.hide();g.css("pointer-events",
|
61 |
+
"");e.controls.css("pointer-events","");h=false}},n=f('<div class="mejs-fullscreen-hover" />').appendTo(e.container).mouseover(o),p=f('<div class="mejs-fullscreen-hover" />').appendTo(e.container).mouseover(o),l=f('<div class="mejs-fullscreen-hover" />').appendTo(e.container).mouseover(o),q=function(){var i={position:"absolute",top:0,left:0};n.css(i);p.css(i);l.css(i);n.width(e.container.width()).height(e.container.height()-e.controls.height());i=g.offset().left-e.container.offset().left;fullScreenBtnWidth=
|
62 |
+
g.outerWidth(true);p.width(i).height(e.controls.height()).css({top:e.container.height()-e.controls.height()});l.width(e.container.width()-i-fullScreenBtnWidth).height(e.controls.height()).css({top:e.container.height()-e.controls.height(),left:i+fullScreenBtnWidth})};f(document).resize(function(){q()});g.mouseover(function(){if(!e.isFullScreen){var i=g.offset(),j=a.container.offset();d.positionFullscreenButton(i.left-j.left,i.top-j.top,false);g.css("pointer-events","none");e.controls.css("pointer-events",
|
63 |
+
"none");n.show();l.show();p.show();q();h=true}});d.addEventListener("fullscreenchange",function(){o()})}else g.mouseover(function(){if(k!==null){clearTimeout(k);delete k}var i=g.offset(),j=a.container.offset();d.positionFullscreenButton(i.left-j.left,i.top-j.top,true)}).mouseout(function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){d.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;f(document).bind("keydown",function(i){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||
|
64 |
+
e.isFullScreen)&&i.keyCode==27)a.exitFullScreen()})}},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&&
|
65 |
+
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")}},
|
66 |
+
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%");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("object, embed, iframe").width("100%").height("100%");a.media.setVideoSize(f(window).width(),
|
67 |
+
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(){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=
|
68 |
+
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=
|
69 |
+
false}}})})(mejs.$);
|
70 |
(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:"Captions/Subtitles"});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,d){if(a.isVideo)if(a.tracks.length!=0){var e;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"><span class="mejs-captions-text"></span></div></div>').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");
|
71 |
a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+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).hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},function(){f(this).find(".mejs-captions-selector").css("visibility",
|
72 |
"hidden")}).delegate("input[type=radio]","click",function(){lang=this.value;if(lang=="none")a.selectedTrack=null;else for(e=0;e<a.tracks.length;e++)if(a.tracks[e].srclang==lang){a.selectedTrack=a.tracks[e];a.captions.attr("lang",a.selectedTrack.srclang);a.displayCaptions();break}});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("mouseenter",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("mouseleave",
|
73 |
function(){d.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(e=0;e<a.tracks.length;e++)a.tracks[e].kind=="subtitles"&&a.addTrackButton(a.tracks[e].srclang,a.tracks[e].label);a.loadNextTrack();d.addEventListener("timeupdate",function(){a.displayCaptions()},false);d.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility",
|
74 |
+
"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")}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else this.isLoadingTrack=false},loadTrack:function(a){var b=
|
75 |
+
this,c=b.tracks[a],d=function(){c.isLoaded=true;b.enableTrackButton(c.srclang,c.label);b.loadNextTrack()};c.isTranslation?mejs.TrackFormatParser.translateTrackText(b.tracks[0].entries,b.tracks[0].srclang,c.srclang,b.options.googleApiKey,function(e){c.entries=e;d()}):f.ajax({url:c.src,success:function(e){c.entries=mejs.TrackFormatParser.parse(e);d();c.kind=="chapters"&&b.media.duration>0&&b.drawChapters(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||
|
76 |
+
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();
|
77 |
+
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))},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&&
|
78 |
+
this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},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/
|
79 |
+
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)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+
|
80 |
+
"</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",
|
81 |
+
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={pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,
|
82 |
+
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})?)(.*)$/,split2:function(a,b){return a.split(b)},parse:function(a){var b=0;a=this.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++}c.text.push(e);c.times.push({start:mejs.Utility.timeCodeToSeconds(d[1]),stop:mejs.Utility.timeCodeToSeconds(d[3]),
|
83 |
+
settings:d[5]})}}return c}};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.$);
|
84 |
+
(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}}]});
|
85 |
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()})},isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=
|
86 |
+
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<
|
87 |
+
k;g++)if(e[g].isSeparator)d+='<div class="mejs-contextmenu-separator"></div>';else{var h=e[g].render(c);if(h!=null)d+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+Math.random()*1E6+'">'+h+"</div>"}c.contextMenu.empty().append(f(d)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var o=f(this),n=parseInt(o.data("itemindex"),10),p=c.options.contextMenuItems[n];typeof p.show!="undefined"&&p.show(o,c);o.click(function(){typeof p.click!=
|
88 |
"undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://mediaelementjs.com/
|
|
4 |
Tags: html5, video, audio, player, flash, mp4, mp3, ogg, webm, wmv, captions, subtitles, websrt, srt, accessible, Silverlight, javascript,
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.3
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
MediaElement.js is an HTML5 video and audio player with Flash fallback and captions. Supports IE, Firefox, Opera, Safari, Chrome and iPhone, iPad, Android.
|
10 |
|
4 |
Tags: html5, video, audio, player, flash, mp4, mp3, ogg, webm, wmv, captions, subtitles, websrt, srt, accessible, Silverlight, javascript,
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.3
|
7 |
+
Stable tag: 2.9.1
|
8 |
|
9 |
MediaElement.js is an HTML5 video and audio player with Flash fallback and captions. Supports IE, Firefox, Opera, Safari, Chrome and iPhone, iPad, Android.
|
10 |
|