UNPKG

ovenplayer

Version:

OvenPlayer is Open-Source HTML5 Player. OvenPlayer supports WebRTC Signaling from OvenMediaEngine for Sub-Second Latency Streaming.

1 lines 557 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OvenPlayer=t():e.OvenPlayer=t()}(self,(function(){return function(){var e={63166:function(e,t,n){"use strict";n.d(t,{default:function(){return vr}});var r="0.10.46-beta.0",o=n(69986),i=n.n(o);function a(e){return e?e.replace(/^\s+|\s+$/g,""):""}var s=function(e){if(!e||"rtmp"==e.substr(0,4))return"";var t=function(e){var t="";return/[(,]format=mpd-/i.test(e)?t="mpd":/[(,]format=m3u8-/i.test(e)&&(t="m3u8"),t}(e);return t||((e=e.split("?")[0].split("#")[0]).lastIndexOf(".")>-1?e.substr(e.lastIndexOf(".")+1,e.length).toLowerCase():"")};function A(e){var t=parseInt(e,10);if(!e)return"00:00";var n=Math.floor(t/3600),r=Math.floor((t-3600*n)/60),o=t-3600*n-60*r;return r<10&&(r="0"+r),o<10&&(o="0"+o),n>0?n+":"+r+":"+o:r+":"+o}function c(e,t){if(!e)return 0;if(i().isNumber(e)&&!i().isNaN(e))return e;var n=(e=e.replace(",",".")).split(":"),r=n.length,o=0;if("s"===e.slice(-1))o=parseFloat(e);else if("m"===e.slice(-1))o=60*parseFloat(e);else if("h"===e.slice(-1))o=3600*parseFloat(e);else if(r>1){var a=r-1;4===r&&(t&&(o=parseFloat(n[a])/t),a-=1),o+=parseFloat(n[a]),o+=60*parseFloat(n[a-1]),r>=3&&(o+=3600*parseFloat(n[a-2]))}else o=parseFloat(e);return i().isNaN(o)?0:o}function u(e){var t={},n=e.split("\r\n");1===n.length&&(n=e.split("\n"));var r=1;if(n[0].indexOf(" --\x3e ")>0&&(r=0),n.length>r+1&&n[r+1]){var o=n[r],i=o.indexOf(" --\x3e ");i>0&&(t.start=c(o.substr(0,i)),t.end=c(o.substr(i+5)),t.text=n.slice(r+1).join("\r\n"))}return t}var l=window.VTTCue,f={"":!0,lr:!0,rl:!0},p={start:!0,middle:!0,end:!0,left:!0,right:!0};function d(e){return"string"==typeof e&&!!p[e.toLowerCase()]&&e.toLowerCase()}function g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}l||((l=function(e,t,n){var r=this,o=/MSIE\s8\.0/.test(navigator.userAgent),i={};o?r=document.createElement("custom"):i.enumerable=!0,r.hasBeenReset=!1;var a="",s=!1,A=e,c=t,u=n,l=null,p="",h=!0,v="auto",m="start",y=50,C="middle",b=50,w="middle";if(Object.defineProperty(r,"id",g({},i,{get:function(){return a},set:function(e){a=""+e}})),Object.defineProperty(r,"pauseOnExit",g({},i,{get:function(){return s},set:function(e){s=!!e}})),Object.defineProperty(r,"startTime",g({},i,{get:function(){return A},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");A=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"endTime",g({},i,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"text",g({},i,{get:function(){return u},set:function(e){u=""+e,this.hasBeenReset=!0}})),Object.defineProperty(r,"region",g({},i,{get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"vertical",g({},i,{get:function(){return p},set:function(e){var t=function(e){return"string"==typeof e&&!!f[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");p=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"snapToLines",g({},i,{get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}})),Object.defineProperty(r,"line",g({},i,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"lineAlign",g({},i,{get:function(){return m},set:function(e){var t=d(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"position",g({},i,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"positionAlign",g({},i,{get:function(){return C},set:function(e){var t=d(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");C=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"size",g({},i,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"align",g({},i,{get:function(){return w},set:function(e){var t=d(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),r.displayState=void 0,o)return r}).prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)});var h=l,v={"":!0,up:!0};function m(e){return"number"==typeof e&&e>=0&&e<=100}var y=function(){var e=100,t=3,n=0,r=100,o=0,i=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!m(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!m(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!m(e))throw new Error("RegionAnchorY must be between 0 and 100.");n=e}},viewportAnchorY:{enumerable:!0,get:function(){return i},set:function(e){if(!m(e))throw new Error("ViewportAnchorY must be between 0 and 100.");i=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!m(e))throw new Error("ViewportAnchorX must be between 0 and 100.");o=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return"string"==typeof e&&!!v[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");a=t}}})},C=function(){};function b(e,t){return void 0===t&&(t=1),"rgba("+[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16),t].join(",")+")"}var w=1;function E(e,t,n){switch(n){case"webvtt.font.color":case"webvtt.font.opacity":var r=Services.prefs.getCharPref("webvtt.font.color"),o=Services.prefs.getIntPref("webvtt.font.opacity")/100;x.fontSet=b(r,o);break;case"webvtt.font.scale":w=Services.prefs.getIntPref("webvtt.font.scale")/100;break;case"webvtt.bg.color":case"webvtt.bg.opacity":var i=Services.prefs.getCharPref("webvtt.bg.color"),a=Services.prefs.getIntPref("webvtt.bg.opacity")/100;x.backgroundSet=b(i,a);break;case"webvtt.edge.color":case"webvtt.edge.type":var s=Services.prefs.getIntPref("webvtt.edge.type"),A=Services.prefs.getCharPref("webvtt.edge.color");x.edgeSet=["","0px 0px ","4px 4px 4px ","-2px -2px ","2px 2px "][s]+b(A)}}if("undefined"!=typeof Services){var x={};["webvtt.font.color","webvtt.font.opacity","webvtt.font.scale","webvtt.bg.color","webvtt.bg.opacity","webvtt.edge.color","webvtt.edge.type"].forEach((function(e){E(0,0,e),Services.prefs.addObserver(e,E,!1)}))}var B=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function k(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function I(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function S(){this.values=B(null)}function T(e,t,n,r){var o=r?e.split(r):[e];for(var i in o)if("string"==typeof o[i]){var a=o[i].split(n);2===a.length&&t(a[0],a[1])}}function L(e,t,n){var r=e;function o(){var t=I(e);if(null===t)throw new k(k.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function i(){e=e.replace(/^\s+/,"")}if(i(),t.startTime=o(),i(),"--\x3e"!==e.substr(0,3))throw new k(k.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),i(),t.endTime=o(),i(),function(e){var t=new S;T(e,(function(e,r){switch(e){case"region":for(var o=n.length-1;o>=0;o--)if(n[o].id===r){t.set(e,n[o].region);break}break;case"vertical":t.alt(e,r,["rl","lr"]);break;case"line":var i=r.split(","),a=i[0];t.integer(e,a),t.percent(e,a)&&t.set("snapToLines",!1),t.alt(e,a,["auto"]),2===i.length&&t.alt("lineAlign",i[1],["start","middle","end"]);break;case"position":i=r.split(","),t.percent(e,i[0]),2===i.length&&t.alt("positionAlign",i[1],["start","middle","end"]);break;case"size":t.percent(e,r);break;case"align":t.alt(e,r,["start","middle","end","left","right"])}}),/:/,/\s/)}(e)}k.prototype=B(Error.prototype),k.prototype.constructor=k,k.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},S.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var R={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},O={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},D={v:"title",lang:"lang"},M={rt:"ruby"};function Q(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]+>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e){return R[e]}function o(e){for(;p=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(p[0],r);return e}function i(e,t){return!M[t.localName]||M[t.localName]===e.localName}function a(t,n){var r=O[t];if(!r)return null;var o=e.document.createElement(r);o.localName=r;var i=D[t];return i&&n&&(o[i]=n.trim()),o}for(var s,A=e.document.createElement("div"),c=A,u=[];null!==(s=n());)if("<"!==s[0])c.appendChild(e.document.createTextNode(o(s)));else{if("/"===s[1]){u.length&&u[u.length-1]===s.substr(2).replace(">","")&&(u.pop(),c=c.parentNode);continue}var l,f=I(s.substr(1,s.length-2));if(f){l=e.document.createProcessingInstruction("timestamp",f),c.appendChild(l);continue}var p=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!p)continue;if(!(l=a(p[1],p[3])))continue;if(!i(c,l))continue;p[2]&&(l.className=p[2].substr(1).replace("."," ")),u.push(p[1]),c.appendChild(l),c=l}return A}var P=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];function F(){}function U(e,t,n){var r="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent),o="rgba(255, 255, 255, 1)",i="rgba(0, 0, 0, 0.8)",a="";void 0!==x&&(o=x.fontSet,i=x.backgroundSet,a=x.edgeSet),r&&(o="rgb(255, 255, 255)",i="rgb(0, 0, 0)"),F.call(this),this.cue=t,this.cueDiv=Q(e,t.text);var s={color:o,backgroundColor:i,textShadow:a,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};r||(s.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",s.unicodeBidi="plaintext"),this.applyStyles(s,this.cueDiv),this.div=e.document.createElement("div"),s={textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},r||(s.direction=function(e){var t,n=[],r="";if(!e||!e.childNodes)return"ltr";function o(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var r=n.match(/^.*(\n|\r)/);return r?(e.length=0,r[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(o(e,t),i(e)):void 0}for(o(n,e);r=i(n);)for(var a=0;a<r.length;a++){t=r.charCodeAt(a);for(var s=0;s<P.length;s++)if(P[s]===t)return"rtl"}return"ltr"}(this.cueDiv),s.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(s),this.div.appendChild(this.cueDiv);var A=0;switch(t.positionAlign){case"start":A=t.position;break;case"middle":A=t.position-t.size/2;break;case"end":A=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(A,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(A,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function N(e){var t,n,r,o,i="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent);if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,o=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||o,this.height=e.height||n,this.bottom=e.bottom||o+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight,i&&!this.lineHeight&&(this.lineHeight=13)}function W(e,t,n,r){var o=new N(t),i=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,o=0;o<n.length&&n[o]!==t;o++)"showing"===n[o].mode&&r++;return-1*++r}(i),s=[];if(i.snapToLines){var A;switch(i.vertical){case"":s=["+y","-y"],A="height";break;case"rl":s=["+x","-x"],A="width";break;case"lr":s=["-x","+x"],A="width"}var c=o.lineHeight,u=c*Math.round(a),l=n[A]+c,f=s[0];Math.abs(u)>l&&(u=u<0?-1:1,u*=Math.ceil(l/c)*c),a<0&&(u+=""===i.vertical?n.height:n.width,s=s.reverse()),o.move(f,u)}else{var p=o.lineHeight/n.height*100;switch(i.lineAlign){case"middle":a-=p/2;break;case"end":a-=p}switch(i.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],o=new N(t)}var d=function(e,t){for(var o,i=new N(e),a=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var A=e.intersectPercentage(n);a>A&&(o=new N(e),a=A),e=new N(i)}return o||i}(o,s);t.move(d.toCSSCompatValues(n))}F.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},F.prototype.formatStyle=function(e,t){return 0===e?0:e+t},U.prototype=B(F.prototype),U.prototype.constructor=U,N.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},N.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},N.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},N.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},N.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},N.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},N.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},N.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},C.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},C.convertCueToDOMTree=function(e,t){return e&&t?Q(e,t):null},C.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var o=[],i=N.getSimpleBoxPosition(r),a={font:Math.round(.05*i.height*100)/100*w+"px sans-serif"};!function(){for(var n,s,A=0;A<t.length;A++)s=t[A],n=new U(e,s,a),r.appendChild(n.div),W(0,n,i,o),s.displayState=n.div,o.push(N.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},(C.Parser=function(e,t){this.window=e,this.state="INITIAL",this.buffer="",this.decoder=t||new TextDecoder("utf8"),this.regionList=[]}).prototype={reportOrThrowError:function(e){if(!(e instanceof k))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e,t){var n=this;function r(){for(var e=n.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var r=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,n.buffer=e.substr(t),r}e&&(n.buffer+=n.decoder.decode(e,{stream:!0}));try{var o;if("INITIAL"===n.state){if(!/\r\n|\n/.test(n.buffer))return this;var i=(o=r()).match(/^WEBVTT([ \t].*)?$/);if(!i||!i[0])throw new k(k.Errors.BadSignature);n.state="HEADER"}for(var a=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(a?a=!1:o=r(),n.state){case"HEADER":/:/.test(o)?T(o,(function(e,t){"Region"===e&&function(e){var t=new S;if(T(e,(function(e,n){switch(e){case"id":t.set(e,n);break;case"width":t.percent(e,n);break;case"lines":t.integer(e,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var o=new S;if(o.percent("x",r[0]),o.percent("y",r[1]),!o.has("x")||!o.has("y"))break;t.set(e+"X",o.get("x")),t.set(e+"Y",o.get("y"));break;case"scroll":t.alt(e,n,["up"])}}),/=/,/\s/),t.has("id")){var r=new y;r.width=t.get("width",100),r.lines=t.get("lines",3),r.regionAnchorX=t.get("regionanchorX",0),r.regionAnchorY=t.get("regionanchorY",100),r.viewportAnchorX=t.get("viewportanchorX",0),r.viewportAnchorY=t.get("viewportanchorY",100),r.scroll=t.get("scroll",""),n.onregion&&n.onregion(r),n.regionList.push({id:t.get("id"),region:r})}}(t)}),/:/):o||(n.state="ID");continue;case"NOTE":o||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(o)){n.state="NOTE";break}if(!o)continue;if(n.cue=new h(0,0,""),n.state="CUE",-1===o.indexOf("--\x3e")){n.cue.id=o;continue}case"CUE":try{L(o,n.cue,n.regionList)}catch(e){n.reportOrThrowError(e),n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var s=-1!==o.indexOf("--\x3e");if(!o||s&&(a=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}n.cue.text&&(n.cue.text+="\n"),n.cue.text+=o;continue;case"BADCUE":o||(n.state="ID");continue}}if(!t)return"CUETEXT"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.flush(),this}catch(e){n.reportOrThrowError(e),"CUETEXT"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state="INITIAL"===n.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse(null,!0)),"INITIAL"===e.state)throw new k(k.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var j=C,Y=function(){var e="";screen.width&&(e+=(screen.width?screen.width:"")+" x "+(screen.height?screen.height:""));var t,n,r,o=navigator.appVersion,i=navigator.userAgent,a=navigator.appName,s=""+parseFloat(navigator.appVersion),A=parseInt(navigator.appVersion,10);-1!=(n=i.indexOf("Opera"))&&(a="Opera",s=i.substring(n+6),-1!=(n=i.indexOf("Version"))&&(s=i.substring(n+8))),-1!=(n=i.indexOf("OPR"))?(a="Opera",s=i.substring(n+4)):-1!=(n=i.indexOf("SamsungBrowser"))?(a="SamsungBrowser",s=i.substring(n+15)):-1!=(n=i.indexOf("Edge"))?(a="Microsoft Edge",s=i.substring(n+5)):-1!=(n=i.indexOf("MSIE"))?(a="Microsoft Internet Explorer",s=i.substring(n+5),-1!==i.indexOf("Trident/")&&-1!==i.indexOf("rv:")&&(s=i.substring(i.indexOf("rv:")+3))):-1!=(n=i.indexOf("Chrome"))?(a="Chrome",s=i.substring(n+7)):-1!=(n=i.indexOf("CriOS"))?(a="Chrome",s=i.substring(n+6)):-1!=(n=i.indexOf("Firefox"))?(a="Firefox",s=i.substring(n+8)):-1!=(n=i.indexOf("FxiOS"))?(a="Firefox",s=i.substring(n+6)):-1!=(n=i.indexOf("Safari"))?(a="Safari",s=i.substring(n+7),-1!=(n=i.indexOf("Version"))&&(s=i.substring(n+8))):-1!==i.indexOf("Trident/")?(a="Microsoft Internet Explorer",s=i.substring(i.indexOf("rv:")+3)):(t=i.lastIndexOf(" ")+1)<(n=i.lastIndexOf("/"))&&(a=i.substring(t,n),s=i.substring(n+1),a.toLowerCase()==a.toUpperCase()&&(a=navigator.appName)),i.indexOf(" wv"),-1!=(r=s.indexOf(";"))&&(s=s.substring(0,r)),-1!=(r=s.indexOf(" "))&&(s=s.substring(0,r)),-1!=(r=s.indexOf(")"))&&(s=s.substring(0,r)),A=parseInt(""+s,10),isNaN(A)&&(s=""+parseFloat(navigator.appVersion),A=parseInt(navigator.appVersion,10));var c=/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(o),u=!!navigator.cookieEnabled;void 0!==navigator.cookieEnabled||u||(document.cookie="testcookie",u=-1!=document.cookie.indexOf("testcookie"));var l="-",f=[{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 3.11",r:/Win16/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS XI",r:/Mac OS X 11/},{s:"Mac OS X",r:/Mac OS X 10/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}];for(var p in f){var d=f[p];if(d.r.test(i)){l=d.s;break}}var g="-";switch(/Windows/.test(l)&&(g=/Windows (.*)/.exec(l)[1],l="Windows"),l){case"Mac OS XI":g=/Mac OS X (11[\.\_\d]+)/.exec(i)[1];break;case"Mac OS X":g=/Mac OS X (10[\.\_\d]+)/.exec(i)[1];break;case"Android":g=/Android ([\.\_\d]+)/.exec(i)[1];break;case"iOS":g=(g=/OS (\d+)_(\d+)_?(\d+)?/.exec(o))?g[1]+"."+g[2]+"."+(0|g[3]):""}return{screen:e,browser:a,browserVersion:s,browserMajorVersion:A,mobile:c,ua:i,os:l,osVersion:g,cookies:u}},G=/<sync|<\/body|<\/sami/i,z=/\r\n?|\n/g,_=/<[a-z]*[^>]*<[a-z]*/g,H=/<sync[^>]+?start[^=]*=[^0-9]*([0-9]*)["^0-9"]*/i,V=/<br[^>]*>/gi,Z=function(e,t){return t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join(""),e.replace(/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,"").replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,(function(e,n){return t.indexOf("<"+n.toLowerCase()+">")>-1?e:""}))},J=function(e){return e.sort((function(e,t){var n;return 0==(n=e.start-t.start)?e.end-t.end:n}))},K=function(){var e={},t=function(e){return e.map((function(e){return new h(e.start,e.end,e.text)}))};return e.load=function(e,n,r,o){fetch(e.file).then((function(e){e.ok?e.text().then((function(e){var o=[],i=[];if(e.indexOf("WEBVTT")>=0){OvenPlayerConsole.log("WEBVTT LOADED");var s=new j.Parser(window,j.StringDecoder());i=[],s.oncue=function(e){i.push(e)},s.onflush=function(){r(i)},s.parse(e),s.flush()}else if(e.indexOf("SAMI")>=0){OvenPlayerConsole.log("SAMI LOADED");var A=function(e,t){var n,r,o,i,a,s,A,c,u,l;if(A=function(){var t,n,r,a,A,c,u,f,p,d,g,h,v,m,y,C;for(n=function(e){var n;return(n=new Error(e)).line=u,n.context=t,o.push(n)},u=1,p=[],v={},h=e;d=h.search(),!(f<=0||d<0);)f=h.slice(d+1).search(G)+1,t=f>0?h.slice(d,d+f):h.slice(d),u+=(null!=(m=h.slice(0,d).match(z))?m.length:void 0)||0,_.test(t)&&n("ERROR_BROKEN_TAGS"),h=h.slice(d+f),(null===(g=+(null!=(y=t.match(H))?parseFloat(y[1]/1e3):void 0))||g<0)&&n("ERROR_INVALID_TIME"),(A=i(t))||n("ERROR_INVALID_LANGUAGE"),u+=(null!=(C=t.match(z))?C.length:void 0)||0,t=(t=t.replace(z,"")).replace(V,"\n"),a={start:g,text:"",contents:r=Z(t).trim()},A&&(a.text=r),v[A]||(v[A]=[]),a.start&&v[A].push(a);l=l||function(){var e,t,n=window.navigator,r=["language","browserLanguage","systemLanguage","userLanguage"];if(Array.isArray(n.languages))for(e=0;e<n.languages.length;e++)if((t=n.languages[e])&&t.length)return t;for(e=0;e<r.length;e++)if((t=n[r[e]])&&t.length)return t;return null}();var b=Object.keys(v);return b&&b.length>0&&(c=b.indexOf(l)>-1?v[l]:v[b.filter((function(e){return"undefined"!==e}))[0]],c=J(c),c=s(c),p=p.concat(c)),J(p)},i=function(e){var t,r;if(e)for(t in n)if((r=n[t]).reClassName.test(e))return r.lang},s=function(e){var t,n,o;for(t=e.length;t--;)n=e[t],null!=(o=e[t-1])&&(o.end=n.start),n.contents&&"&nbsp;"!==n.contents?(delete e[t].contents,n.end||(n.end=n.start+r)):e.splice(t,1);return e},o=[],n={KRCC:{lang:"ko",reClassName:new RegExp("class[^=]*?=[\"'S]*(KRCC)['\"S]?","i")},KOCC:{lang:"ko",reClassName:new RegExp("class[^=]*?=[\"'S]*(KOCC)['\"S]?","i")},KR:{lang:"ko",reClassName:new RegExp("class[^=]*?=[\"'S]*(KR)['\"S]?","i")},ENCC:{lang:"en",reClassName:new RegExp("class[^=]*?=[\"'S]*(ENCC)['\"S]?","i")},EGCC:{lang:"en",reClassName:new RegExp("class[^=]*?=[\"'S]*(EGCC)['\"S]?","i")},EN:{lang:"en",reClassName:new RegExp("class[^=]*?=[\"'S]*(EN)['\"S]?","i")},JPCC:{lang:"ja",reClassName:new RegExp("class[^=]*?=[\"'S]*(JPCC)['\"S]?","i")}},null!=t?t.definedLangs:void 0)for(a in u=t.definedLangs)c=u[a],n[a]=c;return r=(null!=t?t.duration:void 0)||10,l=t.fixedLang,e=e.trim(),{result:A(),errors:o}}(e,{fixedLang:n});i=t(A.result),r(i)}else OvenPlayerConsole.log("SRT LOADED"),o=function(e){var t=[],n=(e=a(e)).split("\r\n\r\n");1===n.length&&(n=e.split("\n\n"));for(var r=0;r<n.length;r++)if("WEBVTT"!==n[r]){var o=u(n[r]);o.text&&t.push(o)}return t}(e),i=t(o),r(i)})).catch((function(e){o(e)})):o(e.status)})).catch((function(e){o(e)}))},e},X="idle",q="complete",$="paused",ee="playing",te="error",ne="loading",re="stalled",oe="adLoaded",ie="adPlaying",ae="adPaused",se="adComplete",Ae="adError",ce="html5",ue="webrtc",le="dash",fe="hls",pe=q,de="ready",ge="destroy",he="playlistChanged",ve="allPlaylistEnded",me="unstableNetwork",ye="error",Ce="stateChanged",be=q,we="pause",Ee="play",xe="clicked",Be="resized",ke="fullscreenChanged",Ie="warning",Se="zoomChanged",Te="adChanged",Le="adTime",Re="bufferChanged",Oe="time",De="volumeChanged",Me="mute",Qe="metaChanged",Pe="sourceChanged",Fe="qualityLevelChanged",Ue="cueChanged",Ne="captionChanged",We="timeDisplayModeChanged",je="p2pMode",Ye="audioTrackChanged",Ge="subtitleTrackChanged",ze={codes:""},_e=[{lang:"en",ui:{context:"About OvenPlayer",controls:{live:"Live Streaming",low_latency_live:"Sub-Second Latency Streaming",low_latency_p2p:"Sub-Second Latency P2P"},playlist:"Playlist",quality:{auto:"Auto"},setting:{title:"Settings",speed:"Speed",speedUnit:"x",source:"Source",quality:"Quality",audioTrack:"Audio",caption:"Caption",display:"Display",zoom:"Zoom",subtitleTrack:"Subtitle"}},api:{message:{muted_play:"Please touch here to turn on the sound."},error:{100:{code:100,message:"Can not load due to unknown reasons.",reason:"Can not load due to unknown reasons."},101:{code:101,message:"Can not load due to playable media not found.",reason:"Can not load due to playable media not found."},102:{code:102,message:"Flash fetching process aborted. </br><a href='http://www.adobe.com/go/getflashplayer' target='_self'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player'></a>",reason:"It looks like not found swf or your environment is localhost."},103:{code:103,message:"Can not load due to dash.js. Please use the latest dash.js.",reason:"dash.js version is old."},104:{code:104,message:"Can not load due to google ima for Ads. ",reason:"Please check the google ima library."},105:{code:105,message:"Error initializing DASH.",reason:"Error initializing DASH."},106:{code:106,message:"Error initializing HLS.",reason:"Error initializing HLS."},107:{code:107,message:"Error initializing DRM.",reason:"Error initializing DRM."},300:{code:300,message:"Can not play due to unknown reasons.",reason:"Can not play due to unknown reasons."},301:{code:301,message:"Fetching process aborted by user.",reason:"Fetching process aborted by user."},302:{code:302,message:"Some of the media could not be downloaded due to a network error.",reason:"Error occurred when downloading."},303:{code:303,message:"Unable to load media. This may be due to a server or network error, or due to an unsupported format.",reason:"Error occurred when decoding."},304:{code:304,message:"Media playback has been canceled. It looks like your media is corrupted or your browser does not support the features your media uses.",reason:"Media playback not supported."},305:{code:305,message:"Can not load captions due to unknown reasons.",reason:"Can not load captions due to unknown reasons."},306:{code:306,message:"Unable to load media. This may be due to a server or network error, or due to an unsupported format.",reason:"The server cannot or will not process the request."},307:{code:307,message:"Unable to load media. This may be due to a server or network error, or due to an unsupported format.",reason:"The server refused the request."},308:{code:308,message:"Unable to load media. This may be due to a server or network error, or due to an unsupported format.",reason:"The server do not accept the request."},501:{code:501,message:"Connection with low-latency(OME) server failed.",reason:"WebSocket connection failed."},502:{code:502,message:"Connection with low-latency(OME) server failed.",reason:"WebRTC addIceCandidate failed."},503:{code:503,message:"Connection with low-latency(OME) server failed.",reason:"WebRTC setRemoteDescription failed."},504:{code:504,message:"Connection with low-latency(OME) server failed.",reason:"WebRTC peer createOffer failed."},505:{code:505,message:"Connection with low-latency(OME) server failed.",reason:"WebRTC setLocalDescription failed."},506:{code:506,message:"Connection with low-latency(OME) server failed.",reason:"WebRTC internal error."},510:{code:510,message:"Network connection is unstable. Check the network connection.",reason:"Network is slow."},511:{code:511,message:"Connection with low-latency(OME) terminated unexpectedly.",reason:"Unexpected end of connection."},512:{code:512,message:"Connection with low-latency(OME) server failed.",reason:"Connection timeout."}}}},{lang:"ko",ui:{context:"오븐플레이어에 관하여",controls:{live:"라이브",low_latency_live:"초저지연 라이브",low_latency_p2p:"초저지연 P2P"},playlist:"플레이리스트",quality:{auto:"자동"},setting:{title:"설정",speed:"재생 속도",speedUnit:"x",source:"소스",quality:"품질",audioTrack:"오디오",caption:"자막",display:"표시",zoom:"줌",subtitleTrack:"자막"}},api:{message:{muted_play:"눌러서 소리 켜기"},error:{100:{code:100,message:"알 수 없는 이유로 로드 할 수 없습니다.",reason:"알 수 없는 이유로 로드 할 수 없습니다."},101:{code:101,message:"지원되는 미디어를 찾지 못해 로드 할 수 없습니다.",reason:"Can not load due to playable media not found."},102:{code:102,message:"플레시 로드가 중단 되었습니다. </br><a href='http://www.adobe.com/go/getflashplayer' target='_self'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player'></a>",reason:"It looks like not found swf or your environment is localhost."},103:{code:103,message:"DashJS로 인해 로드 할 수 없습니다. 최신 dash.js를 사용해 주세요.",reason:"dash.js version is old."},104:{code:104,message:"Google IMA 라이브러리가 없어 로드 할 수 없습니다.",reason:"Please check the google ima library."},105:{code:105,message:"DASH 초기화 중 오류가 발생했습니다.",reason:"Error initializing DASH."},106:{code:106,message:"HLS 초기화 중 오류가 발생했습니다.",reason:"Error initializing HLS."},107:{code:107,message:"DRM 초기화 중 오류가 발생했습니다.",reason:"Error initializing DRM."},300:{code:300,message:"알 수 없는 이유로 재생할 수 없습니다.",reason:"Can not play due to unknown reasons."},301:{code:301,message:"사용자에 의한 프로세스 중단.",reason:"Fetching process aborted by user."},302:{code:302,message:"네트워크 오류로 인해 일부 미디어를 다운로드 할 수 없습니다.",reason:"Error occurred when downloading."},303:{code:303,message:"미디어를 로드 할 수 없습니다. 서버 또는 네트워크 오류 또는 지원되지 않는 형식으로 인해 발생할 수 있습니다.",reason:"Error occurred when decoding."},304:{code:304,message:"미디어 재생이 취소되었습니다. 미디어가 손상되었거나 브라우저가 미디어에서 사용하는 기능을 지원하지 않는 것 같습니다.",reason:"Media playback not supported."},305:{code:305,message:"알 수 없는 이유로 자막을 로드 할 수 없습니다.",reason:"Can not load captions due to unknown reasons."},306:{code:306,message:"미디어를 로드 할 수 없습니다. 서버 또는 네트워크 오류 또는 지원되지 않는 형식으로 인해 발생할 수 있습니다.",reason:"The server cannot or will not process the request."},307:{code:307,message:"미디어를 로드 할 수 없습니다. 서버 또는 네트워크 오류 또는 지원되지 않는 형식으로 인해 발생할 수 있습니다.",reason:"The server refused the request."},308:{code:308,message:"미디어를 로드 할 수 없습니다. 서버 또는 네트워크 오류 또는 지원되지 않는 형식으로 인해 발생할 수 있습니다.",reason:"The server do not accept the request."},501:{code:501,message:"웹소켓 연결 실패",reason:"WebSocket connection failed."},502:{code:502,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"WebRTC addIceCandidate failed."},503:{code:503,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"WebRTC setRemoteDescription failed."},504:{code:504,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"WebRTC peer createOffer failed."},505:{code:505,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"WebRTC setLocalDescription failed."},506:{code:506,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"WebRTC internal error."},510:{code:510,message:"네트워크 연결이 불안정합니다. 네트워크 연결을 확인하십시오.",reason:"Network is slow."},511:{code:511,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"Unexpected end of connection."},512:{code:512,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"Connection timeout."}}}},{lang:"pl",ui:{context:"O OvenPlayer",controls:{live:"Transmisja na żywo",low_latency_live:"Transmisja z niskim opóźnieniem",low_latency_p2p:"Transmisja z niskim opóźnieniem P2P"},playlist:"Playlista",quality:{auto:"Auto"},setting:{title:"Ustawienia",speed:"Prędkość",speedUnit:"x",source:"Źrodło",quality:"Jakość",audioTrack:"Audio",caption:"Podtytuł",display:"Wyświetlacz",zoom:"Zbliżenie",subtitleTrack:"Napisy"}},api:{message:{muted_play:"Naciśnij tutaj, aby aktywować dźwięk"},error:{100:{code:100,message:"Nie można załadować z nieznanego powodu.",reason:"Can not load due to unknown reasons."},101:{code:101,message:"Nie można załadować, ponieważ nie znaleziono multimediów, który można odtworzyć.",reason:"Can not load due to playable media not found."},102:{code:102,message:"Flash fetching process aborted. </br><a href='http://www.adobe.com/go/getflashplayer' target='_self'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player'></a>",reason:"It looks like not found swf or your environment is localhost."},103:{code:103,message:"Nie można załadować, ponieważ wersja dash.js jest za stara.",reason:"dash.js version is old."},104:{code:104,message:"Can not load due to google ima for Ads. ",reason:"Please check the google ima library."},105:{code:105,message:"Nie można załadować, nie znaleziono DASH.",reason:"Error initializing DASH."},106:{code:106,message:"Nie można załadować, nie znaleziono hlsjs.",reason:"Error initializing HLS"},107:{code:107,message:"Nie można załadować, nie znaleziono DRM.",reason:"Error initializing DRM"},300:{code:300,message:"Nie można odtworzyć z nieznanego powodu.",reason:"Can not play due to unknown reasons."},301:{code:301,message:"Proces pobierania przerwany przez użytkownika.",reason:"Fetching process aborted by user."},302:{code:302,message:"Nie udało się pobrać niektórych multimediów z powodu błędu sieci.",reason:"Error occurred when downloading."},303:{code:303,message:"Nie udało się załadować niektórych multimediów. Może być to spowodowane problemem z serwerem, siecią lub niewspieranym formatem.",reason:"Error occurred when decoding."},304:{code:304,message:"Odtwarzanie zostało anulowane. Wygląda na to, że plik jest uszkodzony lub Twoja przeglądarka nie obsługuje tego pliku.",reason:"Media playback not supported."},305:{code:305,message:"Nie można wczytać napisów z nieznanego powodu.",reason:"Can not load captions due to unknown reasons."},306:{code:306,message:"Nie udało się załadować niektórych multimediów. Może być to spowodowane problemem z serwerem, siecią lub niewspieranym formatem.",reason:"The server cannot or will not process the request."},307:{code:307,message:"Nie udało się załadować niektórych multimediów. Może być to spowodowane problemem z serwerem, siecią lub niewspieranym formatem.",reason:"The server refused the request."},308:{code:308,message:"Nie udało się załadować niektórych multimediów. Może być to spowodowane problemem z serwerem, siecią lub niewspieranym formatem.",reason:"The server do not accept the request."},501:{code:501,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebSocket connection failed."},502:{code:502,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebRTC addIceCandidate failed."},503:{code:503,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebRTC setRemoteDescription failed."},504:{code:504,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebRTC peer createOffer failed."},505:{code:505,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebRTC setLocalDescription failed."},506:{code:506,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebRTC internal error."},510:{code:510,message:"Połączenie sieciowe jest niestabilne. Sprawdź swoją sieć.",reason:"Network is slow."},511:{code:511,message:"Połączenie z serwerem niskiego opóźnienia (OME) nieoczekiwanie zakończone.",reason:"Unexpected end of connection."},512:{code:512,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"Connection timeout."}}}}],He=function(e){return"subtitles"===e||"captions"===e};function Ve(e){return Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(e)}function Ze(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&("object"===Ve(t[n])&&null!==t[n]&&"object"===Ve(e[n])&&null!==e[n]?Ze(e[n],t[n]):e[n]=t[n]);return e}var Je=function(e){var t=e,n=[],r=function(e,t,n){var r=0,o=e.length;for(r=0;r<o;r++){var i=e[r];i.listener.apply(i.context||n,t)}};return t.on=function(e,r,o)