@nethesis/phone-island
Version:
NethVoice CTI Phone Island
3 lines (2 loc) • 2.5 kB
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_commonjsHelpers.js"),t=require("../../../_virtual/index10.js");require("./ebml/index.js");var r=require("../../../_virtual/index11.js"),n=e.commonjsGlobal&&e.commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function l(e){try{i(n.next(e))}catch(e){a(e)}}function u(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(l,u)}i((n=n.apply(e,t||[])).next())}))},o=e.commonjsGlobal&&e.commonjsGlobal.__generator||function(e,t){var r,n,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return l.label++,{value:a[1],done:!1};case 5:l.label++,n=a[1],a=[0];continue;case 7:a=l.ops.pop(),l.trys.pop();continue;default:if(!(o=l.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){l=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){l.label=a[1];break}if(6===a[0]&&l.label<o[1]){l.label=o[1],o=a;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(a);break}o[2]&&l.ops.pop(),l.trys.pop();continue}a=t.call(e,l)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t.__exports,"__esModule",{value:!0});var a=r.__exports;var l=t.__exports.default=function(e){return n(this,void 0,void 0,(function(){var t,r,n,l,u,i,c,s,f,d,p;return o(this,(function(o){switch(o.label){case 0:if(!e)throw Error("call to fixWebmDuration requires a blob");t=new a.Decoder,r=new a.Reader,n=e.stream(),l=n.getReader(),o.label=1;case 1:return[4,l.read()];case 2:return u=o.sent(),i=u.done,c=u.value,i?(r.stop(),[3,3]):((s=null==(s=t.decode(c))?void 0:s.filter((function(e){return"unknown"!==e.type}))).forEach((function(e){r.read(e)})),c=null,[3,1]);case 3:return f=a.tools.makeMetadataSeekable(r.metadatas,r.duration,r.cues),d=new Blob([f],{type:e.type}),p=e.slice(r.metadataSize),[2,new Blob([d,p],{type:e.type})]}}))}))};exports.default=l;
//# sourceMappingURL=index.js.map