diff --git src/wp-includes/js/mediaelement/mediaelement-and-player.js src/wp-includes/js/mediaelement/mediaelement-and-player.js
index be8e58e966..59869c4b31 100644
|
|
module.exports = win; |
56 | 56 | var setTimeoutFunc = setTimeout; |
57 | 57 | |
58 | 58 | function noop() {} |
59 | | |
| 59 | |
60 | 60 | // Polyfill for Function.prototype.bind |
61 | 61 | function bind(fn, thisArg) { |
62 | 62 | return function () { |
… |
… |
module.exports = win; |
274 | 274 | Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) { |
275 | 275 | Promise._unhandledRejectionFn = fn; |
276 | 276 | }; |
277 | | |
| 277 | |
278 | 278 | if (typeof module !== 'undefined' && module.exports) { |
279 | 279 | module.exports = Promise; |
280 | 280 | } else if (!root.Promise) { |
… |
… |
i18n.language = function () { |
315 | 315 | throw new TypeError('Language code must be a string value'); |
316 | 316 | } |
317 | 317 | |
318 | | if (!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(args[0])) { |
| 318 | if (!/^[a-z]{2,3}((\-|_)[a-z]{2})?/i.test(args[0])) { |
319 | 319 | throw new TypeError('Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters'); |
320 | 320 | } |
321 | 321 | |
322 | 322 | i18n.lang = args[0]; |
323 | 323 | |
| 324 | // Catch non-conformant locales, e.g. de-de-formal. |
| 325 | if ((i18n[args[0]] === undefined) && !/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(args[0])) { |
| 326 | args[0] = args[0].replace(/^([a-z]{2,3}((\-|_)[a-z]{2})?).*/i, '$1'); |
| 327 | i18n.lang = args[0]; |
| 328 | } |
| 329 | |
324 | 330 | if (i18n[args[0]] === undefined) { |
325 | 331 | args[1] = args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object' ? args[1] : {}; |
326 | 332 | i18n[args[0]] = !(0, _general.isObjectEmpty)(args[1]) ? args[1] : _en.EN; |
… |
… |
var MediaElementPlayer = function () { |
4152 | 4158 | } |
4153 | 4159 | }, 20); |
4154 | 4160 | } catch (exp) { |
4155 | | |
| 4161 | |
4156 | 4162 | } |
4157 | 4163 | } |
4158 | 4164 | |
… |
… |
var PluginDetector = exports.PluginDetector = { |
5836 | 5842 | version = axDetect(ax); |
5837 | 5843 | } |
5838 | 5844 | } catch (e) { |
5839 | | |
| 5845 | |
5840 | 5846 | } |
5841 | 5847 | } |
5842 | 5848 | return version; |
… |
… |
var FlashMediaElementRenderer = { |
5907 | 5913 | try { |
5908 | 5914 | flash.flashApi['set_' + propName](value); |
5909 | 5915 | } catch (e) { |
5910 | | |
| 5916 | |
5911 | 5917 | } |
5912 | 5918 | } else { |
5913 | 5919 | flash.flashApiStack.push({ |
… |
… |
var FlashMediaElementRenderer = { |
5932 | 5938 | try { |
5933 | 5939 | flash.flashApi['fire_' + methodName](); |
5934 | 5940 | } catch (e) { |
5935 | | |
| 5941 | |
5936 | 5942 | } |
5937 | 5943 | } else { |
5938 | | |
| 5944 | |
5939 | 5945 | } |
5940 | 5946 | } else { |
5941 | 5947 | flash.flashApiStack.push({ |
… |
… |
var YouTubeIframeRenderer = { |
7150 | 7156 | mediaElement.dispatchEvent(event); |
7151 | 7157 | break; |
7152 | 7158 | default: |
7153 | | |
| 7159 | |
7154 | 7160 | break; |
7155 | 7161 | } |
7156 | 7162 | } else { |