diff --git a/docs/v1.0/assets/custom.css b/docs/v1.0/assets/custom.css new file mode 100644 index 00000000..9ed07131 --- /dev/null +++ b/docs/v1.0/assets/custom.css @@ -0,0 +1,45 @@ +.tsd-filter-visibility { + display: none; +} + +.tsd-typography ul { + margin: 0.2em 0; +} + +.tsd-page-title h2 { + font-size: 32px; +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace !important; +} + +html * { + scrollbar-width: auto; + scrollbar-color: auto; +} + +.tsd-navigation::-webkit-scrollbar { + background-color: #ffffff; + border-radius: 10px; +} + +.tsd-navigation::-webkit-scrollbar-thumb { + background-color: #f6e0bb; + border-radius: 10px; +} + +.tsd-navigation::-webkit-scrollbar-button { + display: none !important; +} + +#tsd-theme { + width: 100%; + padding: 8px; + border: 1px solid #ccc; + border-radius: 5px; + background-color: white; + color: #333; + cursor: pointer; +} diff --git a/docs/v1.0/assets/highlight.css b/docs/v1.0/assets/highlight.css new file mode 100644 index 00000000..ae684ee1 --- /dev/null +++ b/docs/v1.0/assets/highlight.css @@ -0,0 +1,141 @@ +:root { + --light-hl-0: #795E26; + --dark-hl-0: #DCDCAA; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #A31515; + --dark-hl-2: #CE9178; + --light-hl-3: #AF00DB; + --dark-hl-3: #C586C0; + --light-hl-4: #001080; + --dark-hl-4: #9CDCFE; + --light-hl-5: #0000FF; + --dark-hl-5: #569CD6; + --light-hl-6: #0070C1; + --dark-hl-6: #4FC1FF; + --light-hl-7: #800000; + --dark-hl-7: #808080; + --light-hl-8: #800000; + --dark-hl-8: #569CD6; + --light-hl-9: #E50000; + --dark-hl-9: #9CDCFE; + --light-hl-10: #008000; + --dark-hl-10: #6A9955; + --light-hl-11: #000000FF; + --dark-hl-11: #D4D4D4; + --light-hl-12: #0000FF; + --dark-hl-12: #CE9178; + --light-hl-13: #098658; + --dark-hl-13: #B5CEA8; + --light-hl-14: #267F99; + --dark-hl-14: #4EC9B0; + --light-hl-15: #000000; + --dark-hl-15: #C8C8C8; + --light-hl-16: #0451A5; + --dark-hl-16: #9CDCFE; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --hl-13: var(--light-hl-13); + --hl-14: var(--light-hl-14); + --hl-15: var(--light-hl-15); + --hl-16: var(--light-hl-16); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --hl-13: var(--dark-hl-13); + --hl-14: var(--dark-hl-14); + --hl-15: var(--dark-hl-15); + --hl-16: var(--dark-hl-16); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --hl-13: var(--light-hl-13); + --hl-14: var(--light-hl-14); + --hl-15: var(--light-hl-15); + --hl-16: var(--light-hl-16); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --hl-13: var(--dark-hl-13); + --hl-14: var(--dark-hl-14); + --hl-15: var(--dark-hl-15); + --hl-16: var(--dark-hl-16); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +.hl-8 { color: var(--hl-8); } +.hl-9 { color: var(--hl-9); } +.hl-10 { color: var(--hl-10); } +.hl-11 { color: var(--hl-11); } +.hl-12 { color: var(--hl-12); } +.hl-13 { color: var(--hl-13); } +.hl-14 { color: var(--hl-14); } +.hl-15 { color: var(--hl-15); } +.hl-16 { color: var(--hl-16); } +pre, code { background: var(--code-background); } diff --git a/docs/v1.0/assets/icons.js b/docs/v1.0/assets/icons.js new file mode 100644 index 00000000..b79c9e89 --- /dev/null +++ b/docs/v1.0/assets/icons.js @@ -0,0 +1,15 @@ +(function(svg) { + svg.innerHTML = ``; + svg.style.display = 'none'; + if (location.protocol === 'file:') { + if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', updateUseElements); + else updateUseElements() + function updateUseElements() { + document.querySelectorAll('use').forEach(el => { + if (el.getAttribute('href').includes('#icon-')) { + el.setAttribute('href', el.getAttribute('href').replace(/.*#/, '#')); + } + }); + } + } +})(document.body.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))) \ No newline at end of file diff --git a/docs/v1.0/assets/icons.svg b/docs/v1.0/assets/icons.svg new file mode 100644 index 00000000..7dead611 --- /dev/null +++ b/docs/v1.0/assets/icons.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/v1.0/assets/main.js b/docs/v1.0/assets/main.js new file mode 100644 index 00000000..d6f13886 --- /dev/null +++ b/docs/v1.0/assets/main.js @@ -0,0 +1,59 @@ +"use strict"; +"use strict";(()=>{var Ce=Object.create;var ne=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Ce(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),y=s.str.charAt(1),p;y in s.node.edges?p=s.node.edges[y]:(p=new t.TokenSet,s.node.edges[y]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(console.log("Show page"),document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){console.log("Scorlling");let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!e.checkVisibility()){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ve(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ne(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ve(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let y=document.createElement("li");y.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,y.append(p),e.appendChild(y)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ne(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var He={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>He[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",fe="mousemove",H="mouseup",J={x:0,y:0},pe=!1,ee=!1,Be=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(Be=!0,F="touchstart",fe="touchmove",H="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(fe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(H,()=>{ee=!1});document.addEventListener("click",t=>{pe&&(t.preventDefault(),t.stopImmediatePropagation(),pe=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(H,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(H,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ye=document.head.appendChild(document.createElement("style"));ye.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ye.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ve(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ve(t.value)})}function ve(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.pathname===r.pathname&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/docs/v1.0/assets/material-style.css b/docs/v1.0/assets/material-style.css new file mode 100644 index 00000000..b7e1d318 --- /dev/null +++ b/docs/v1.0/assets/material-style.css @@ -0,0 +1,247 @@ +@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap"); + +:root, +:root[data-theme="light"], +:root[data-theme="dark"] { + --font-sans: "Space Grotesk", sans-serif; + --font-mono: "Space Mono", monospace; + + --color-background: var(--md-sys-color-surface-container); + --color-background-secondary: var(--md-sys-color-surface-container-high); + --color-background-warning: var(--md-sys-color-error-container); + --color-warning-text: var(--md-sys-color-on-error-container); + --color-icon-background: var(--md-sys-color-on-primary); + --color-accent: var(--md-sys-color-secondary-container); + --color-active-menu-item: var(--md-sys-color-surface-container-highest); + --color-text: var(--md-sys-color-on-surface); + --color-text-aside: var(--md-sys-color-on-surface-variant); + --color-link: var(--md-sys-color-primary); + + --color-ts-project: var(--md-sys-color-secondary); + --color-ts-module: var(--color-ts-project); + --color-ts-namespace: var(--color-ts-project); + + --color-ts-enum: var(--md-sys-color-tertiary); + --color-ts-enum-member: var(--color-ts-enum); + + --color-ts-variable: var(--md-sys-color-primary); + --color-ts-function: var(--md-sys-color-secondary); + --color-ts-class: var(--md-sys-color-tertiary); + --color-ts-interface: var(--md-sys-color-tertiary); + + --color-ts-constructor: var(--md-sys-color-inverse-primary); + + --color-ts-property: var(--md-sys-color-on-background); + --color-ts-method: var(--color-ts-function); + + --color-ts-call-signature: var(--color-ts-method); + --color-ts-index-signature: var(--color-ts-property); /* ? */ + --color-ts-constructor-signature: var(--color-ts-function); + --color-ts-parameter: var(--md-sys-color-primary); + + --color-ts-type-parameter: var(--md-sys-color-tertiary); + --color-ts-accessor: var(--color-ts-property); + --color-ts-get-signature: var(--color-ts-accessor); + --color-ts-set-signature: var(--color-ts-accessor); + --color-ts-type-alias: var(--md-sys-color-tertiary); + + /* --external-icon: var(--md-sys-external-icon); + --color-scheme: var(--md-sys-color-scheme); */ + + --top-app-bar-height: 4.5rem; + --footer-height: 3.5rem; +} + +body { + font-family: var(--font-sans); +} +code, +pre { + font-family: var(--font-mono); +} + +img { + max-width: 100%; +} + +*::-webkit-scrollbar { + width: 8px; + height: 8px; +} +*::-webkit-scrollbar-track { + background: none; +} +*::-webkit-scrollbar-thumb { + border: none; +} + +.container-main { + min-height: calc(100vh - var(--top-app-bar-height) - var(--footer-height)); +} +.col-content { + overflow: hidden; + box-sizing: border-box; + padding: 1.75rem; + border-radius: 28px; + background-color: var(--md-sys-color-surface); +} +.page-menu { + height: fit-content; + padding: 0.75rem 1.75rem; + border-radius: 28px; + background-color: var(--md-sys-color-surface); +} +.site-menu > *, +.page-menu > * { + position: relative; +} +.title { + display: block; + max-width: calc(100% - 5rem); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 22px; +} + +.tsd-page-toolbar { + padding: 8px 0; + height: calc(var(--top-app-bar-height) - 16px); + background-color: var(--color-background); + border-bottom: none; +} +.tsd-page-toolbar .tsd-toolbar-contents { + height: 56px; +} +.tsd-page-toolbar .table-cell { + height: 56px; + margin-left: 1.5rem; +} +.tsd-page-toolbar .tsd-toolbar-icon { + padding: 20px 0; +} +#tsd-search { + line-height: 56px; + border-radius: 22px; +} +#tsd-search .results { + z-index: -1; + top: calc(56px - 22px); + padding-top: 22px; + box-shadow: 0px 4px 2px rgba(0, 0, 0, 0.125); + background-color: var(--color-background-secondary); + border-bottom-left-radius: 22px; + border-bottom-right-radius: 22px; + overflow: hidden; +} +#tsd-search .results li { + background: none; +} +#tsd-search .results a { + padding: 1rem 0.25rem; +} +.col-sidebar { + padding-top: 0; + margin-right: 1rem; +} + +.tsd-signature { + padding: 1rem 1.5rem; + border-radius: 24px; + background-color: var(--md-sys-color-surface-container); +} + +.tsd-page-navigation ul { + padding-left: 0.44rem; +} +.tsd-navigation a, +.tsd-navigation summary > span, +.tsd-page-navigation a { + padding: 0.88rem; + border-radius: 24px; +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { + text-decoration: none; + background-color: var(--md-sys-color-surface-container-high); +} +.page-menu .tsd-accordion-summary svg { + position: absolute; + right: 0; +} +.site-menu .tsd-navigation .tsd-accordion-summary { + display: flex; + flex-direction: row-reverse; + width: 100%; +} + +.tsd-small-nested-navigation { + margin-left: 1rem; +} +.tsd-nested-navigation { + margin-left: 2.5rem; +} +.tsd-nested-navigation > li > a, +.tsd-nested-navigation > li > span { + width: 100%; +} +.tsd-navigation > a, +.tsd-navigation .tsd-accordion-summary { + width: 100%; +} +.tsd-index-accordion .tsd-accordion-summary > svg { + position: absolute; + right: 1.5rem; + margin-top: 1rem; +} +.tsd-accordion-summary .tsd-kind-icon ~ span { + margin-right: 2.5rem; +} +.tsd-accordion-summary .tsd-nested-navigation > li > a, +.tsd-nested-navigation > li > span { + width: calc(100% - 0.44rem); +} +.tsd-kind-icon ~ span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.tsd-generator { + padding: 0; + border-top: none; + height: var(--footer-height); + line-height: var(--footer-height); +} +.tsd-generator > p { + padding: 0 2rem; +} + +@media (max-width: 769px) { + .container { + padding: 1rem; + } + .col-sidebar { + margin-right: 0; + } +} +@media (min-width: 770px) { + .container-main { + margin: 0 auto; + } + .site-menu { + margin-right: 0.5rem; + } +} +@media (min-width: 1200px) { + .page-menu, + .site-menu { + max-height: calc(100vh - var(--footer-height) - var(--top-app-bar-height)); + top: var(--top-app-bar-height); + } + .page-menu { + margin-left: 1rem; + } + .col-sidebar { + margin-right: 0; + } +} diff --git a/docs/v1.0/assets/navigation.js b/docs/v1.0/assets/navigation.js new file mode 100644 index 00000000..0b3f64cc --- /dev/null +++ b/docs/v1.0/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA6WWUW/TMBDHv4ufW2CRJqBvkFUaCKSoReJhmiovuTWmjm1sF6gQ3x0l7jo3SeOz936//993vrPv7i+x8MeSBVGZmjdQMTrnklag56XUQGZEUVuTBWlktedgXqtMbbqwjQvbtGGvattwMiM7JiqyyGakrBmvNAiyuDsZ5Gd6JafGXNTLB6JX2bt/s5PW2mqgzbeD8hTtQV3Ue47vHfXN+7dX15mn/PFgYUXFFil8Cg/prmHbgLDI47pgpOZ3ZmuXYJT6Mxb06aK6eIeamKr7HM4pRj2keAOPTEDVNlQuxSPb4sQHWNDnIGjDSneoQksF2jJAFuoCjPSMzq2PhXxy2TRSxNr0qbBLrD5W2dU1Rtsngrcgf4uWXcu9LpHPxjmDnPO1pdregKWMYwdwCCK9llpLneLlg0ivDw8yLS8fRHp9kbRKsfK4kFMBEFc5D8DMyPIXCPuVKvyUPBEh9RX83INxZe3uEf/BjqIhv1tr1RGMtBsjMfeS5jZGImuZVsYkF+xu5TOTO5br/BUYJYXBLlrnEKafU3Loc1N5LMWWCcgp5w+03CFnsgeN53HvuQzW55qbHwaxP3dxqAX6lpvPpsiK49lw35mTH0OD80K1ZZS/wHVCAbnavMB8QiH4LnHTLq1FVnwSxlKB+NVPZe6BeKvY+zzDEDZeFRBTNtY2wyGbHABT0x1FDEAXhxqApzW5BWKbwrlMKAQXiHTXFLvj7HRoguUlPC5LRKOMZTjWKPf/ARyPRp1qEAAA" \ No newline at end of file diff --git a/docs/v1.0/assets/search.js b/docs/v1.0/assets/search.js new file mode 100644 index 00000000..60870779 --- /dev/null +++ b/docs/v1.0/assets/search.js @@ -0,0 +1 @@ +window.searchData = "data:application/octet-stream;base64,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"; \ No newline at end of file diff --git a/docs/v1.0/assets/style.css b/docs/v1.0/assets/style.css new file mode 100644 index 00000000..778b9492 --- /dev/null +++ b/docs/v1.0/assets/style.css @@ -0,0 +1,1412 @@ +:root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; + --light-color-icon-background: var(--light-color-background); + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: #222; + --light-color-text-aside: #6e6e6e; + --light-color-link: #1f70c2; + + --light-color-ts-keyword: #056bd6; + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; + --light-color-ts-function: #572be7; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: var(--light-color-ts-variable); + --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var(--light-color-ts-constructor); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: #a55c0e; + --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + + --light-external-icon: url("data:image/svg+xml;utf8,"); + --light-color-scheme: light; + + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; + --dark-color-text: #f5f5f5; + --dark-color-text-aside: #dddddd; + --dark-color-link: #00aff4; + + --dark-color-ts-keyword: #3399ff; + --dark-color-ts-project: #e358ff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); + --dark-color-ts-enum: #f4d93e; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: var(--dark-color-ts-variable); + --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: #e07d13; + --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + + --dark-external-icon: url("data:image/svg+xml;utf8,"); + --dark-color-scheme: dark; +} + +@media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } +} + +html { + color-scheme: var(--color-scheme); +} + +body { + margin: 0; +} + +:root[data-theme="light"] { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); +} + +:root[data-theme="dark"] { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 > a:not(.link), +h2 > a:not(.link), +h3 > a:not(.link), +h4 > a:not(.link), +h5 > a:not(.link), +h6 > a:not(.link) { + text-decoration: none; + color: var(--color-text); +} + +h1 { + font-size: 1.875rem; + margin: 0.67rem 0; +} + +h2 { + font-size: 1.5rem; + margin: 0.83rem 0; +} + +h3 { + font-size: 1.25rem; + margin: 1rem 0; +} + +h4 { + font-size: 1.05rem; + margin: 1.33rem 0; +} + +h5 { + font-size: 1rem; + margin: 1.5rem 0; +} + +h6 { + font-size: 0.875rem; + margin: 2.33rem 0; +} + +.uppercase { + text-transform: uppercase; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1700px; + padding: 0 2rem; +} + +/* Footer */ +footer { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; +} +.tsd-generator { + margin: 0 1em; +} + +.container-main { + margin: 0 auto; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } +} +@keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } +} +body { + background: var(--color-background); + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; + font-size: 16px; + color: var(--color-text); +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; +} + +pre { + position: relative; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); +} +pre code { + padding: 0; + font-size: 100%; +} +pre > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; +} +pre:hover > button, +pre > button.visible { + opacity: 1; +} + +blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; +} + +.tsd-typography { + line-height: 1.333em; +} +.tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-typography .tsd-index-panel h3, +.tsd-index-panel .tsd-typography h3, +.tsd-typography h4, +.tsd-typography h5, +.tsd-typography h6 { + font-size: 1em; +} +.tsd-typography h5, +.tsd-typography h6 { + font-weight: normal; +} +.tsd-typography p, +.tsd-typography ul, +.tsd-typography ol { + margin: 1em 0; +} +.tsd-typography table { + border-collapse: collapse; + border: none; +} +.tsd-typography td, +.tsd-typography th { + padding: 6px 13px; + border: 1px solid var(--color-accent); +} +.tsd-typography thead, +.tsd-typography tr:nth-child(even) { + background-color: var(--color-background-secondary); +} + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); +} +.tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; +} +.tsd-breadcrumb a:hover { + text-decoration: underline; +} +.tsd-breadcrumb li { + display: inline; +} +.tsd-breadcrumb li:after { + content: " / "; +} + +.tsd-comment-tags { + display: flex; + flex-direction: column; +} +dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; +} +dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; +} +dl.tsd-comment-tag-group dd { + margin: 0; +} +code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; +} +h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; +} + +dl.tsd-comment-tag-group dd:before, +dl.tsd-comment-tag-group dd:after { + content: " "; +} +dl.tsd-comment-tag-group dd pre, +dl.tsd-comment-tag-group dd:after { + clear: both; +} +dl.tsd-comment-tag-group p { + margin: 0; +} + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; +} +.tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; +} + +.tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; +} +.tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; +} +.tsd-filter-input { + display: flex; + width: fit-content; + width: -moz-fit-content; + align-items: center; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + cursor: pointer; +} +.tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; +} +.tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; +} +.tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; +} +.tsd-filter-input input[type="checkbox"]:focus + svg { + transform: scale(0.95); +} +.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { + transform: scale(1); +} +.tsd-checkbox-background { + fill: var(--color-accent); +} +input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); +} + +.tsd-theme-toggle { + padding-top: 0.75rem; +} +.tsd-theme-toggle > h4 { + display: inline; + vertical-align: middle; + margin-right: 0.75rem; +} + +.tsd-hierarchy { + list-style: square; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); +} +.tsd-full-hierarchy, +.tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; +} +.tsd-full-hierarchy ul { + padding-left: 1.5rem; +} +.tsd-full-hierarchy a { + padding: 0.25rem 0 !important; + font-size: 1rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} + +.tsd-panel-group.tsd-index-group { + margin-bottom: 0; +} +.tsd-index-panel .tsd-index-list { + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; +} +@media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } +} +@media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } +} +.tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; +} + +.tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; +} + +.tsd-anchor { + position: relative; + top: -100px; +} + +.tsd-member { + position: relative; +} +.tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; +} + +.tsd-navigation.settings { + margin: 1rem 0; +} +.tsd-navigation > a, +.tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.25rem); + display: flex; + align-items: center; +} +.tsd-navigation a, +.tsd-navigation summary > span, +.tsd-page-navigation a { + display: flex; + width: calc(100% - 0.25rem); + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; +} +.tsd-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-active-menu-item); +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { + text-decoration: underline; +} +.tsd-navigation ul, +.tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; +} +.tsd-navigation li, +.tsd-page-navigation li { + padding: 0; + max-width: 100%; +} +.tsd-nested-navigation { + margin-left: 3rem; +} +.tsd-nested-navigation > li > details { + margin-left: -1.5rem; +} +.tsd-small-nested-navigation { + margin-left: 1.5rem; +} +.tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; +} + +.tsd-page-navigation ul { + padding-left: 1.75rem; +} + +#tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; +} +#tsd-sidebar-links a:last-of-type { + margin-bottom: 0; +} + +a.tsd-index-link { + padding: 0.25rem 0 !important; + font-size: 1rem; + line-height: 1.25rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} +.tsd-accordion-summary { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ +} +.tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ +} +.tsd-accordion-summary, +.tsd-accordion-summary a { + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + + cursor: pointer; +} +.tsd-accordion-summary a { + width: calc(100% - 1.5rem); +} +.tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} +.tsd-index-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; +} +.tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; +} +.tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; +} + +.tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; +} +.tsd-kind-icon path { + transform-origin: center; + transform: scale(1.1); +} +.tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; +} + +.tsd-panel { + margin-bottom: 2.5rem; +} +.tsd-panel.tsd-member { + margin-bottom: 4rem; +} +.tsd-panel:empty { + display: none; +} +.tsd-panel > h1, +.tsd-panel > h2, +.tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; +} +.tsd-panel > h1.tsd-before-signature, +.tsd-panel > h2.tsd-before-signature, +.tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; +} + +.tsd-panel-group { + margin: 4rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} + +#tsd-search { + transition: background-color 0.2s; +} +#tsd-search .title { + position: relative; + z-index: 2; +} +#tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 2.5rem; + height: 100%; +} +#tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); +} +#tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; +} +#tsd-search .field input, +#tsd-search .title, +#tsd-toolbar-links a { + transition: opacity 0.2s; +} +#tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +#tsd-search .results li { + background-color: var(--color-background); + line-height: initial; + padding: 4px; +} +#tsd-search .results li:nth-child(even) { + background-color: var(--color-background-secondary); +} +#tsd-search .results li.state { + display: none; +} +#tsd-search .results li.current:not(.no-results), +#tsd-search .results li:hover:not(.no-results) { + background-color: var(--color-accent); +} +#tsd-search .results a { + display: flex; + align-items: center; + padding: 0.25rem; + box-sizing: border-box; +} +#tsd-search .results a:before { + top: 10px; +} +#tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; +} +#tsd-search.has-focus { + background-color: var(--color-accent); +} +#tsd-search.has-focus .field input { + top: 0; + opacity: 1; +} +#tsd-search.has-focus .title, +#tsd-search.has-focus #tsd-toolbar-links a { + z-index: 0; + opacity: 0; +} +#tsd-search.has-focus .results { + visibility: visible; +} +#tsd-search.loading .results li.state.loading { + display: block; +} +#tsd-search.failure .results li.state.failure { + display: block; +} + +#tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} +#tsd-toolbar-links a { + margin-left: 1.5rem; +} +#tsd-toolbar-links a:hover { + text-decoration: underline; +} + +.tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; +} + +.tsd-signature-keyword { + color: var(--color-ts-keyword); + font-weight: normal; +} + +.tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; +} + +.tsd-signature-type { + font-style: italic; + font-weight: normal; +} + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; +} +.tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; +} +.tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; +} + +ul.tsd-parameter-list, +ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; +} +ul.tsd-parameter-list > li.tsd-parameter-signature, +ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; +} +ul.tsd-parameter-list h5, +ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} +.tsd-sources { + margin-top: 1rem; + font-size: 0.875em; +} +.tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; +} +.tsd-sources ul { + list-style: none; + padding: 0; +} + +.tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: 1px var(--color-accent) solid; + transition: transform 0.3s ease-in-out; +} +.tsd-page-toolbar a { + color: var(--color-text); + text-decoration: none; +} +.tsd-page-toolbar a.title { + font-weight: bold; +} +.tsd-page-toolbar a.title:hover { + text-decoration: underline; +} +.tsd-page-toolbar .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; +} +.tsd-page-toolbar .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; +} +.tsd-page-toolbar .table-cell:first-child { + width: 100%; +} +.tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; +} + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: + opacity 0.1s, + background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-widget:hover { + opacity: 0.9; +} +.tsd-widget.active { + opacity: 1; + background-color: var(--color-accent); +} +.tsd-widget.no-caption { + width: 40px; +} +.tsd-widget.no-caption:before { + margin: 0; +} + +.tsd-widget.options, +.tsd-widget.menu { + display: none; +} +input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; +} +input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; +} + +img { + max-width: 100%; +} + +.tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + vertical-align: middle; + color: var(--color-text); +} + +.tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; +} + +.tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; +} + +.deprecated { + text-decoration: line-through !important; +} + +.warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); +} + +.tsd-kind-project { + color: var(--color-ts-project); +} +.tsd-kind-module { + color: var(--color-ts-module); +} +.tsd-kind-namespace { + color: var(--color-ts-namespace); +} +.tsd-kind-enum { + color: var(--color-ts-enum); +} +.tsd-kind-enum-member { + color: var(--color-ts-enum-member); +} +.tsd-kind-variable { + color: var(--color-ts-variable); +} +.tsd-kind-function { + color: var(--color-ts-function); +} +.tsd-kind-class { + color: var(--color-ts-class); +} +.tsd-kind-interface { + color: var(--color-ts-interface); +} +.tsd-kind-constructor { + color: var(--color-ts-constructor); +} +.tsd-kind-property { + color: var(--color-ts-property); +} +.tsd-kind-method { + color: var(--color-ts-method); +} +.tsd-kind-call-signature { + color: var(--color-ts-call-signature); +} +.tsd-kind-index-signature { + color: var(--color-ts-index-signature); +} +.tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); +} +.tsd-kind-parameter { + color: var(--color-ts-parameter); +} +.tsd-kind-type-literal { + color: var(--color-ts-type-literal); +} +.tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); +} +.tsd-kind-accessor { + color: var(--color-ts-accessor); +} +.tsd-kind-get-signature { + color: var(--color-ts-get-signature); +} +.tsd-kind-set-signature { + color: var(--color-ts-set-signature); +} +.tsd-kind-type-alias { + color: var(--color-ts-type-alias); +} + +/* if we have a kind icon, don't color the text by kind */ +.tsd-kind-icon ~ span { + color: var(--color-text); +} + +* { + scrollbar-width: thin; + scrollbar-color: var(--color-accent) var(--color-icon-background); +} + +*::-webkit-scrollbar { + width: 0.75rem; +} + +*::-webkit-scrollbar-track { + background: var(--color-icon-background); +} + +*::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); +} + +/* mobile */ +@media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } +} + +/* one sidebar */ +@media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } +} +@media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } + .site-menu { + margin-top: 1rem; + } +} + +/* two sidebars */ +@media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem 0; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +} diff --git a/docs/v1.0/classes/p2p_media_loader_core.Core.html b/docs/v1.0/classes/p2p_media_loader_core.Core.html new file mode 100644 index 00000000..bf64b2d1 --- /dev/null +++ b/docs/v1.0/classes/p2p_media_loader_core.Core.html @@ -0,0 +1,250 @@ +Core | P2P Media Loader Documentation

Core class for managing media streams loading via P2P.

+

Type Parameters

Constructors

  • Constructs a new Core instance with optional initial configuration.

    +

    Type Parameters

    Parameters

    • Optional config: Partial<CoreConfig>

      Optional partial configuration to override default settings.

      +

    Returns Core<TStream>

    Example

    // Create a Core instance with custom configuration for HTTP and P2P downloads.
    const core = new Core({
    simultaneousHttpDownloads: 5,
    simultaneousP2PDownloads: 5,
    httpErrorRetries: 5,
    p2pErrorRetries: 5
    }); +
    +

    Example

    // Create a Core instance using the default configuration.
    const core = new Core(); +
    +

Properties

DEFAULT_COMMON_CORE_CONFIG: CommonCoreConfig = ...

Default configuration for common core settings.

+
DEFAULT_STREAM_CONFIG: StreamConfig = ...

Default configuration for stream settings.

+

Methods

  • Applies a set of dynamic configuration updates to the core, merging with the existing configuration.

    +

    Parameters

    Returns void

    Example

    // Example of dynamically updating the download time windows and timeout settings.
    const dynamicConfig = {
    httpDownloadTimeWindowMs: 60, // Set HTTP download time window to 60 seconds
    p2pDownloadTimeWindowMs: 60, // Set P2P download time window to 60 seconds
    httpNotReceivingBytesTimeoutMs: 1500, // Set HTTP timeout to 1500 milliseconds
    p2pNotReceivingBytesTimeoutMs: 1500 // Set P2P timeout to 1500 milliseconds
    };
    core.applyDynamicConfig(dynamicConfig); +
    +
  • Adds an event listener for the specified event type on the core event target.

    +

    Type Parameters

    Parameters

    • eventName: K

      The name of the event to listen for.

      +
    • listener: CoreEventMap[K]

      The callback function to invoke when the event is fired.

      +

    Returns void

  • Removes an event listener for the specified event type on the core event target.

    +

    Type Parameters

    Parameters

    • eventName: K

      The name of the event to listen for.

      +
    • listener: CoreEventMap[K]

      The callback function to be removed.

      +

    Returns void

  • Sets the response URL for the manifest, stripping any query parameters.

    +

    Parameters

    • url: string

      The full URL to the manifest response.

      +

    Returns void

  • Checks if a segment is already stored within the core.

    +

    Parameters

    • segmentRuntimeId: string

      The runtime identifier of the segment to check.

      +

    Returns boolean

    true if the segment is present, otherwise false.

    +
  • Retrieves a specific stream by its runtime identifier, if it exists.

    +

    Parameters

    • streamRuntimeId: string

      The runtime identifier of the stream to retrieve.

      +

    Returns undefined | StreamWithSegments<TStream>

    The stream with its segments, or undefined if not found.

    +
  • Ensures a stream exists in the map; adds it if it does not.

    +

    Parameters

    • stream: TStream

      The stream to potentially add to the map.

      +

    Returns void

  • Updates the segments associated with a specific stream.

    +

    Parameters

    • streamRuntimeId: string

      The runtime identifier of the stream to update.

      +
    • Optional addSegments: Iterable<Segment>

      Optional segments to add to the stream.

      +
    • Optional removeSegmentIds: Iterable<string>

      Optional segment IDs to remove from the stream.

      +

    Returns void

  • Loads a segment given its runtime identifier and invokes the provided callbacks during the process. +Initializes segment storage if it has not been initialized yet.

    +

    Parameters

    • segmentRuntimeId: string

      The runtime identifier of the segment to load.

      +
    • callbacks: EngineCallbacks

      The callbacks to be invoked during segment loading.

      +

    Returns Promise<void>

    Throws

      +
    • Throws if the manifest response URL is not defined.
    • +
    +
  • Aborts the loading of a segment specified by its runtime identifier.

    +

    Parameters

    • segmentRuntimeId: string

      The runtime identifier of the segment whose loading is to be aborted.

      +

    Returns void

  • Updates the playback parameters while play head moves, specifically position and playback rate, for stream loaders.

    +

    Parameters

    • position: number

      The new position in the stream, in seconds.

      +
    • rate: number

      The new playback rate.

      +

    Returns void

  • Sets the active level bitrate, used for adjusting quality levels in adaptive streaming. +Notifies the stream loaders if a change occurs.

    +

    Parameters

    • bitrate: number

      The new bitrate to set as active.

      +

    Returns void

  • Updates the 'isLive' status of the stream.

    +

    Parameters

    • isLive: boolean

      Boolean indicating whether the stream is live.

      +

    Returns void

  • Identify if a segment is loadable by the P2P core based on the segment's stream type and configuration.

    +

    Parameters

    • segmentRuntimeId: string

      Segment runtime identifier to check.

      +

    Returns boolean

    true if the segment is loadable by the P2P core, otherwise false.

    +
  • Cleans up resources used by the Core instance, including destroying any active stream loaders +and clearing stored segments.

    +

    Returns void

\ No newline at end of file diff --git a/docs/v1.0/classes/p2p_media_loader_core.CoreRequestError.html b/docs/v1.0/classes/p2p_media_loader_core.CoreRequestError.html new file mode 100644 index 00000000..b910985c --- /dev/null +++ b/docs/v1.0/classes/p2p_media_loader_core.CoreRequestError.html @@ -0,0 +1,180 @@ +CoreRequestError | P2P Media Loader Documentation

Custom error class for errors that occur during core network requests.

+

Hierarchy

  • Error
    • CoreRequestError

Constructors

Properties

Constructors

  • Constructs a new CoreRequestError.

    +

    Parameters

    • type: "failed" | "aborted"

      The type of the error, either 'failed' or 'aborted'.

      +

    Returns CoreRequestError

Properties

type: "failed" | "aborted"

The type of the error, either 'failed' or 'aborted'.

+
\ No newline at end of file diff --git a/docs/v1.0/classes/p2p_media_loader_core.RequestError.html b/docs/v1.0/classes/p2p_media_loader_core.RequestError.html new file mode 100644 index 00000000..a969ab91 --- /dev/null +++ b/docs/v1.0/classes/p2p_media_loader_core.RequestError.html @@ -0,0 +1,184 @@ +RequestError | P2P Media Loader Documentation

Represents an error that can occur during the request process, with a timestamp for when the error occurred.

+

Type Parameters

Hierarchy

  • Error
    • RequestError

Constructors

Properties

Constructors

Properties

timestamp: number

Error timestamp.

+
type: T

The specific error type.

+
\ No newline at end of file diff --git a/docs/v1.0/classes/p2p_media_loader_hlsjs.HlsJsP2PEngine.html b/docs/v1.0/classes/p2p_media_loader_hlsjs.HlsJsP2PEngine.html new file mode 100644 index 00000000..c2a42343 --- /dev/null +++ b/docs/v1.0/classes/p2p_media_loader_hlsjs.HlsJsP2PEngine.html @@ -0,0 +1,222 @@ +HlsJsP2PEngine | P2P Media Loader Documentation

Represents a P2P (peer-to-peer) engine for HLS (HTTP Live Streaming) to enhance media streaming efficiency. +This class integrates P2P technologies into HLS.js, enabling the distribution of media segments via a peer network +alongside traditional HTTP fetching. It reduces server bandwidth costs and improves scalability by sharing the load +across multiple clients.

+

The engine manages core functionalities such as segment fetching, segment management, peer connection management, +and event handling related to the P2P and HLS processes.

+

Example

// Creating an instance of HlsJsP2PEngine with custom configuration
const hlsP2PEngine = new HlsJsP2PEngine({
core: {
highDemandTimeWindow: 30, // 30 seconds
simultaneousHttpDownloads: 3,
webRtcMaxMessageSize: 64 * 1024, // 64 KB
p2pNotReceivingBytesTimeoutMs: 10000, // 10 seconds
p2pInactiveLoaderDestroyTimeoutMs: 15000, // 15 seconds
httpNotReceivingBytesTimeoutMs: 8000, // 8 seconds
httpErrorRetries: 2,
p2pErrorRetries: 2,
announceTrackers: ["wss://personal.tracker.com"],
rtcConfig: {
iceServers: [{ urls: "stun:personal.stun.com" }]
},
swarmId: "example-swarm-id"
}
}); +
+

Constructors

Methods

  • Enhances a given Hls.js class by injecting additional P2P (peer-to-peer) functionalities.

    +

    Parameters

    • hls: typeof Hls

    Returns (new (config?) => HlsWithP2PInstance<Hls>)

      +
    • The enhanced Hls.js class with P2P functionalities.
    • +
    +

    Example

    const HlsWithP2P = HlsJsP2PEngine.injectMixin(Hls);

    const hls = new HlsWithP2P({
    p2p: {
    core: {
    // P2P configuration
    },
    onHlsJsCreated(hls) {
    // Do something with the Hls.js instance
    },
    },
    }); +
    +
  • Adds an event listener for the specified event.

    +

    Type Parameters

    Parameters

    • eventName: K

      The name of the event to listen for.

      +
    • listener: CoreEventMap[K]

      The callback function to be invoked when the event is triggered.

      +

    Returns void

    Example

    // Listening for a segment being successfully loaded
    p2pEngine.addEventListener('onSegmentLoaded', (details) => {
    console.log('Segment Loaded:', details);
    }); +
    +

    Example

    // Handling segment load errors
    p2pEngine.addEventListener('onSegmentError', (errorDetails) => {
    console.error('Error loading segment:', errorDetails);
    }); +
    +

    Example

    // Tracking data downloaded from peers
    p2pEngine.addEventListener('onChunkDownloaded', (bytesLength, downloadSource, peerId) => {
    console.log(`Downloaded ${bytesLength} bytes from ${downloadSource} ${peerId ? 'from peer ' + peerId : 'from server'}`);
    }); +
    +
  • Removes an event listener for the specified event.

    +

    Type Parameters

    Parameters

    • eventName: K

      The name of the event.

      +
    • listener: CoreEventMap[K]

      The callback function that was previously added.

      +

    Returns void

  • provides the Hls.js P2P specific configuration for Hls.js loaders.

    +

    Type Parameters

    • F = unknown
    • P = unknown

    Returns {
        fLoader: F;
        pLoader: P;
    }

    An object with fragment loader (fLoader) and playlist loader (pLoader).

    +
    • fLoader: F
    • pLoader: P
  • Applies dynamic configuration updates to the P2P engine.

    +

    Parameters

    Returns void

    Example

    // Assuming `hlsP2PEngine` is an instance of HlsJsP2PEngine

    const newDynamicConfig = {
    core: {
    // Increase the number of cached segments to 1000
    cachedSegmentsCount: 1000,
    // 50 minutes of segments will be downloaded further through HTTP connections if P2P fails
    httpDownloadTimeWindow: 3000,
    // 100 minutes of segments will be downloaded further through P2P connections
    p2pDownloadTimeWindow: 6000,
    };

    hlsP2PEngine.applyDynamicConfig(newDynamicConfig); +
    +
  • Sets the HLS instance for handling media.

    +

    Type Parameters

    • T = unknown

    Parameters

    • hls: T | (() => T)

      The HLS instance or a function that returns an HLS instance.

      +

    Returns void

  • Clean up and release all resources. Unregister all event handlers.

    +

    Returns void

\ No newline at end of file diff --git a/docs/v1.0/classes/p2p_media_loader_shaka.ShakaP2PEngine.html b/docs/v1.0/classes/p2p_media_loader_shaka.ShakaP2PEngine.html new file mode 100644 index 00000000..bdb4a830 --- /dev/null +++ b/docs/v1.0/classes/p2p_media_loader_shaka.ShakaP2PEngine.html @@ -0,0 +1,220 @@ +ShakaP2PEngine | P2P Media Loader Documentation

Represents a P2P (peer-to-peer) engine for HLS (HTTP Live Streaming) to enhance media streaming efficiency. +This class integrates P2P technologies into Shaka Player, enabling the distribution of media segments via a peer network +alongside traditional HTTP fetching. It reduces server bandwidth costs and improves scalability by sharing the load +across multiple clients.

+

The engine manages core functionalities such as segment fetching, segment management, peer connection management, +and event handling related to the P2P and HLS processes.

+

Example

// Initializing the ShakaP2PEngine with custom configuration
const shakaP2PEngine = new ShakaP2PEngine({
core: {
highDemandTimeWindow: 30, // 30 seconds
simultaneousHttpDownloads: 3,
webRtcMaxMessageSize: 64 * 1024, // 64 KB
p2pNotReceivingBytesTimeoutMs: 10000, // 10 seconds
p2pInactiveLoaderDestroyTimeoutMs: 15000, // 15 seconds
httpNotReceivingBytesTimeoutMs: 8000, // 8 seconds
httpErrorRetries: 2,
p2pErrorRetries: 2,
announceTrackers: ["wss://personal.tracker.com"],
rtcConfig: {
iceServers: [{ urls: "stun:personal.stun.com" }]
},
swarmId: "example-swarm-id"
}
}); +
+

Constructors

  • Constructs an instance of ShakaP2PEngine.

    +

    Parameters

    • Optional config: PartialShakaEngineConfig

      Optional configuration for customizing the P2P engine's behavior.

      +
    • shaka: typeof shaka = window.shaka

      The Shaka Player library instance.

      +

    Returns ShakaP2PEngine

Methods

  • Configures and initializes the Shaka Player instance with predefined settings for optimal P2P performance.

    +

    Parameters

    • player: Player

      The Shaka Player instance to configure.

      +

    Returns void

  • Applies dynamic configuration updates to the P2P engine.

    +

    Parameters

    Returns void

    Example

    // Assuming `shakaP2PEngine` is an instance of ShakaP2PEngine

    const newDynamicConfig = {
    core: {
    // Increase the number of cached segments to 1000
    cachedSegmentsCount: 1000,
    // 50 minutes of segments will be downloaded further through HTTP connections if P2P fails
    httpDownloadTimeWindow: 3000,
    // 100 minutes of segments will be downloaded further through P2P connections
    p2pDownloadTimeWindow: 6000,
    };

    shakaP2PEngine.applyDynamicConfig(newDynamicConfig); +
    +
  • Adds an event listener for the specified event.

    +

    Type Parameters

    Parameters

    • eventName: K

      The name of the event to listen for.

      +
    • listener: CoreEventMap[K]

      The callback function to be invoked when the event is triggered.

      +

    Returns void

    Example

    // Listening for a segment being successfully loaded
    shakaP2PEngine.addEventListener('onSegmentLoaded', (details) => {
    console.log('Segment Loaded:', details);
    }); +
    +

    Example

    // Handling segment load errors
    shakaP2PEngine.addEventListener('onSegmentError', (errorDetails) => {
    console.error('Error loading segment:', errorDetails);
    }); +
    +

    Example

    // Tracking data downloaded from peers
    shakaP2PEngine.addEventListener('onChunkDownloaded', (bytesLength, downloadSource, peerId) => {
    console.log(`Downloaded ${bytesLength} bytes from ${downloadSource} ${peerId ? 'from peer ' + peerId : 'from server'}`);
    }); +
    +
  • Removes an event listener for the specified event.

    +

    Type Parameters

    Parameters

    • eventName: K

      The name of the event.

      +
    • listener: CoreEventMap[K]

      The callback function that was previously added.

      +

    Returns void

  • Clean up and release all resources. Unregister all event handlers.

    +

    Returns void

  • Registers plugins related to P2P functionality into the Shaka Player. +Plugins must be registered before initializing the player to ensure proper integration.

    +

    Parameters

    • shaka: typeof shaka = window.shaka

      The Shaka Player library. Defaults to the global Shaka Player instance if not provided.

      +

    Returns void

  • Unregister plugins related to P2P functionality from the Shaka Player.

    +

    Parameters

    • shaka: typeof shaka = window.shaka

      The Shaka Player library. Defaults to the global Shaka Player instance if not provided.

      +

    Returns void

\ No newline at end of file diff --git a/docs/v1.0/index.html b/docs/v1.0/index.html new file mode 100644 index 00000000..5c881a6b --- /dev/null +++ b/docs/v1.0/index.html @@ -0,0 +1,237 @@ +P2P Media Loader Documentation

P2P Media Loader Documentation

+

P2P Media Loader is an open-source JavaScript library that leverages modern web browser features, such as HTML5 video and WebRTC, to enable media delivery over peer-to-peer (P2P) networks. It integrates smoothly with many popular HTML5 video players and works entirely without browser plugins or add-ons. Experience it in action with the demo.

+

P2P Media Loader can be bundled in your project as an npm package or used through a CDN. Below are examples of both methods.

+

Using P2P Media Loader with npm

To include P2P Media Loader in your project using npm, follow these steps:

+
    +
  1. Install the package via npm:

    +
      +
    • For HLS.js integration:

      +
      npm install p2p-media-loader-hlsjs
      +
      +
    • +
    • For Shaka Player integration:

      +
      npm install p2p-media-loader-shaka
      +
      +
    • +
    +
  2. +
  3. Import and use it in your project:

    +
      +
    • HLS.js integration:

      +
      import Hls from "hls.js";
      import { HlsJsP2PEngine } from "p2p-media-loader-hlsjs";

      const HlsWithP2P = HlsJsP2PEngine.injectMixin(Hls); +
      +
    • +
    • Shaka Player integration:

      +
      import shaka from "shaka-player/dist/shaka-player.ui";
      import { ShakaP2PEngine } from "p2p-media-loader-shaka";

      ShakaP2PEngine.registerPlugins(shaka); +
      +
    • +
    +
  4. +
+

For more examples with npm packages, you may check our React demo

+

Using P2P Media Loader with CDN via JavaScript Modules

P2P Media Loader supports many players that use Hls.js as media engine. Lets pick Vidstack player for extended hlsjs example:

+

Integrating P2P with Vidstack and Hls.js

<!doctype html>
<html>
<head>
<!-- Include Hls.js library from CDN -->
<script src="https://cdn.jsdelivr.net/npm/hls.js@~1/dist/hls.min.js"></script>

<!-- Import map for P2P Media Loader modules -->
<script type="importmap">
{
"imports": {
"p2p-media-loader-core": "https://cdn.jsdelivr.net/npm/p2p-media-loader-core@^1/dist/p2p-media-loader-core.es.min.js",
"p2p-media-loader-hlsjs": "https://cdn.jsdelivr.net/npm/p2p-media-loader-hlsjs@^1/dist/p2p-media-loader-hlsjs.es.min.js"
}
}
</script>

<!-- Include Vidstack player stylesheets -->
<link rel="stylesheet" href="https://cdn.vidstack.io/player/theme.css" />
<link rel="stylesheet" href="https://cdn.vidstack.io/player/video.css" />

<!-- Include Vidstack player library from CDN -->
<script src="https://cdn.vidstack.io/player" type="module"></script>

<!-- Module script to initialize Vidstack player with P2P Media Loader -->
<script type="module">
import { HlsJsP2PEngine } from "p2p-media-loader-hlsjs";

const player = document.querySelector("media-player");
// Inject P2P capabilities into Hls.js
const HlsWithP2P = HlsJsP2PEngine.injectMixin(window.Hls);

player.addEventListener("provider-change", (event) => {
const provider = event.detail;

// Check if the provider is HLS
if (provider?.type === "hls") {
provider.library = HlsWithP2P;

provider.config = {
p2p: {
core: {
swarmId: "Optional custom swarm ID for stream",
// other P2P engine config parameters go here
},
onHlsJsCreated: (hls) => {
hls.p2pEngine.addEventListener("onPeerConnect", (params) => {
console.log("Peer connected:", params.peerId);
});
// Subscribe to P2P engine and Hls.js events here
},
},
};
}
});
</script>
</head>

<body>
<div style="width: 800px">
<!-- Vidstack media player with HLS stream -->
<media-player src="streamUrl">
<media-provider></media-provider>
<media-video-layout></media-video-layout>
</media-player>
</div>
</body>
</html> +
+

Integrating P2P with raw Hls.js player

<script type="module">
import { HlsJsP2PEngine } from "p2p-media-loader-hlsjs";

const videoElement = document.querySelector("#video");

const HlsWithP2P = HlsJsP2PEngine.injectMixin(window.Hls);

const hls = new HlsWithP2P({
p2p: {
core: {
swarmId: "Optional custom swarm ID for stream",
// Other P2P engine config parameters go here
},
onHlsJsCreated(hls) {
hls.p2pEngine.addEventListener("onPeerConnect", (params) => {
console.log("Peer connected:", params.peerId);
});
// Subscribe to P2P engine and Hls.js events here
},
},
});

hls.attachMedia(videoElement);
hls.loadSource(streamUrl);
</script> +
+

Integrating P2P with DPlayer and Hls.js

<script type="module">
import { HlsJsP2PEngine } from "p2p-media-loader-hlsjs";

const videoContainer = document.querySelector("#player");

const player = new DPlayer({
container: videoContainer,
video: {
url: "",
type: "customHls",
customType: {
customHls: (video) => {
const HlsWithP2P = HlsJsP2PEngine.injectMixin(window.Hls);

const hls = new HlsWithP2P({
p2p: {
core: {
swarmId: "Optional custom swarm ID for stream",
// Other P2P engine config parameters go here
},
},
});

hls.attachMedia(video);
hls.loadSource(streamUrl);
},
},
},
});

player.play();
</script> +
+

Integrating P2P with Clappr and Hls.js

<script type="module">
import { HlsJsP2PEngine } from "p2p-media-loader-hlsjs";

const engine = new HlsJsP2PEngine({
p2p: {
core: {
swarmId: "Optional custom swarm ID for stream",
// Other P2P engine config parameters go here
},
},
});

const player = new Clappr.Player({
source: streamUrl,
plugins: [LevelSelector], // https://cdn.jsdelivr.net/gh/clappr/clappr-level-selector-plugin@~0/dist/level-selector.min.js
height: "100%",
width: "100%",
parentId: `#player`,
hlsjsConfig: {
...engine.getConfigForHlsJs(),
},
});

engine.bindHls(() => clapprPlayer.core.getCurrentPlayback()?._hls);
</script> +
+

Integrating P2P with MediaElement and Hls.js

<script type="module">
import { HlsJsP2PEngine } from "p2p-media-loader-hlsjs";

const videoElement = document.querySelector("#video");

window.Hls = HlsJsP2PEngine.injectMixin(window.Hls);

const player = new MediaElementPlayer(videoElement.id, {
videoHeight: "100%",
hls: {
p2p: {
core: {
swarmId: "Optional custom swarm ID for stream",
// Other P2P engine config parameters go here
},
onHlsJsCreated: (hls) => {
// Subscribe to P2P engine and Hls.js events here
},
},
},
});

player.setSrc(streamUrl);
player.load();
</script> +
+

Integrating P2P with Plyr and Hls.js

<script type="module">
import { HlsJsP2PEngine } from "p2p-media-loader-hlsjs";

const videoElement = document.querySelector("#video");

const HlsWithP2P = HlsJsP2PEngine.injectMixin(window.Hls);

const hls = new HlsWithP2P({
p2p: {
core: {
swarmId: "Optional custom swarm ID for stream",
// Other P2P engine config parameters go here
},
onHlsJsCreated(hls) {
// Subscribe to P2P engine and Hls.js events here
},
},
});

hls.on(Hls.Events.MANIFEST_PARSED, () => {
const levels = hls.levels;

const quality = {
default: levels[levels.length - 1].height,
options: levels.map((level) => level.height),
forced: true,
onChange: (newQuality) => {
levels.forEach((level, levelIndex) => {
if (level.height === newQuality) {
hls.currentLevel = levelIndex;
}
});
},
};

player = new Plyr(videoElement, {
quality,
autoplay: true,
muted: true,
});
});

hls.attachMedia(videoElement);
hls.loadSource(streamUrl);
</script> +
+

Integrating P2P with OpenPlayerJS and Hls.js

<script type="module">
import { HlsJsP2PEngine } from "p2p-media-loader-hlsjs";

const videoElement = document.querySelector("#video");
const HlsWithP2P = HlsJsP2PEngine.injectMixin(window.Hls);

const player = new OpenPlayerJS(videoElement, {
hls: {
p2p: {
core: {
swarmId: "Optional custom swarm ID for stream",
// Other P2P engine config parameters go here
},
onHlsJsCreated: (hls) => {
// Subscribe to P2P engine and Hls.js events here
},
},
},
controls: {
layers: {
left: ["play", "time", "volume"],
right: ["settings", "fullscreen", "levels"],
middle: ["progress"],
},
},
});

player.src = [
{
src: streamUrl,
type: "application/x-mpegURL",
},
];

player.init();
</script> +
+

Integrating P2P with Shaka Player

Shaka player is used for an extended example:

+
<!doctype html>
<html>
<head>
<!-- Link to Shaka Player's CSS for controls -->
<link
rel="stylesheet"
type="text/css"
href="https://unpkg.com/shaka-player/dist/controls.css"
/>

<!-- Link to Shaka Player's compiled UI script -->
<script src="https://unpkg.com/shaka-player/dist/shaka-player.ui.js"></script>

<!-- Import map for P2P Media Loader modules -->
<script type="importmap">
{
"imports": {
"p2p-media-loader-core": "https://cdn.jsdelivr.net/npm/p2p-media-loader-core@^1/dist/p2p-media-loader-core.es.min.js",
"p2p-media-loader-shaka": "https://cdn.jsdelivr.net/npm/p2p-media-loader-shaka@^1/dist/p2p-media-loader-shaka.es.min.js"
}
}
</script>

<!-- Module script to initialize Shaka Player with P2P Media Loader -->
<script type="module">
import { ShakaP2PEngine } from "p2p-media-loader-shaka";

// Register P2P Media Loader plugins with Shaka
ShakaP2PEngine.registerPlugins(shaka);

async function init() {
// Get the video element by its ID
const video = document.getElementById("video");

// Get Shaka UI controls and player
const ui = video["ui"];
const controls = ui.getControls();
const player = controls.getPlayer();

// Initialize P2P Media Loader with custom config
const shakaP2PEngine = new ShakaP2PEngine(
{
core: {
swarmId: "Optional custom swarm ID for stream",
// Other P2P engine config parameters go here
},
},
shaka,
);

//Subscribe to P2P engine events here
shakaP2PEngine.addEventListener("onPeerConnect", (params) => {
console.log("Peer connected:", params.peerId);
});

// Configure and initialize Shaka Player with P2P Media Loader
shakaP2PEngine.bindShakaPlayer(player);

// Load the stream URL into the player
player.load(streamUrl);
}

// Add event listener for Shaka UI loaded event to trigger initialization
document.addEventListener("shaka-ui-loaded", init);
</script>
</head>

<body>
<div data-shaka-player-container style="max-width:40em">
<!-- Video element with Shaka Player UI -->
<video
autoplay
data-shaka-player
id="video"
style="width:100%;height:100%"
></video>
</div>
</body>
</html> +
+

Integrating P2P with Clappr and Shaka Player

<script type="module">
import { ShakaP2PEngine } from "p2p-media-loader-shaka";

const container = document.getElementById("container");

ShakaP2PEngine.registerPlugins();

const shakaP2PEngine = new ShakaP2PEngine(
{
core: {
swarmId: "Optional custom swarm ID for stream",
// Other P2P Media Loader Core options
},
},
window.shaka,
);

const player = new Clappr.Player({
parentId: `#${container.id}`,
source: streamUrl,
plugins: [window.DashShakaPlayback, window.LevelSelector],
shakaOnBeforeLoad: (shakaPlayerInstance) => {
subscribeToUiEvents({
engine: shakaP2PEngine,
onPeerConnect,
onPeerDisconnect,
onChunkDownloaded,
onChunkUploaded,
});

shakaP2PEngine.bindShakaPlayer(shakaPlayerInstance);
},
});
</script> +
+

Integrating P2P with DPlayer and Shaka Player

<script type="module">
import { ShakaP2PEngine } from "p2p-media-loader-shaka";

const container = document.getElementById("container");

ShakaP2PEngine.registerPlugins();

const shakaP2PEngine = new ShakaP2PEngine(
{
core: {
swarmId: "Optional custom swarm ID for stream",
// Other P2P Media Loader Core options
},
},
shaka,
);

const player = new DPlayer({
container,
video: {
url: "",
type: "customHlsOrDash",
customType: {
customHlsOrDash: (video) => {
const shakaPlayer = new shaka.Player();
void shakaPlayer.attach(video);

shakaP2PEngine.bindShakaPlayer(shakaPlayer);
void shakaPlayer.load(streamUrl);
},
},
},
});
</script> +
+

Integrating P2P with Plyr and Shaka Player

<script type="module">
import { ShakaP2PEngine } from "p2p-media-loader-shaka";

const videoElement = document.getElementById("video");

const initPlayer = () => {
const shakaP2PEngine = new ShakaP2PEngine(
{
core: {
swarmId: "Optional custom swarm ID for stream",
// Other P2P Media Loader Core options
},
},
window.shaka,
);
const shakaPlayer = new shaka.Player();

shakaPlayer.attach(videoElement);

shakaP2PEngine.bindShakaPlayer(shakaPlayer);

shakaPlayer.load(streamUrl);

const plyrPlayer = new Plyr(videoElement);
};

initPlayer();
</script> +
+
\ No newline at end of file diff --git a/docs/v1.0/modules/p2p_media_loader_core.html b/docs/v1.0/modules/p2p_media_loader_core.html new file mode 100644 index 00000000..0bbf81c2 --- /dev/null +++ b/docs/v1.0/modules/p2p_media_loader_core.html @@ -0,0 +1,202 @@ +p2p-media-loader-core | P2P Media Loader Documentation
\ No newline at end of file diff --git a/docs/v1.0/modules/p2p_media_loader_hlsjs.html b/docs/v1.0/modules/p2p_media_loader_hlsjs.html new file mode 100644 index 00000000..42f2c0ae --- /dev/null +++ b/docs/v1.0/modules/p2p_media_loader_hlsjs.html @@ -0,0 +1,180 @@ +p2p-media-loader-hlsjs | P2P Media Loader Documentation
\ No newline at end of file diff --git a/docs/v1.0/modules/p2p_media_loader_shaka.html b/docs/v1.0/modules/p2p_media_loader_shaka.html new file mode 100644 index 00000000..9b86945d --- /dev/null +++ b/docs/v1.0/modules/p2p_media_loader_shaka.html @@ -0,0 +1,178 @@ +p2p-media-loader-shaka | P2P Media Loader Documentation
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.ByteRange.html b/docs/v1.0/types/p2p_media_loader_core.ByteRange.html new file mode 100644 index 00000000..293ce4c5 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.ByteRange.html @@ -0,0 +1,177 @@ +ByteRange | P2P Media Loader Documentation
ByteRange: {
    start: number;
    end: number;
}

Represents a range of bytes, used for specifying a segment of data to download.

+

Type declaration

  • start: number

    The starting byte index of the range.

    +
  • end: number

    The ending byte index of the range.

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.CommonCoreConfig.html b/docs/v1.0/types/p2p_media_loader_core.CommonCoreConfig.html new file mode 100644 index 00000000..74453bad --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.CommonCoreConfig.html @@ -0,0 +1,184 @@ +CommonCoreConfig | P2P Media Loader Documentation
CommonCoreConfig: {
    cachedSegmentExpiration?: number;
    cachedSegmentsCount: number;
}

Represents the configuration for the Core functionality that is common to all streams.

+

Type declaration

  • Optional cachedSegmentExpiration?: number

    Time after which a cached segment expires, in seconds. +If set to undefined, the cacheSegmentExpiration is disabled for VOD streams, and a default value (20 minutes) is used for live streams.

    +

    Default

    cachedSegmentExpiration: undefined
    +
    +
  • cachedSegmentsCount: number

    Maximum number of segments to store in the cache. +Has to be less then httpDownloadTimeWindow and p2pDownloadTimeWindow. +If set to 0, the cache is unlimited.

    +

    Default

    cachedSegmentsCount: 0
    +
    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.CoreConfig.html b/docs/v1.0/types/p2p_media_loader_core.CoreConfig.html new file mode 100644 index 00000000..cd313dc9 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.CoreConfig.html @@ -0,0 +1,182 @@ +CoreConfig | P2P Media Loader Documentation
CoreConfig: Partial<StreamConfig> & Partial<CommonCoreConfig> & {
    mainStream?: Partial<StreamConfig>;
    secondaryStream?: Partial<StreamConfig>;
}

Represents a set of configuration parameters that can be used to override or extend the +default configuration settings for a specific stream (main or secondary).

+

Type declaration

  • Optional mainStream?: Partial<StreamConfig>

    Optional configuration for the main stream.

    +
  • Optional secondaryStream?: Partial<StreamConfig>

    Optional configuration for the secondary stream.

    +

Example: Configuration for basic video stream

const config: CoreConfig = {
highDemandTimeWindow: 15,
httpDownloadTimeWindow: 3000,
p2pDownloadTimeWindow: 6000,
swarmId: "custom swarm ID for video stream",
cashedSegmentsCount: 1000,
} +
+

Example: Configuration for advanced video stream

const config: CoreConfig = {
// Configuration for both streams
highDemandTimeWindow: 20,
httpDownloadTimeWindow: 3000,
p2pDownloadTimeWindow: 6000,
mainStream: {
// Optional configuration for the main stream
swarmId: "custom swarm ID for video stream",
},
secondaryStream: {
// Optional configuration for the secondary stream
swarmId: "custom swarm ID for audio stream",
}, +
+
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.CoreEventMap.html b/docs/v1.0/types/p2p_media_loader_core.CoreEventMap.html new file mode 100644 index 00000000..dffe5cdf --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.CoreEventMap.html @@ -0,0 +1,192 @@ +CoreEventMap | P2P Media Loader Documentation
CoreEventMap: {
    onSegmentLoaded: ((params) => void);
    onSegmentError: ((params) => void);
    onSegmentAbort: ((params) => void);
    onSegmentStart: ((params) => void);
    onPeerConnect: ((params) => void);
    onPeerClose: ((params) => void);
    onChunkDownloaded: ((bytesLength, downloadSource, peerId?) => void);
    onChunkUploaded: ((bytesLength, peerId) => void);
}

The CoreEventMap defines a comprehensive suite of event handlers crucial for monitoring and controlling the lifecycle +of segment downloading and uploading processes.

+

Type declaration

  • onSegmentLoaded: ((params) => void)

    Invoked when a segment is fully downloaded and available for use.

    +
      • (params): void
      • Parameters

        Returns void

  • onSegmentError: ((params) => void)

    Triggered when an error occurs during the download of a segment.

    +
      • (params): void
      • Parameters

        Returns void

  • onSegmentAbort: ((params) => void)

    Called if the download of a segment is aborted before completion.

    +
      • (params): void
      • Parameters

        Returns void

  • onSegmentStart: ((params) => void)

    Fired at the beginning of a segment download process.

    +
      • (params): void
      • Parameters

        Returns void

  • onPeerConnect: ((params) => void)

    Occurs when a new peer-to-peer connection is established.

    +
      • (params): void
      • Parameters

        Returns void

  • onPeerClose: ((params) => void)

    Triggered when an existing peer-to-peer connection is closed.

    +
      • (params): void
      • Parameters

        Returns void

  • onChunkDownloaded: ((bytesLength, downloadSource, peerId?) => void)

    Invoked after a chunk of data from a segment has been successfully downloaded.

    +
      • (bytesLength, downloadSource, peerId?): void
      • Parameters

        • bytesLength: number

          The size of the downloaded chunk in bytes.

          +
        • downloadSource: DownloadSource
        • Optional peerId: string

          The peer ID of the peer that the event is about, if applicable.

          +

        Returns void

  • onChunkUploaded: ((bytesLength, peerId) => void)

    Called when a chunk of data has been successfully uploaded to a peer.

    +
      • (bytesLength, peerId): void
      • Parameters

        • bytesLength: number

          The length of the segment in bytes.

          +
        • peerId: string

          The peer ID, if the segment was downloaded from a peer

          +

        Returns void

\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.DefinedCoreConfig.html b/docs/v1.0/types/p2p_media_loader_core.DefinedCoreConfig.html new file mode 100644 index 00000000..cf018871 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.DefinedCoreConfig.html @@ -0,0 +1,177 @@ +DefinedCoreConfig | P2P Media Loader Documentation
DefinedCoreConfig: CommonCoreConfig & {
    mainStream: StreamConfig;
    secondaryStream: StreamConfig;
}

Represents a defined Core configuration with specific settings for the main and secondary streams.

+

Type declaration

  • mainStream: StreamConfig

    Configuration for the main stream.

    +
  • secondaryStream: StreamConfig

    Configuration for the secondary stream.

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.DownloadSource.html b/docs/v1.0/types/p2p_media_loader_core.DownloadSource.html new file mode 100644 index 00000000..c41c5fe2 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.DownloadSource.html @@ -0,0 +1,177 @@ +DownloadSource | P2P Media Loader Documentation
DownloadSource: "http" | "p2p"

Specifies the source of a download within a media streaming context.

+

"http" - Indicates that the segment was downloaded using the HTTP protocol.

+

"p2p"- Indicates that the segment was downloaded through a peer-to-peer network.

+
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.DynamicCoreConfig.html b/docs/v1.0/types/p2p_media_loader_core.DynamicCoreConfig.html new file mode 100644 index 00000000..891ae19b --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.DynamicCoreConfig.html @@ -0,0 +1,179 @@ +DynamicCoreConfig | P2P Media Loader Documentation
DynamicCoreConfig: Partial<Pick<CoreConfig, DynamicStreamProperties>> & Partial<CommonCoreConfig> & {
    mainStream?: Partial<Pick<StreamConfig, DynamicStreamProperties>>;
    secondaryStream?: Partial<Pick<StreamConfig, DynamicStreamProperties>>;
}

Represents a dynamically modifiable configuration, allowing updates to selected CoreConfig properties at runtime.

+

Type declaration

Example

const dynamicConfig: DynamicCoreConfig = {
core: {
cachedSegmentsCount: 200,
},
mainStream: {
swarmId: "custom swarm ID for video stream",
p2pDownloadTimeWindow: 6000,
},
secondaryStream: {
swarmId: "custom swarm ID for audio stream",
p2pDownloadTimeWindow: 3000,
}
}; +
+
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.DynamicStreamProperties.html b/docs/v1.0/types/p2p_media_loader_core.DynamicStreamProperties.html new file mode 100644 index 00000000..1824782d --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.DynamicStreamProperties.html @@ -0,0 +1,175 @@ +DynamicStreamProperties | P2P Media Loader Documentation
DynamicStreamProperties: "highDemandTimeWindow" | "httpDownloadTimeWindow" | "p2pDownloadTimeWindow" | "simultaneousHttpDownloads" | "simultaneousP2PDownloads" | "webRtcMaxMessageSize" | "p2pNotReceivingBytesTimeoutMs" | "p2pInactiveLoaderDestroyTimeoutMs" | "httpNotReceivingBytesTimeoutMs" | "httpErrorRetries" | "p2pErrorRetries" | "validateP2PSegment" | "httpRequestSetup" | "isP2PDisabled"

Represents a set of properties that can be dynamically modified at runtime.

+
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.EngineCallbacks.html b/docs/v1.0/types/p2p_media_loader_core.EngineCallbacks.html new file mode 100644 index 00000000..43a38527 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.EngineCallbacks.html @@ -0,0 +1,179 @@ +EngineCallbacks | P2P Media Loader Documentation
EngineCallbacks: {
    onSuccess: ((response) => void);
    onError: ((reason) => void);
}

Callbacks for handling the success or failure of an engine operation.

+

Type declaration

  • onSuccess: ((response) => void)

    Called when the operation is successful.

    +
      • (response): void
      • Parameters

        Returns void

  • onError: ((reason) => void)

    Called when the operation encounters an error.

    +
      • (reason): void
      • Parameters

        Returns void

\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.HttpRequestErrorType.html b/docs/v1.0/types/p2p_media_loader_core.HttpRequestErrorType.html new file mode 100644 index 00000000..f7ac2d1a --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.HttpRequestErrorType.html @@ -0,0 +1,175 @@ +HttpRequestErrorType | P2P Media Loader Documentation
HttpRequestErrorType: "http-error" | "http-bytes-mismatch" | "http-unexpected-status-code"

Defines the types of errors specific to HTTP requests.

+
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.PeerDetails.html b/docs/v1.0/types/p2p_media_loader_core.PeerDetails.html new file mode 100644 index 00000000..a54aa864 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.PeerDetails.html @@ -0,0 +1,176 @@ +PeerDetails | P2P Media Loader Documentation
PeerDetails: {
    peerId: string;
}

Represents the details of a peer in a peer-to-peer network.

+

Type declaration

  • peerId: string

    The unique identifier for a peer in the network.

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.PeerRequestErrorType.html b/docs/v1.0/types/p2p_media_loader_core.PeerRequestErrorType.html new file mode 100644 index 00000000..b93a3896 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.PeerRequestErrorType.html @@ -0,0 +1,175 @@ +PeerRequestErrorType | P2P Media Loader Documentation
PeerRequestErrorType: "peer-response-bytes-length-mismatch" | "peer-protocol-violation" | "peer-segment-absent" | "peer-closed" | "p2p-segment-validation-failed"

Defines the types of errors specific to peer-to-peer requests.

+
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.RequestAbortErrorType.html b/docs/v1.0/types/p2p_media_loader_core.RequestAbortErrorType.html new file mode 100644 index 00000000..488197fc --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.RequestAbortErrorType.html @@ -0,0 +1,175 @@ +RequestAbortErrorType | P2P Media Loader Documentation
RequestAbortErrorType: "abort" | "bytes-receiving-timeout"

Defines the types of errors that can occur during a request abortion process.

+
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.RequestErrorType.html b/docs/v1.0/types/p2p_media_loader_core.RequestErrorType.html new file mode 100644 index 00000000..22619707 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.RequestErrorType.html @@ -0,0 +1,175 @@ +RequestErrorType | P2P Media Loader Documentation

Enumerates all possible request error types, including HTTP and peer-related errors.

+
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.Segment.html b/docs/v1.0/types/p2p_media_loader_core.Segment.html new file mode 100644 index 00000000..66552592 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.Segment.html @@ -0,0 +1,181 @@ +Segment | P2P Media Loader Documentation
Segment: {
    runtimeId: string;
    externalId: number;
    url: string;
    byteRange?: ByteRange;
    startTime: number;
    endTime: number;
}

Describes a media segment with its unique identifiers, location, and timing information.

+

Type declaration

  • Readonly runtimeId: string

    A runtime identifier for the segment that includes URL and byte range from its manifest.

    +
  • Readonly externalId: number

    An unique identifier of the segment in its stream used for P2P communications: sequence number for HLS or playtime for MPEG-DASH.

    +
  • Readonly url: string

    The URL from which the segment can be downloaded.

    +
  • Optional Readonly byteRange?: ByteRange

    An optional property specifying the range of bytes that represent the segment.

    +
  • Readonly startTime: number

    The start time of the segment in seconds, relative to the beginning of the stream.

    +
  • Readonly endTime: number

    The end time of the segment in seconds, relative to the beginning of the stream.

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.SegmentAbortDetails.html b/docs/v1.0/types/p2p_media_loader_core.SegmentAbortDetails.html new file mode 100644 index 00000000..268f7662 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.SegmentAbortDetails.html @@ -0,0 +1,178 @@ +SegmentAbortDetails | P2P Media Loader Documentation
SegmentAbortDetails: {
    segment: Segment;
    downloadSource: DownloadSource | undefined;
    peerId: string | undefined;
}

Represents details about a segment abort event.

+

Type declaration

  • segment: Segment

    The segment that the event is about.

    +
  • downloadSource: DownloadSource | undefined

    The source of the download.

    +
  • peerId: string | undefined

    The peer ID, if the segment was downloaded from a peer.

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.SegmentErrorDetails.html b/docs/v1.0/types/p2p_media_loader_core.SegmentErrorDetails.html new file mode 100644 index 00000000..5f3b3701 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.SegmentErrorDetails.html @@ -0,0 +1,179 @@ +SegmentErrorDetails | P2P Media Loader Documentation
SegmentErrorDetails: {
    error: RequestError;
    segment: Segment;
    downloadSource: DownloadSource;
    peerId: string | undefined;
}

Represents details about a segment error event.

+

Type declaration

  • error: RequestError

    The error that occurred during the segment download.

    +
  • segment: Segment

    The segment that the event is about.

    +
  • downloadSource: DownloadSource

    The source of the download.

    +
  • peerId: string | undefined

    The peer ID, if the segment was downloaded from a peer.

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.SegmentLoadDetails.html b/docs/v1.0/types/p2p_media_loader_core.SegmentLoadDetails.html new file mode 100644 index 00000000..d57f6387 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.SegmentLoadDetails.html @@ -0,0 +1,178 @@ +SegmentLoadDetails | P2P Media Loader Documentation
SegmentLoadDetails: {
    bytesLength: number;
    downloadSource: DownloadSource;
    peerId: string | undefined;
}

Represents the details about a loaded segment.

+

Type declaration

  • bytesLength: number

    The length of the segment in bytes.

    +
  • downloadSource: DownloadSource

    The source of the download.

    +
  • peerId: string | undefined

    The peer ID, if the segment was downloaded from a peer.

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.SegmentResponse.html b/docs/v1.0/types/p2p_media_loader_core.SegmentResponse.html new file mode 100644 index 00000000..193f5345 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.SegmentResponse.html @@ -0,0 +1,177 @@ +SegmentResponse | P2P Media Loader Documentation
SegmentResponse: {
    data: ArrayBuffer;
    bandwidth: number;
}

Represents the response from a segment request, including the data and measured bandwidth.

+

Type declaration

  • data: ArrayBuffer

    Segment data as an ArrayBuffer.

    +
  • bandwidth: number

    Measured bandwidth for the segment download, in bytes per second.

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.SegmentStartDetails.html b/docs/v1.0/types/p2p_media_loader_core.SegmentStartDetails.html new file mode 100644 index 00000000..74e25529 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.SegmentStartDetails.html @@ -0,0 +1,178 @@ +SegmentStartDetails | P2P Media Loader Documentation
SegmentStartDetails: {
    segment: Segment;
    downloadSource: DownloadSource;
    peerId: string | undefined;
}

Represents details about a segment event.

+

Type declaration

  • segment: Segment

    The segment that the event is about.

    +
  • downloadSource: DownloadSource

    The origin of the segment download.

    +
  • peerId: string | undefined

    The peer ID, if the segment is downloaded from a peer.

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.SegmentWithStream.html b/docs/v1.0/types/p2p_media_loader_core.SegmentWithStream.html new file mode 100644 index 00000000..6d9202b4 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.SegmentWithStream.html @@ -0,0 +1,175 @@ +SegmentWithStream | P2P Media Loader Documentation
SegmentWithStream<TStream>: Segment & {
    stream: StreamWithSegments<TStream>;
}

Extends a Segment with a reference to its associated stream.

+

Type Parameters

Type declaration

\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.Stream.html b/docs/v1.0/types/p2p_media_loader_core.Stream.html new file mode 100644 index 00000000..7178d1cc --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.Stream.html @@ -0,0 +1,178 @@ +Stream | P2P Media Loader Documentation
Stream: {
    runtimeId: string;
    type: StreamType;
    index: number;
}

Represents a media stream with various defining characteristics.

+

Type declaration

  • Readonly runtimeId: string

    Runtime identifier of the stream from an engine.

    +
  • Readonly type: StreamType

    Stream type.

    +
  • Readonly index: number

    Stream index in the manifest.

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.StreamConfig.html b/docs/v1.0/types/p2p_media_loader_core.StreamConfig.html new file mode 100644 index 00000000..2f831bdb --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.StreamConfig.html @@ -0,0 +1,250 @@ +StreamConfig | P2P Media Loader Documentation
StreamConfig: {
    isP2PDisabled: boolean;
    highDemandTimeWindow: number;
    httpDownloadTimeWindow: number;
    p2pDownloadTimeWindow: number;
    simultaneousHttpDownloads: number;
    simultaneousP2PDownloads: number;
    webRtcMaxMessageSize: number;
    p2pNotReceivingBytesTimeoutMs: number;
    p2pInactiveLoaderDestroyTimeoutMs: number;
    httpNotReceivingBytesTimeoutMs: number;
    httpErrorRetries: number;
    p2pErrorRetries: number;
    announceTrackers: string[];
    rtcConfig: RTCConfiguration;
    trackerClientVersionPrefix: string;
    swarmId?: string;
    validateP2PSegment?: ((url, byteRange?) => Promise<boolean>);
    httpRequestSetup?: ((segmentUrl, segmentByteRange, requestAbortSignal, requestByteRange) => Promise<Request | undefined | null>);
}

Configuration options for the Core functionality, including network and processing parameters.

+

Type declaration

  • isP2PDisabled: boolean

    Indicates whether Peer-to-Peer (P2P) functionality is disabled for the stream. +If set to true, P2P functionality is disabled for the stream.

    +

    Default

    isP2PDisabled: false
    +
    +
  • highDemandTimeWindow: number

    Defines the duration of the time window, in seconds, during which segments are pre-loaded to ensure smooth playback. +This window helps prioritize the fetching of media segments that are imminent to playback.

    +

    Default

    highDemandTimeWindow: 15
    +
    +
  • httpDownloadTimeWindow: number

    Defines the time window, in seconds, for HTTP segment downloads. This property specifies the duration +over which media segments are pre-fetched using HTTP requests.

    +

    For a better P2P ratio, it is recommended to set this httpDownloadTimeWindow to be lower than p2pDownloadTimeWindow.

    +

    NOTE: This setting only takes effect if there is at least one peer connection and the connected peer +does not have the requested segments available to share via P2P.

    +

    Default

    httpDownloadTimeWindow: 3000
    +
    +
  • p2pDownloadTimeWindow: number

    Defines the time window, in seconds, dedicated to pre-fetching media segments via Peer-to-Peer (P2P) downloads. +This duration determines how much content is downloaded in advance using P2P connections to ensure smooth playback and reduce reliance on HTTP downloads.

    +

    For a better P2P ratio, it is recommended to set this time window to be greater than httpDownloadTimeWindow to maximize P2P usage.

    +

    Default

    p2pDownloadTimeWindow: 6000
    +
    +
  • simultaneousHttpDownloads: number

    Maximum number of simultaneous HTTP downloads allowed.

    +

    Default

    simultaneousHttpDownloads: 3
    +
    +
  • simultaneousP2PDownloads: number

    Maximum number of simultaneous P2P downloads allowed.

    +

    Default

    simultaneousP2PDownloads: 3
    +
    +
  • webRtcMaxMessageSize: number

    Maximum message size for WebRTC communications, in bytes.

    +

    Default

    webRtcMaxMessageSize: 64 * 1024 - 1
    +
    +
  • p2pNotReceivingBytesTimeoutMs: number

    Timeout for not receiving bytes from P2P, in milliseconds.

    +

    Default

    p2pNotReceivingBytesTimeoutMs: 1000
    +
    +
  • p2pInactiveLoaderDestroyTimeoutMs: number

    Timeout for destroying the P2P loader if inactive, in milliseconds.

    +

    Default

    p2pInactiveLoaderDestroyTimeoutMs: 30 * 1000
    +
    +
  • httpNotReceivingBytesTimeoutMs: number

    Timeout for not receiving bytes from HTTP downloads, in milliseconds.

    +

    Default

    httpNotReceivingBytesTimeoutMs: 1000
    +
    +
  • httpErrorRetries: number

    Number of retries allowed after an HTTP error.

    +

    Default

    httpErrorRetries: 3
    +
    +
  • p2pErrorRetries: number

    Number of retries allowed after a P2P error.

    +

    Default

    p2pErrorRetries: 3
    +
    +
  • announceTrackers: string[]

    List of URLs to the WebTorrent trackers used for announcing and discovering peers (i.e. WebRTC signaling).

    +

    Default

    The default trackers used are:

    +
    [
    "wss://tracker.novage.com.ua",
    "wss://tracker.webtorrent.dev",
    "wss://tracker.openwebtorrent.com",
    ] +
    +
  • rtcConfig: RTCConfiguration

    Configuration for the RTC layer, used in WebRTC communication. +This configuration specifies the STUN/TURN servers used by WebRTC to establish connections through NATs and firewalls.

    +

    See

    https://developer.mozilla.org/en-US/docs/Web/API/RTCConfiguration

    +

    Default

    {
    "rtcConfig": {
    "iceServers": [
    { "urls": "stun:stun.l.google.com:19302" },
    { "urls": "stun:global.stun.twilio.com:3478" }
    ]
    }
    } +
    +
  • trackerClientVersionPrefix: string

    Prefix to use for the WebTorrent client version in tracker communications. +If undefined, the default version prefix is used, which is calculated based on the package version.

    +

    Default

    trackerClientVersionPrefix: undefined
    +
    +
  • Optional swarmId?: string

    Optional unique identifier for the swarm, used to isolate peer pools by media stream. +If undefined, the URL of the manifest is used as the swarm ID.

    +

    Default

    swarmId: undefined
    +
    +
  • Optional validateP2PSegment?: ((url, byteRange?) => Promise<boolean>)

    Optional function to validate a P2P segment before fully integrating it into the playback buffer.

    +

    Returns

    A promise that resolves with a boolean indicating if the segment is valid.

    +

    Default

    validateP2PSegment: undefined
    +
    +
      • (url, byteRange?): Promise<boolean>
      • Parameters

        • url: string

          URL of the segment to validate.

          +
        • Optional byteRange: ByteRange

          Optional byte range of the segment.

          +

        Returns Promise<boolean>

  • Optional httpRequestSetup?: ((segmentUrl, segmentByteRange, requestAbortSignal, requestByteRange) => Promise<Request | undefined | null>)

    Optional function to customize the setup of HTTP requests for segment downloads.

    +

    Returns

    A promise that resolves with the configured request, or undefined if no customization should be made.

    +

    Default

    httpRequestSetup: undefined
    +
    +
      • (segmentUrl, segmentByteRange, requestAbortSignal, requestByteRange): Promise<Request | undefined | null>
      • Parameters

        • segmentUrl: string

          URL of the segment.

          +
        • segmentByteRange: ByteRange | undefined

          The range of bytes requested for the segment.

          +
        • requestAbortSignal: AbortSignal

          An abort signal to cancel the request if needed.

          +
        • requestByteRange: {
              start: number;
              end?: number;
          } | undefined

          Additional byte range for partial requests, if required.

          +

        Returns Promise<Request | undefined | null>

\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.StreamType.html b/docs/v1.0/types/p2p_media_loader_core.StreamType.html new file mode 100644 index 00000000..b141010c --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.StreamType.html @@ -0,0 +1,175 @@ +StreamType | P2P Media Loader Documentation
StreamType: "main" | "secondary"

Represents the types of streams available, either primary (main) or secondary.

+
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_core.StreamWithSegments.html b/docs/v1.0/types/p2p_media_loader_core.StreamWithSegments.html new file mode 100644 index 00000000..8ef46aa0 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_core.StreamWithSegments.html @@ -0,0 +1,176 @@ +StreamWithSegments | P2P Media Loader Documentation
StreamWithSegments<TStream>: TStream & {
    segments: Map<string, SegmentWithStream<TStream>>;
}

Represents a stream that includes multiple segments, each associated with the stream.

+

Type Parameters

  • TStream extends Stream = Stream

    Type of the underlying stream data structure.

    +

Type declaration

\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_hlsjs.DynamicHlsJsP2PEngineConfig.html b/docs/v1.0/types/p2p_media_loader_hlsjs.DynamicHlsJsP2PEngineConfig.html new file mode 100644 index 00000000..4821b837 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_hlsjs.DynamicHlsJsP2PEngineConfig.html @@ -0,0 +1,176 @@ +DynamicHlsJsP2PEngineConfig | P2P Media Loader Documentation
DynamicHlsJsP2PEngineConfig: {
    core?: DynamicCoreConfig;
}

Type for specifying dynamic configuration options that can be changed at runtime for the P2P engine's core.

+

Type declaration

\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_hlsjs.HlsJsP2PEngineConfig.html b/docs/v1.0/types/p2p_media_loader_hlsjs.HlsJsP2PEngineConfig.html new file mode 100644 index 00000000..82e77c01 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_hlsjs.HlsJsP2PEngineConfig.html @@ -0,0 +1,176 @@ +HlsJsP2PEngineConfig | P2P Media Loader Documentation
HlsJsP2PEngineConfig: {
    core: CoreConfig;
}

Represents the complete configuration for HlsJsP2PEngine.

+

Type declaration

\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_hlsjs.HlsWithP2PConfig.html b/docs/v1.0/types/p2p_media_loader_hlsjs.HlsWithP2PConfig.html new file mode 100644 index 00000000..c3826fd6 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_hlsjs.HlsWithP2PConfig.html @@ -0,0 +1,176 @@ +HlsWithP2PConfig | P2P Media Loader Documentation
HlsWithP2PConfig<HlsType>: ConstructorParameters<HlsType>[0] & {
    p2p?: PartialHlsJsP2PEngineConfig & {
        onHlsJsCreated?: ((hls) => void);
    };
}

Configuration type for HLS instances that includes P2P settings, augmenting standard HLS configuration with P2P capabilities.

+

Type Parameters

  • HlsType extends (abstract new () => unknown)

    A constructor type that produces an HLS instance.

    +

Type declaration

\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_hlsjs.HlsWithP2PInstance.html b/docs/v1.0/types/p2p_media_loader_hlsjs.HlsWithP2PInstance.html new file mode 100644 index 00000000..38725a67 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_hlsjs.HlsWithP2PInstance.html @@ -0,0 +1,177 @@ +HlsWithP2PInstance | P2P Media Loader Documentation
HlsWithP2PInstance<HlsType>: HlsType & {
    p2pEngine: HlsJsP2PEngine;
}

Extends a generic HLS type to include the P2P engine, integrating P2P capabilities directly into the HLS instance.

+

Type Parameters

  • HlsType

    The base HLS type that is being extended.

    +

Type declaration

\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_hlsjs.PartialHlsJsP2PEngineConfig.html b/docs/v1.0/types/p2p_media_loader_hlsjs.PartialHlsJsP2PEngineConfig.html new file mode 100644 index 00000000..77a21907 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_hlsjs.PartialHlsJsP2PEngineConfig.html @@ -0,0 +1,176 @@ +PartialHlsJsP2PEngineConfig | P2P Media Loader Documentation
PartialHlsJsP2PEngineConfig: Partial<Omit<HlsJsP2PEngineConfig, "core">> & {
    core?: Partial<CoreConfig>;
}

Allows for partial configuration of HlsJsP2PEngine, useful for providing overrides or partial updates.

+

Type declaration

  • Optional core?: Partial<CoreConfig>

    Partial core config

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_shaka.DynamicShakaP2PEngineConfig.html b/docs/v1.0/types/p2p_media_loader_shaka.DynamicShakaP2PEngineConfig.html new file mode 100644 index 00000000..60e0fb1d --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_shaka.DynamicShakaP2PEngineConfig.html @@ -0,0 +1,176 @@ +DynamicShakaP2PEngineConfig | P2P Media Loader Documentation
DynamicShakaP2PEngineConfig: {
    core?: DynamicCoreConfig;
}

Type for specifying dynamic configuration options that can be changed at runtime for the P2P engine's core.

+

Type declaration

\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_shaka.PartialShakaEngineConfig.html b/docs/v1.0/types/p2p_media_loader_shaka.PartialShakaEngineConfig.html new file mode 100644 index 00000000..e24302d8 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_shaka.PartialShakaEngineConfig.html @@ -0,0 +1,176 @@ +PartialShakaEngineConfig | P2P Media Loader Documentation
PartialShakaEngineConfig: Partial<Omit<ShakaP2PEngineConfig, "core">> & {
    core?: Partial<CoreConfig>;
}

Allows for partial configuration settings for the Shaka P2P Engine.

+

Type declaration

  • Optional core?: Partial<CoreConfig>

    Partial core config

    +
\ No newline at end of file diff --git a/docs/v1.0/types/p2p_media_loader_shaka.ShakaP2PEngineConfig.html b/docs/v1.0/types/p2p_media_loader_shaka.ShakaP2PEngineConfig.html new file mode 100644 index 00000000..9abc3110 --- /dev/null +++ b/docs/v1.0/types/p2p_media_loader_shaka.ShakaP2PEngineConfig.html @@ -0,0 +1,176 @@ +ShakaP2PEngineConfig | P2P Media Loader Documentation
ShakaP2PEngineConfig: {
    core: CoreConfig;
}

Represents the complete configuration for ShakaP2PEngine.

+

Type declaration

\ No newline at end of file