1001* @param {Function} okFunc - do okFunc1002*/1003function t_videoprocessor__onFuncLoad(obj, okFunc) {1004var timer;1005if (typeof window[obj] === 'object' && typeof window[obj].Player === 'function') {1006okFunc();1007} else {1008timer = setInterval(function () {1009if (typeof window[obj] === 'object' && typeof window[obj].Player === 'function') {1010okFunc();1011clearInterval(timer);1012
timer = 0; } }, 100); } window.addEventListener('load', function () { setTimeout(function () { if (timer) { if (typeof window[obj] === 'object' && typeof window[obj].Player === 'function') { okFunc(); clearInterval(timer); } else { clearInterval(timer); throw new Error(obj + ' is undefined'); } } }, 5000); });}if (!Element.prototype.matches) { Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.msMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.webkitMatchesSelector || Element.prototype.oMatchesSelector;}// Polyfill: Element.closestif (!Element.prototype.closest) { Element.prototype.closest = function (s) { var el = this; while (el && el.nodeType === 1) { if (Element.prototype.matches.call(el, s)) { return el; } el = el.parentElement || el.parentNode; } return null; };}