/*! * MediaElement.js * http://www.mediaelementjs.com/ * * Wrapper that mimics native HTML5 MediaElement (audio and video) * using a variety of technologies (pure JavaScript, Flash, iframe) * * Copyright 2010-2017, John Dyer (http://j.hn/) * License: MIT * */(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o' + getSpeedNameFromValue(t.options.defaultSpeed) + '') + ('
') + ('') + '
'; t.addControlElement(player.speedButton, 'speed'); for (var _i = 0, _total = speeds.length; _i < _total; _i++) { var inputId = t.id + '-speed-' + speeds[_i].value; player.speedButton.querySelector('ul').innerHTML += '
  • ' + ('') + ('') + '
  • '; } playbackSpeed = t.options.defaultSpeed; player.speedSelector = player.speedButton.querySelector('.' + t.options.classPrefix + 'speed-selector'); var inEvents = ['mouseenter', 'focusin'], outEvents = ['mouseleave', 'focusout'], radios = player.speedButton.querySelectorAll('input[type="radio"]'), labels = player.speedButton.querySelectorAll('.' + t.options.classPrefix + 'speed-selector-label'); for (var _i2 = 0, _total2 = inEvents.length; _i2 < _total2; _i2++) { player.speedButton.addEventListener(inEvents[_i2], function () { mejs.Utils.removeClass(player.speedSelector, t.options.classPrefix + 'offscreen'); player.speedSelector.style.height = player.speedSelector.querySelector('ul').offsetHeight; player.speedSelector.style.top = -1 * parseFloat(player.speedSelector.offsetHeight) + 'px'; }); } for (var _i3 = 0, _total3 = outEvents.length; _i3 < _total3; _i3++) { player.speedSelector.addEventListener(outEvents[_i3], function () { mejs.Utils.addClass(this, t.options.classPrefix + 'offscreen'); }); } for (var _i4 = 0, _total4 = radios.length; _i4 < _total4; _i4++) { var radio = radios[_i4]; radio.disabled = false; radio.addEventListener('click', function () { var self = this, newSpeed = self.value; playbackSpeed = newSpeed; media.playbackRate = parseFloat(newSpeed); player.speedButton.querySelector('button').innerHTML = getSpeedNameFromValue(newSpeed); var selected = player.speedButton.querySelectorAll('.' + t.options.classPrefix + 'speed-selected'); for (var _i5 = 0, _total5 = selected.length; _i5 < _total5; _i5++) { mejs.Utils.removeClass(selected[_i5], t.options.classPrefix + 'speed-selected'); } self.checked = true; var siblings = mejs.Utils.siblings(self, function (el) { return mejs.Utils.hasClass(el, t.options.classPrefix + 'speed-selector-label'); }); for (var j = 0, _total6 = siblings.length; j < _total6; j++) { mejs.Utils.addClass(siblings[j], t.options.classPrefix + 'speed-selected'); } }); } for (var _i6 = 0, _total7 = labels.length; _i6 < _total7; _i6++) { labels[_i6].addEventListener('click', function () { var radio = mejs.Utils.siblings(this, function (el) { return el.tagName === 'INPUT'; })[0], event = mejs.Utils.createEvent('click', radio); radio.dispatchEvent(event); }); } player.speedSelector.addEventListener('keydown', function (e) { e.stopPropagation(); }); media.addEventListener('loadedmetadata', function () { if (playbackSpeed) { media.playbackRate = parseFloat(playbackSpeed); } }); }, cleanspeed: function cleanspeed(player) { if (player) { if (player.speedButton) { player.speedButton.parentNode.removeChild(player.speedButton); } if (player.speedSelector) { player.speedSelector.parentNode.removeChild(player.speedSelector); } } } }); },{}]},{},[1]);