diff --git a/docs/v2.1.0/assets/custom.css b/docs/v2.1.0/assets/custom.css new file mode 100644 index 00000000..9ed07131 --- /dev/null +++ b/docs/v2.1.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/v2.1.0/assets/highlight.css b/docs/v2.1.0/assets/highlight.css new file mode 100644 index 00000000..7f3d87ba --- /dev/null +++ b/docs/v2.1.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: #008000; + --dark-hl-3: #6A9955; + --light-hl-4: #AF00DB; + --dark-hl-4: #C586C0; + --light-hl-5: #001080; + --dark-hl-5: #9CDCFE; + --light-hl-6: #0000FF; + --dark-hl-6: #569CD6; + --light-hl-7: #0070C1; + --dark-hl-7: #4FC1FF; + --light-hl-8: #800000; + --dark-hl-8: #808080; + --light-hl-9: #800000; + --dark-hl-9: #569CD6; + --light-hl-10: #E50000; + --dark-hl-10: #9CDCFE; + --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/v2.1.0/assets/icons.js b/docs/v2.1.0/assets/icons.js new file mode 100644 index 00000000..3dfbd322 --- /dev/null +++ b/docs/v2.1.0/assets/icons.js @@ -0,0 +1,18 @@ +(function() { + addIcons(); + function addIcons() { + if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons); + const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg")); + svg.innerHTML = `MMNEPVFCICPMFPCPTTAAATR`; + svg.style.display = "none"; + if (location.protocol === "file:") updateUseElements(); + } + + function updateUseElements() { + document.querySelectorAll("use").forEach(el => { + if (el.getAttribute("href").includes("#icon-")) { + el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#")); + } + }); + } +})() \ No newline at end of file diff --git a/docs/v2.1.0/assets/icons.svg b/docs/v2.1.0/assets/icons.svg new file mode 100644 index 00000000..a19417dc --- /dev/null +++ b/docs/v2.1.0/assets/icons.svg @@ -0,0 +1 @@ +MMNEPVFCICPMFPCPTTAAATR \ No newline at end of file diff --git a/docs/v2.1.0/assets/main.js b/docs/v2.1.0/assets/main.js new file mode 100644 index 00000000..99097a05 --- /dev/null +++ b/docs/v2.1.0/assets/main.js @@ -0,0 +1,60 @@ +"use strict"; +window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This member is normally hidden due to your filter settings."}; +"use strict";(()=>{var Pe=Object.create;var ie=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var De=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _e(e))!Me.call(t,i)&&i!==n&&ie(t,i,{get:()=>e[i],enumerable:!(r=Oe(e,i))||r.enumerable});return t};var Ae=(t,e,n)=>(n=t!=null?Pe(Re(t)):{},De(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t));var ue=Fe((ae,le)=>{(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),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=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 ae=="object"?le.exports=n():e.lunr=n()}(this,function(){return t})})()});var se=[];function G(t,e){se.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){se.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&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){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&&!Ve(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").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)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}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=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function Ve(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var oe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var pe=Ae(ue());async function ce(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=pe.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function fe(){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",()=>{ce(e,t)}),ce(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");i.addEventListener("mouseup",()=>{te(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),He(t,i,r,e)}function He(t,e,n,r){n.addEventListener("input",oe(()=>{Ne(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Be(e,t):i.key=="ArrowUp"?(de(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(de(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),te(t))})}function te(t){t.classList.remove("has-focus")}function Ne(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=he(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${he(l.parent,i)}.${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function de(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Be(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),te(e)}}function he(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(ee(t.substring(s,o)),`${ee(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ee(t.substring(s))),i.join("")}var je={"&":"&","<":"<",">":">","'":"'",'"':"""};function ee(t){return t.replace(/[&<>"'"]/g,e=>je[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",ye="mousemove",N="mouseup",J={x:0,y:0},me=!1,ne=!1,qe=!1,D=!1,ve=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(ve?"is-mobile":"not-mobile");ve&&"ontouchstart"in document.documentElement&&(qe=!0,F="touchstart",ye="touchmove",N="touchend");document.addEventListener(F,t=>{ne=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(ye,t=>{if(ne&&!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(N,()=>{ne=!1});document.addEventListener("click",t=>{me&&(t.preventDefault(),t.stopImmediatePropagation(),me=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,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 re;try{re=localStorage}catch{re={getItem(){return null},setItem(){}}}var Q=re;var ge=document.head.appendChild(document.createElement("style"));ge.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()),ge.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 Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){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();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(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-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',be(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)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else{let r=e.appendChild(document.createElement("span"));r.innerHTML='',r.appendChild(document.createElement("span")).textContent=t.text}}G(X,"a[data-toggle]");G(Z,".tsd-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var $e=new U;Object.defineProperty(window,"app",{value:$e});fe();we();})(); +/*! 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/v2.1.0/assets/material-style.css b/docs/v2.1.0/assets/material-style.css new file mode 100644 index 00000000..b7e1d318 --- /dev/null +++ b/docs/v2.1.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/v2.1.0/assets/navigation.js b/docs/v2.1.0/assets/navigation.js new file mode 100644 index 00000000..e5c359f8 --- /dev/null +++ b/docs/v2.1.0/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA6WXXW/TMBSG/4uvO2CRxkfvoK00EEhRO2kX01SdJaeJqWMH2wUqxH9HTbripEl97N2f5318TmzLefjDLP62bMrqpL6qMOdwJRTkqK8ypZFNWA22ZFNWqXwn0Lyuk3rdlK3bsvWh7FVpK8EmbMtlzqbJhGUlF7lGyaYPJ8Gsk5cJMGY0b3YWep28/zs5Za2wqFDalVUaCieVS4t6A9locBfsrfvmrauwGqG629dOvN3X48mn+l7qmw/vrm8SJ/nT3uISZEEMPpX7co+9EZfbFhMz77kt2waD0v9jXk9T1dS3qAmZusvRTCHpvsQ5brjE/LBnZ0pueEELP8O8nr2EimftolKtatSWI3FQIzDRGdxbHwvqLcLkgj7XTFWVkqEt9Sm/JTSfmhw+pJDpzNUveWBXaqcz4hXVZYh3ysqCtnO0wAX1sJ+DRNdCa6VjXC5IdH18UnF9uSDR9VVBHqNyOJ8pRQybnANQssM/TZ/yWe40ZNsY0QBIdN2DllwWMbYuSrllFj9R2m9Q0++ZZ8KXvsQfOzTtxmymQH8ODaI+36219REM1A2RlN0XZxsiibOMG2OUhfrYdhnCo3uJplbSUJ/FXYiyn2N66HOX+ljIgkucgRBPkG2Jp7MHDffx6FjO/qdKYb47stEfqqaO9Ed1K8wXkybpcW20B0EbP4R6zwtoy0G8wHohgfhAfIH8QoL3XhLm8IuRJulnaSxIwrvoNOYeSFeFfs8ORtA4UyCcsqFtc37ILh4AU8IWCAegqSMdgOfH/wEI3RSt5UKC9wkWb43RHc9Og0Yox/CwLgkbZajDoY3y+A8U38c7exIAAA==" \ No newline at end of file diff --git a/docs/v2.1.0/assets/search.js b/docs/v2.1.0/assets/search.js new file mode 100644 index 00000000..e173926b --- /dev/null +++ b/docs/v2.1.0/assets/search.js @@ -0,0 +1 @@ +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA9VdXZPbNrL9L/KromWD337Ljp0b37ITl51sHqZSLlrCzHAjkbokNfasK//9FkBSagANCfxQJvs0UzNE86Bx0A30Aclvi6r8Ui9e3n5b/JEXm8VLtlwU2Y4vXi72bP/djm/y7LttmW149d26rPhiuThU28XLxa7cHLa8/see7T/Jqz61V30SV60emt12sVyst1ld83rxcrH4c9nfAVh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UdN7fRVAnIng8tLjvm0rfD19T7FHN4RuAWh1hghlCplPjdTajIO0O48cEsmh5pvSDIjU77bxHgUkr5wE9sTITZGbndU44gqV4pr2o64vvDPVbPeZV93vBaqcq2pPhFC5lLe/n252Od7vhULhJe3v//55/8Dp+bzZtzzAAA="; \ No newline at end of file diff --git a/docs/v2.1.0/assets/style.css b/docs/v2.1.0/assets/style.css new file mode 100644 index 00000000..178bfb02 --- /dev/null +++ b/docs/v2.1.0/assets/style.css @@ -0,0 +1,1493 @@ +:root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: #222; + --light-color-text-aside: #6e6e6e; + + --light-color-icon-background: var(--light-color-background); + --light-color-icon-text: var(--light-color-text); + + --light-color-comment-tag-text: var(--light-color-text); + --light-color-comment-tag: var(--light-color-background); + + --light-color-link: #1f70c2; + --light-color-focus-outline: #3584e4; + + --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: #4d7fff; + --light-color-ts-property: #ff984d; + --light-color-ts-method: #ff4db8; + --light-color-ts-reference: #ff4d82; + --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: #ff4d4d; + --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-color-document: #000000; + + --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-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; + --dark-color-text: #f5f5f5; + --dark-color-text-aside: #dddddd; + + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-icon-text: var(--dark-color-text); + + --dark-color-comment-tag-text: var(--dark-color-text); + --dark-color-comment-tag: var(--dark-color-background); + + --dark-color-link: #00aff4; + --dark-color-focus-outline: #4c97f2; + + --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: #4d7fff; + --dark-color-ts-property: #ff984d; + --dark-color-ts-method: #ff4db8; + --dark-color-ts-reference: #ff4d82; + --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: #ff4d4d; + --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-color-document: #ffffff; + + --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-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-icon-background: var(--light-color-icon-background); + --color-icon-text: var(--light-color-icon-text); + + --color-comment-tag-text: var(--light-color-text); + --color-comment-tag: var(--light-color-background); + + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-project: var(--light-color-ts-project); + --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-reference: var(--light-color-ts-reference); + --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); + --color-document: var(--light-color-document); + + --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-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-icon-background: var(--dark-color-icon-background); + --color-icon-text: var(--dark-color-icon-text); + + --color-comment-tag-text: var(--dark-color-text); + --color-comment-tag: var(--dark-color-background); + + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-project: var(--dark-color-ts-project); + --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-reference: var(--dark-color-ts-reference); + --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); + --color-document: var(--dark-color-document); + + --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-icon-text: var(--light-color-icon-text); + + --color-comment-tag-text: var(--light-color-text); + --color-comment-tag: var(--light-color-background); + + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-project: var(--light-color-ts-project); + --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-reference: var(--light-color-ts-reference); + --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); + --color-document: var(--light-color-document); + + --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-icon-text: var(--dark-color-icon-text); + + --color-comment-tag-text: var(--dark-color-text); + --color-comment-tag: var(--dark-color-background); + + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-project: var(--dark-color-ts-project); + --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-reference: var(--dark-color-ts-reference); + --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); + --color-document: var(--dark-color-document); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); +} + +*:focus-visible, +.tsd-accordion-summary:focus-visible svg { + outline: 2px solid var(--color-focus-outline); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +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; +} + +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; +} +footer > p { + 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; +} +a.tsd-anchor-link { + color: var(--color-text); +} + +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-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: -moz-fit-content; + width: fit-content; + align-items: center; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + 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-visible + svg { + outline: 2px solid var(--color-focus-outline); +} +.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); +} + +.settings-label { + font-weight: bold; + text-transform: uppercase; + display: inline-block; +} + +.tsd-filter-visibility .settings-label { + margin: 0.75rem 0 0.5rem 0; +} + +.tsd-theme-toggle .settings-label { + margin: 0.75rem 0.75rem 0 0; +} + +.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-navigation .tsd-nav-link { + display: none; +} +.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-section { + margin-left: 10px; +} +.tsd-page-navigation-section > summary { + padding: 0.25rem; +} +.tsd-page-navigation-section > div { + margin-left: 20px; +} +.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 { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + 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-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; + vertical-align: text-top; +} +.tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; +} +.tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; +} + +.tsd-no-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; +} +.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: 2rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} +.tsd-panel-group > .tsd-accordion-summary { + margin-bottom: 1rem; +} + +#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-signatures .tsd-index-signature:not(:last-child) { + margin-bottom: 1em; +} +.tsd-signatures .tsd-index-signature .tsd-signature { + border-width: 1px; +} +.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-reference { + color: var(--color-ts-reference); +} +.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-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%; + } + #tsd-toolbar-links { + display: none; + } + .tsd-navigation .tsd-nav-link { + display: flex; + } +} + +/* 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; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +} diff --git a/docs/v2.1.0/classes/p2p_media_loader_core.Core.html b/docs/v2.1.0/classes/p2p_media_loader_core.Core.html new file mode 100644 index 00000000..cb643fe2 --- /dev/null +++ b/docs/v2.1.0/classes/p2p_media_loader_core.Core.html @@ -0,0 +1,253 @@ +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

    • Optionalconfig: Partial<CoreConfig>

      Optional partial configuration to override default settings.

      +

    Returns Core<TStream>

    // Create a Core instance with custom configuration for HTTP and P2P downloads.
    const core = new Core({
    simultaneousHttpDownloads: 5,
    simultaneousP2PDownloads: 5,
    httpErrorRetries: 5,
    p2pErrorRetries: 5
    }); +
    + +
    // 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 of dynamically updating the download time windows and timeout settings.
    const dynamicConfig = {
    httpDownloadTimeWindow: 60, // Set HTTP download time window to 60 seconds
    p2pDownloadTimeWindow: 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.

      +
    • OptionaladdSegments: Iterable<Segment, any, any>

      Optional segments to add to the stream.

      +
    • OptionalremoveSegmentIds: Iterable<string, any, any>

      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 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

diff --git a/docs/v2.1.0/classes/p2p_media_loader_core.CoreRequestError.html b/docs/v2.1.0/classes/p2p_media_loader_core.CoreRequestError.html new file mode 100644 index 00000000..b8ee1d83 --- /dev/null +++ b/docs/v2.1.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'.

+
diff --git a/docs/v2.1.0/classes/p2p_media_loader_core.RequestError.html b/docs/v2.1.0/classes/p2p_media_loader_core.RequestError.html new file mode 100644 index 00000000..a0f11d28 --- /dev/null +++ b/docs/v2.1.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.

+
diff --git a/docs/v2.1.0/classes/p2p_media_loader_hlsjs.HlsJsP2PEngine.html b/docs/v2.1.0/classes/p2p_media_loader_hlsjs.HlsJsP2PEngine.html new file mode 100644 index 00000000..350103df --- /dev/null +++ b/docs/v2.1.0/classes/p2p_media_loader_hlsjs.HlsJsP2PEngine.html @@ -0,0 +1,228 @@ +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.

+
// 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?: Partial<HlsConfig> & {
        p2p?: Partial<Omit<HlsJsP2PEngineConfig, "core">> & {
            core?: Partial<CoreConfig>;
        } & {
            onHlsJsCreated?: ((hls: HlsWithP2PInstance<typeof Hls>) => void);
        };
    }) => HlsWithP2PInstance<Hls>)

      +
    • The enhanced Hls.js class with P2P functionalities.
    • +
    +
    const HlsWithP2P = HlsJsP2PEngine.injectMixin(Hls);

    const hls = new HlsWithP2P({
    // Hls.js configuration
    startLevel: 0, // Example of Hls.js config parameter
    p2p: {
    core: {
    // P2P core 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

    // Listening for a segment being successfully loaded
    p2pEngine.addEventListener('onSegmentLoaded', (details) => {
    console.log('Segment Loaded:', details);
    }); +
    + +
    // Handling segment load errors
    p2pEngine.addEventListener('onSegmentError', (errorDetails) => {
    console.error('Error loading segment:', errorDetails);
    }); +
    + +
    // 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.

    +

    Returns {
        fLoader: unknown;
        pLoader: unknown;
    }

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

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

    +

    Parameters

    Returns void

    // 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

diff --git a/docs/v2.1.0/classes/p2p_media_loader_shaka.ShakaP2PEngine.html b/docs/v2.1.0/classes/p2p_media_loader_shaka.ShakaP2PEngine.html new file mode 100644 index 00000000..3de9d6aa --- /dev/null +++ b/docs/v2.1.0/classes/p2p_media_loader_shaka.ShakaP2PEngine.html @@ -0,0 +1,225 @@ +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.

+
// 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

    • Optionalconfig: 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

    // 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

    // Listening for a segment being successfully loaded
    shakaP2PEngine.addEventListener('onSegmentLoaded', (details) => {
    console.log('Segment Loaded:', details);
    }); +
    + +
    // Handling segment load errors
    shakaP2PEngine.addEventListener('onSegmentError', (errorDetails) => {
    console.error('Error loading segment:', errorDetails);
    }); +
    + +
    // 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

diff --git a/docs/v2.1.0/index.html b/docs/v2.1.0/index.html new file mode 100644 index 00000000..9bced54d --- /dev/null +++ b/docs/v2.1.0/index.html @@ -0,0 +1,280 @@ +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.

+

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. +

    Provide Node.js polyfills

    +

    To ensure the P2P Media Loader works correctly in a browser environment, you must provide Node.js polyfills required by bittorrent-tracker dependency.

    +
      +
    • +

      Vite configuration example:

      +
      // vite.config.ts
      import { defineConfig } from "vite";
      import { nodePolyfills } from "vite-plugin-node-polyfills";

      export default defineConfig({
      plugins: [nodePolyfills()],
      }); +
      + +
    • +
    • +

      Webpack configuration example:

      +
      // webpack.config.mjs
      import NodePolyfillPlugin from "node-polyfill-webpack-plugin";

      export default {
      plugins: [new NodePolyfillPlugin({ additionalAliases: ["process"] })],
      }; +
      + +
    • +
    +
  4. +
  5. +

    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); +
      + +
    • +
    +
  6. +
+

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

+

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

+
<!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@^2/dist/p2p-media-loader-core.es.min.js",
"p2p-media-loader-hlsjs": "https://cdn.jsdelivr.net/npm/p2p-media-loader-hlsjs@^2/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> +
+ +
<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> +
+ +
<script type="module">
import { HlsJsP2PEngine } from "p2p-media-loader-hlsjs";

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

const player = new Playerjs({
id: "player",
hlsconfig: {
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.p2pEngine.addEventListener("onPeerConnect", (details) => {
console.log(`Connected to peer ${details.peerId})`);
});
},
},
},
});
</script> +
+ +
<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> +
+ +
<script type="module">
import { HlsJsP2PEngine } from "p2p-media-loader-hlsjs";

const engine = new HlsJsP2PEngine({
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`,
playback: {
hlsjsConfig: {
...engine.getConfigForHlsJs(),
},
},
});

engine.bindHls(() => clapprPlayer.core.getCurrentPlayback()?._hls);
</script> +
+ +
<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> +
+ +
<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> +
+ +
<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> +
+ +

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@^2/dist/p2p-media-loader-core.es.min.js",
"p2p-media-loader-shaka": "https://cdn.jsdelivr.net/npm/p2p-media-loader-shaka@^2/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();

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
},
});

//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> +
+ +
<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
},
});

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> +
+ +
<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
},
});

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> +
+ +
<script type="module">
import { ShakaP2PEngine } from "p2p-media-loader-shaka";

ShakaP2PEngine.registerPlugins();

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
},
});
const shakaPlayer = new shaka.Player();

shakaPlayer.attach(videoElement);

shakaP2PEngine.bindShakaPlayer(shakaPlayer);

shakaPlayer.load(streamUrl);

const plyrPlayer = new Plyr(videoElement);
};

initPlayer();
</script> +
+ +
diff --git a/docs/v2.1.0/interfaces/p2p_media_loader_core.SegmentStorage.html b/docs/v2.1.0/interfaces/p2p_media_loader_core.SegmentStorage.html new file mode 100644 index 00000000..e517b45a --- /dev/null +++ b/docs/v2.1.0/interfaces/p2p_media_loader_core.SegmentStorage.html @@ -0,0 +1,224 @@ +SegmentStorage | P2P Media Loader Documentation

Segments storage interface

+
interface SegmentStorage {
    initialize(coreConfig: CommonCoreConfig, mainStreamConfig: StreamConfig, secondaryStreamConfig: StreamConfig): Promise<void>;
    onPlaybackUpdated(position: number, rate: number): void;
    onSegmentRequested(swarmId: string, streamId: string, segmentId: number, startTime: number, endTime: number, streamType: StreamType, isLiveStream: boolean): void;
    storeSegment(swarmId: string, streamId: string, segmentId: number, data: ArrayBuffer, startTime: number, endTime: number, streamType: StreamType, isLiveStream: boolean): Promise<void>;
    getSegmentData(swarmId: string, streamId: string, segmentId: number): Promise<undefined | ArrayBuffer>;
    getUsage(): {
        totalCapacity: number;
        usedCapacity: number;
    };
    hasSegment(swarmId: string, streamId: string, segmentId: number): boolean;
    getStoredSegmentIds(swarmId: string, streamId: string): number[];
    setSegmentChangeCallback(callback: ((streamId: string) => void)): void;
    destroy(): void;
}

Methods

  • Initializes storage

    +

    Parameters

    Returns Promise<void>

  • Provides playback position from player

    +

    Parameters

    • position: number

      Playback position

      +
    • rate: number

      Playback rate

      +

    Returns void

  • Provides segment request information from player

    +

    Parameters

    • swarmId: string

      Swarm identifier

      +
    • streamId: string

      Stream identifier

      +
    • segmentId: number

      Segment identifier

      +
    • startTime: number

      Segment start time

      +
    • endTime: number

      Segment end time

      +
    • streamType: StreamType

      Stream type

      +
    • isLiveStream: boolean

      Is live stream

      +

    Returns void

  • Stores segment data

    +

    Parameters

    • swarmId: string

      Swarm identifier

      +
    • streamId: string

      Stream identifier

      +
    • segmentId: number

      Segment identifier

      +
    • data: ArrayBuffer

      Segment data

      +
    • startTime: number

      Segment start time

      +
    • endTime: number

      Segment end time

      +
    • streamType: StreamType

      Stream type

      +
    • isLiveStream: boolean

      Is live stream

      +

    Returns Promise<void>

  • Returns segment data

    +

    Parameters

    • swarmId: string

      Swarm identifier

      +
    • streamId: string

      Stream identifier

      +
    • segmentId: number

      Segment identifier

      +

    Returns Promise<undefined | ArrayBuffer>

  • Returns used memory information in the storage

    +

    Returns {
        totalCapacity: number;
        usedCapacity: number;
    }

    • totalCapacity: number
    • usedCapacity: number
  • Returns true if segment is in storage

    +

    Parameters

    • swarmId: string

      Swarm identifier

      +
    • streamId: string

      Stream identifier

      +
    • segmentId: number

      Segment identifier

      +

    Returns boolean

  • Returns segment IDs of a stream that are stored in the storage

    +

    Parameters

    • swarmId: string

      Swarm identifier

      +
    • streamId: string

      Stream identifier

      +

    Returns number[]

  • Sets segment change callback function

    +

    Parameters

    • callback: ((streamId: string) => void)

      Callback function that has to be called when segments appear or disappear in the storage

      +
        • (streamId): void
        • Parameters

          • streamId: string

          Returns void

    Returns void

diff --git a/docs/v2.1.0/modules.html b/docs/v2.1.0/modules.html new file mode 100644 index 00000000..1d0e482e --- /dev/null +++ b/docs/v2.1.0/modules.html @@ -0,0 +1,174 @@ +P2P Media Loader Documentation

P2P Media Loader Documentation

Index

diff --git a/docs/v2.1.0/modules/p2p_media_loader_core.html b/docs/v2.1.0/modules/p2p_media_loader_core.html new file mode 100644 index 00000000..8ef92bdb --- /dev/null +++ b/docs/v2.1.0/modules/p2p_media_loader_core.html @@ -0,0 +1,207 @@ +p2p-media-loader-core | P2P Media Loader Documentation
diff --git a/docs/v2.1.0/modules/p2p_media_loader_hlsjs.html b/docs/v2.1.0/modules/p2p_media_loader_hlsjs.html new file mode 100644 index 00000000..f8efa759 --- /dev/null +++ b/docs/v2.1.0/modules/p2p_media_loader_hlsjs.html @@ -0,0 +1,180 @@ +p2p-media-loader-hlsjs | P2P Media Loader Documentation
diff --git a/docs/v2.1.0/modules/p2p_media_loader_shaka.html b/docs/v2.1.0/modules/p2p_media_loader_shaka.html new file mode 100644 index 00000000..5c65dbe2 --- /dev/null +++ b/docs/v2.1.0/modules/p2p_media_loader_shaka.html @@ -0,0 +1,178 @@ +p2p-media-loader-shaka | P2P Media Loader Documentation
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.ByteRange.html b/docs/v2.1.0/types/p2p_media_loader_core.ByteRange.html new file mode 100644 index 00000000..e08dad27 --- /dev/null +++ b/docs/v2.1.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.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.CommonCoreConfig.html b/docs/v2.1.0/types/p2p_media_loader_core.CommonCoreConfig.html new file mode 100644 index 00000000..f8227fa6 --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.CommonCoreConfig.html @@ -0,0 +1,194 @@ +CommonCoreConfig | P2P Media Loader Documentation
CommonCoreConfig: {
    segmentMemoryStorageLimit: number | undefined;
    customSegmentStorageFactory?: ((isLive: boolean) => SegmentStorage);
}

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

+

Type declaration

  • segmentMemoryStorageLimit: number | undefined

    Defines the memory storage limit for media segments, in MiB.

    +
    segmentMemoryStorageLimit: undefined
    +
    + +
      +
    • When undefined, the default limit is determined based on the device type and browser: +
        +
      • Desktop: 4096 MiB
      • +
      • Android: 2048 MiB
      • +
      • iOS: 1024 MiB
      • +
      • Android WebView: 1024 MiB
      • +
      • iOS WebView: 1024 MiB
      • +
      +
    • +
    +
  • OptionalcustomSegmentStorageFactory?: ((isLive: boolean) => SegmentStorage)

    Optional custom storage factory for the segments storage.

    +
    customSegmentStorageFactory: undefined
    +
    + +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.CoreConfig.html b/docs/v2.1.0/types/p2p_media_loader_core.CoreConfig.html new file mode 100644 index 00000000..9c586205 --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.CoreConfig.html @@ -0,0 +1,184 @@ +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

  • OptionalmainStream?: Partial<StreamConfig>

    Optional configuration for the main stream.

    +
  • OptionalsecondaryStream?: Partial<StreamConfig>

    Optional configuration for the secondary stream.

    +
const config: CoreConfig = {
highDemandTimeWindow: 15,
httpDownloadTimeWindow: 3000,
p2pDownloadTimeWindow: 6000,
swarmId: "custom swarm ID for 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",
}, +
+ +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.CoreEventMap.html b/docs/v2.1.0/types/p2p_media_loader_core.CoreEventMap.html new file mode 100644 index 00000000..9c383b33 --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.CoreEventMap.html @@ -0,0 +1,201 @@ +CoreEventMap | P2P Media Loader Documentation
CoreEventMap: {
    onSegmentLoaded: ((params: SegmentLoadDetails) => void);
    onSegmentError: ((params: SegmentErrorDetails) => void);
    onSegmentAbort: ((params: SegmentAbortDetails) => void);
    onSegmentStart: ((params: SegmentStartDetails) => void);
    onPeerConnect: ((params: PeerDetails) => void);
    onPeerClose: ((params: PeerDetails) => void);
    onPeerError: ((params: PeerErrorDetails) => void);
    onChunkDownloaded: ((bytesLength: number, downloadSource: DownloadSource, peerId?: string) => void);
    onChunkUploaded: ((bytesLength: number, peerId: string) => void);
    onTrackerError: ((params: TrackerErrorDetails) => void);
    onTrackerWarning: ((params: TrackerWarningDetails) => 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: SegmentLoadDetails) => void)

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

    +
      • (params): void
      • Parameters

        Returns void

  • onSegmentError: ((params: SegmentErrorDetails) => void)

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

    +
      • (params): void
      • Parameters

        Returns void

  • onSegmentAbort: ((params: SegmentAbortDetails) => void)

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

    +
      • (params): void
      • Parameters

        Returns void

  • onSegmentStart: ((params: SegmentStartDetails) => void)

    Fired at the beginning of a segment download process.

    +
      • (params): void
      • Parameters

        Returns void

  • onPeerConnect: ((params: PeerDetails) => void)

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

    +
      • (params): void
      • Parameters

        • params: PeerDetails

          Contains details about the peer that the event is about.

          +

        Returns void

  • onPeerClose: ((params: PeerDetails) => void)

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

    +
      • (params): void
      • Parameters

        • params: PeerDetails

          Contains details about the peer that the event is about.

          +

        Returns void

  • onPeerError: ((params: PeerErrorDetails) => void)

    Triggered when an error occurs during a peer-to-peer connection.

    +
      • (params): void
      • Parameters

        • params: PeerErrorDetails

          Contains details about the error and the peer that the event is about.

          +

        Returns void

  • onChunkDownloaded: ((bytesLength: number, downloadSource: DownloadSource, peerId?: string) => 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

          The source of the download.

          +
        • OptionalpeerId: string

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

          +

        Returns void

  • onChunkUploaded: ((bytesLength: number, peerId: string) => 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

  • onTrackerError: ((params: TrackerErrorDetails) => void)

    Called when an error occurs during the tracker request process.

    +
      • (params): void
      • Parameters

        Returns void

  • onTrackerWarning: ((params: TrackerWarningDetails) => void)

    Called when a warning occurs during the tracker request process.

    +
      • (params): void
      • Parameters

        Returns void

diff --git a/docs/v2.1.0/types/p2p_media_loader_core.DefinedCoreConfig.html b/docs/v2.1.0/types/p2p_media_loader_core.DefinedCoreConfig.html new file mode 100644 index 00000000..d3aae0b6 --- /dev/null +++ b/docs/v2.1.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.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.DownloadSource.html b/docs/v2.1.0/types/p2p_media_loader_core.DownloadSource.html new file mode 100644 index 00000000..6b88c653 --- /dev/null +++ b/docs/v2.1.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.

+
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.DynamicCoreConfig.html b/docs/v2.1.0/types/p2p_media_loader_core.DynamicCoreConfig.html new file mode 100644 index 00000000..24fb612d --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.DynamicCoreConfig.html @@ -0,0 +1,180 @@ +DynamicCoreConfig | P2P Media Loader Documentation
DynamicCoreConfig: Partial<Pick<CoreConfig, DynamicStreamProperties>> & Partial<CommonCoreConfig> & {
    mainStream?: DynamicStreamConfig;
    secondaryStream?: DynamicStreamConfig;
}

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

+

Type declaration

  • OptionalmainStream?: DynamicStreamConfig

    Optional dynamic configuration for the main stream.

    +
  • OptionalsecondaryStream?: DynamicStreamConfig

    Optional dynamic configuration for the secondary stream.

    +
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,
}
}; +
+ +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.DynamicStreamConfig.html b/docs/v2.1.0/types/p2p_media_loader_core.DynamicStreamConfig.html new file mode 100644 index 00000000..8ed61e25 --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.DynamicStreamConfig.html @@ -0,0 +1,175 @@ +DynamicStreamConfig | P2P Media Loader Documentation
DynamicStreamConfig: Partial<Pick<StreamConfig, DynamicStreamProperties>>

Represents a partial configuration for a stream with dynamic properties.

+
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.DynamicStreamProperties.html b/docs/v2.1.0/types/p2p_media_loader_core.DynamicStreamProperties.html new file mode 100644 index 00000000..d874a8cb --- /dev/null +++ b/docs/v2.1.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"
    | "isP2PUploadDisabled"

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

+
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.EngineCallbacks.html b/docs/v2.1.0/types/p2p_media_loader_core.EngineCallbacks.html new file mode 100644 index 00000000..d2b94886 --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.EngineCallbacks.html @@ -0,0 +1,179 @@ +EngineCallbacks | P2P Media Loader Documentation
EngineCallbacks: {
    onSuccess: ((response: SegmentResponse) => void);
    onError: ((reason: CoreRequestError) => void);
}

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

+

Type declaration

  • onSuccess: ((response: SegmentResponse) => void)

    Called when the operation is successful.

    +
      • (response): void
      • Parameters

        Returns void

  • onError: ((reason: CoreRequestError) => void)

    Called when the operation encounters an error.

    +
      • (reason): void
      • Parameters

        Returns void

diff --git a/docs/v2.1.0/types/p2p_media_loader_core.HttpRequestErrorType.html b/docs/v2.1.0/types/p2p_media_loader_core.HttpRequestErrorType.html new file mode 100644 index 00000000..9385e165 --- /dev/null +++ b/docs/v2.1.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.

+
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.PeerDetails.html b/docs/v2.1.0/types/p2p_media_loader_core.PeerDetails.html new file mode 100644 index 00000000..66a264cf --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.PeerDetails.html @@ -0,0 +1,177 @@ +PeerDetails | P2P Media Loader Documentation
PeerDetails: {
    peerId: string;
    streamType: StreamType;
}

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.

    +
  • streamType: StreamType

    The type of stream that the peer is connected to.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.PeerErrorDetails.html b/docs/v2.1.0/types/p2p_media_loader_core.PeerErrorDetails.html new file mode 100644 index 00000000..ce151c28 --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.PeerErrorDetails.html @@ -0,0 +1,178 @@ +PeerErrorDetails | P2P Media Loader Documentation
PeerErrorDetails: {
    peerId: string;
    streamType: StreamType;
    error: Error;
}

Represents the details of a peer error event.

+

Type declaration

  • peerId: string

    The unique identifier for a peer in the network.

    +
  • streamType: StreamType

    The type of stream that the peer is connected to.

    +
  • error: Error

    The error that occurred during the peer-to-peer connection.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.PeerRequestErrorType.html b/docs/v2.1.0/types/p2p_media_loader_core.PeerRequestErrorType.html new file mode 100644 index 00000000..c27caf68 --- /dev/null +++ b/docs/v2.1.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.

+
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.RequestAbortErrorType.html b/docs/v2.1.0/types/p2p_media_loader_core.RequestAbortErrorType.html new file mode 100644 index 00000000..eebdf08c --- /dev/null +++ b/docs/v2.1.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.

+
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.RequestErrorType.html b/docs/v2.1.0/types/p2p_media_loader_core.RequestErrorType.html new file mode 100644 index 00000000..3849109c --- /dev/null +++ b/docs/v2.1.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.

+
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.Segment.html b/docs/v2.1.0/types/p2p_media_loader_core.Segment.html new file mode 100644 index 00000000..5908228d --- /dev/null +++ b/docs/v2.1.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

  • ReadonlyruntimeId: string

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

    +
  • ReadonlyexternalId: number

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

    +
  • Readonlyurl: string

    The URL from which the segment can be downloaded.

    +
  • Optional ReadonlybyteRange?: ByteRange

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

    +
  • ReadonlystartTime: number

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

    +
  • ReadonlyendTime: number

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

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.SegmentAbortDetails.html b/docs/v2.1.0/types/p2p_media_loader_core.SegmentAbortDetails.html new file mode 100644 index 00000000..37f4d17f --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.SegmentAbortDetails.html @@ -0,0 +1,179 @@ +SegmentAbortDetails | P2P Media Loader Documentation
SegmentAbortDetails: {
    segment: Segment;
    downloadSource: DownloadSource | undefined;
    peerId: string | undefined;
    streamType: StreamType;
}

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.

    +
  • streamType: StreamType

    The type of stream that the segment is associated with.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.SegmentErrorDetails.html b/docs/v2.1.0/types/p2p_media_loader_core.SegmentErrorDetails.html new file mode 100644 index 00000000..6d2a9236 --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.SegmentErrorDetails.html @@ -0,0 +1,180 @@ +SegmentErrorDetails | P2P Media Loader Documentation
SegmentErrorDetails: {
    error: RequestError;
    segment: Segment;
    downloadSource: DownloadSource;
    peerId: string | undefined;
    streamType: StreamType;
}

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.

    +
  • streamType: StreamType

    The type of stream that the segment is associated with.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.SegmentLoadDetails.html b/docs/v2.1.0/types/p2p_media_loader_core.SegmentLoadDetails.html new file mode 100644 index 00000000..b0dd8295 --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.SegmentLoadDetails.html @@ -0,0 +1,180 @@ +SegmentLoadDetails | P2P Media Loader Documentation
SegmentLoadDetails: {
    segmentUrl: string;
    bytesLength: number;
    downloadSource: DownloadSource;
    peerId: string | undefined;
    streamType: StreamType;
}

Represents the details about a loaded segment.

+

Type declaration

  • segmentUrl: string

    The URL of the loaded segment

    +
  • 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.

    +
  • streamType: StreamType

    The segment that the event is about.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.SegmentResponse.html b/docs/v2.1.0/types/p2p_media_loader_core.SegmentResponse.html new file mode 100644 index 00000000..ca4f84e9 --- /dev/null +++ b/docs/v2.1.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.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.SegmentStartDetails.html b/docs/v2.1.0/types/p2p_media_loader_core.SegmentStartDetails.html new file mode 100644 index 00000000..9a04bffa --- /dev/null +++ b/docs/v2.1.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.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.SegmentWithStream.html b/docs/v2.1.0/types/p2p_media_loader_core.SegmentWithStream.html new file mode 100644 index 00000000..0abb3314 --- /dev/null +++ b/docs/v2.1.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

diff --git a/docs/v2.1.0/types/p2p_media_loader_core.Stream.html b/docs/v2.1.0/types/p2p_media_loader_core.Stream.html new file mode 100644 index 00000000..2ace8dc3 --- /dev/null +++ b/docs/v2.1.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

  • ReadonlyruntimeId: string

    Runtime identifier of the stream from an engine.

    +
  • Readonlytype: StreamType

    Stream type.

    +
  • Readonlyindex: number

    Stream index in the manifest.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.StreamConfig.html b/docs/v2.1.0/types/p2p_media_loader_core.StreamConfig.html new file mode 100644 index 00000000..14ec6b27 --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.StreamConfig.html @@ -0,0 +1,275 @@ +StreamConfig | P2P Media Loader Documentation
StreamConfig: {
    isP2PUploadDisabled: boolean;
    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: string, byteRange: ByteRange | undefined, data: ArrayBuffer) => Promise<boolean>);
    httpRequestSetup?: ((segmentUrl: string, segmentByteRange: ByteRange | undefined, requestAbortSignal: AbortSignal, requestByteRange: {
        start: number;
        end?: number;
    } | undefined) => Promise<Request | undefined | null>);
}

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

+

Type declaration

  • isP2PUploadDisabled: boolean

    Controls if peer-to-peer upload is disabled for the stream. +If true, the stream only downloads segments without uploading to peers.

    +
    isP2PUploadDisabled: false
    +
    + +
  • isP2PDisabled: boolean

    Controls whether peer-to-peer functionality is disabled for the stream.

    +
    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.

    +
    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.

    +
    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.

    +
    p2pDownloadTimeWindow: 6000
    +
    + +
  • simultaneousHttpDownloads: number

    Maximum number of simultaneous HTTP downloads allowed.

    +
    simultaneousHttpDownloads: 2
    +
    + +
  • simultaneousP2PDownloads: number

    Maximum number of simultaneous P2P downloads allowed.

    +
    simultaneousP2PDownloads: 3
    +
    + +
  • webRtcMaxMessageSize: number

    Maximum message size for WebRTC communications, in bytes.

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

    Timeout for not receiving bytes from P2P, in milliseconds.

    +
    p2pNotReceivingBytesTimeoutMs: 2000
    +
    + +
  • p2pInactiveLoaderDestroyTimeoutMs: number

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

    +
    p2pInactiveLoaderDestroyTimeoutMs: 30 * 1000
    +
    + +
  • httpNotReceivingBytesTimeoutMs: number

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

    +
    httpNotReceivingBytesTimeoutMs: 3000
    +
    + +
  • httpErrorRetries: number

    Number of retries allowed after an HTTP error.

    +
    httpErrorRetries: 3
    +
    + +
  • p2pErrorRetries: number

    Number of retries allowed after a P2P error.

    +
    p2pErrorRetries: 3
    +
    + +
  • announceTrackers: string[]

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

    +

    WARNING: In the Safari browser, only the first tracker will be used. Safari has issues with multiple trackers, +leading to problems with sending SDP messages for WebRTC signaling.

    +

    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.

    +
    {
    "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.

    +
    trackerClientVersionPrefix: undefined
    +
    + +
  • OptionalswarmId?: 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.

    +
    swarmId: undefined
    +
    + +
  • OptionalvalidateP2PSegment?: ((url: string, byteRange: ByteRange | undefined, data: ArrayBuffer) => Promise<boolean>)

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

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

        • url: string

          URL of the segment to validate.

          +
        • byteRange: ByteRange | undefined

          Optional byte range of the segment.

          +
        • data: ArrayBuffer

          Downloaded segment data.

          +

        Returns Promise<boolean>

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

        +
  • OptionalhttpRequestSetup?: ((segmentUrl: string, segmentByteRange: ByteRange | undefined, requestAbortSignal: AbortSignal, requestByteRange: {
        start: number;
        end?: number;
    } | undefined) => Promise<Request | undefined | null>)

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

    +
    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>

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

        +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.StreamType.html b/docs/v2.1.0/types/p2p_media_loader_core.StreamType.html new file mode 100644 index 00000000..4859faae --- /dev/null +++ b/docs/v2.1.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.

+
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.StreamWithSegments.html b/docs/v2.1.0/types/p2p_media_loader_core.StreamWithSegments.html new file mode 100644 index 00000000..402e0f5f --- /dev/null +++ b/docs/v2.1.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.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.TrackerErrorDetails.html b/docs/v2.1.0/types/p2p_media_loader_core.TrackerErrorDetails.html new file mode 100644 index 00000000..d01167ea --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.TrackerErrorDetails.html @@ -0,0 +1,177 @@ +TrackerErrorDetails | P2P Media Loader Documentation
TrackerErrorDetails: {
    streamType: StreamType;
    error: unknown;
}

Represents the details of a tracker error event.

+

Type declaration

  • streamType: StreamType

    The type of stream that the tracker is for.

    +
  • error: unknown

    The error that occurred during the tracker request.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_core.TrackerWarningDetails.html b/docs/v2.1.0/types/p2p_media_loader_core.TrackerWarningDetails.html new file mode 100644 index 00000000..35b31d42 --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_core.TrackerWarningDetails.html @@ -0,0 +1,176 @@ +TrackerWarningDetails | P2P Media Loader Documentation
TrackerWarningDetails: {
    streamType: StreamType;
    warning: unknown;
}

Type declaration

  • streamType: StreamType

    The type of stream that the tracker is for.

    +
  • warning: unknown

    The warning that occurred during the tracker request.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_hlsjs.DynamicHlsJsP2PEngineConfig.html b/docs/v2.1.0/types/p2p_media_loader_hlsjs.DynamicHlsJsP2PEngineConfig.html new file mode 100644 index 00000000..79b53941 --- /dev/null +++ b/docs/v2.1.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

diff --git a/docs/v2.1.0/types/p2p_media_loader_hlsjs.HlsJsP2PEngineConfig.html b/docs/v2.1.0/types/p2p_media_loader_hlsjs.HlsJsP2PEngineConfig.html new file mode 100644 index 00000000..51a60f8d --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_hlsjs.HlsJsP2PEngineConfig.html @@ -0,0 +1,176 @@ +HlsJsP2PEngineConfig | P2P Media Loader Documentation
HlsJsP2PEngineConfig: {
    core: DefinedCoreConfig;
}

Represents the complete configuration for HlsJsP2PEngine.

+

Type declaration

diff --git a/docs/v2.1.0/types/p2p_media_loader_hlsjs.HlsWithP2PConfig.html b/docs/v2.1.0/types/p2p_media_loader_hlsjs.HlsWithP2PConfig.html new file mode 100644 index 00000000..c1c00642 --- /dev/null +++ b/docs/v2.1.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: HlsWithP2PInstance<HlsType>) => 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.

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_hlsjs.HlsWithP2PInstance.html b/docs/v2.1.0/types/p2p_media_loader_hlsjs.HlsWithP2PInstance.html new file mode 100644 index 00000000..1b1b5413 --- /dev/null +++ b/docs/v2.1.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

diff --git a/docs/v2.1.0/types/p2p_media_loader_hlsjs.PartialHlsJsP2PEngineConfig.html b/docs/v2.1.0/types/p2p_media_loader_hlsjs.PartialHlsJsP2PEngineConfig.html new file mode 100644 index 00000000..ad42b0c1 --- /dev/null +++ b/docs/v2.1.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

  • Optionalcore?: Partial<CoreConfig>

    Partial core config

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_shaka.DynamicShakaP2PEngineConfig.html b/docs/v2.1.0/types/p2p_media_loader_shaka.DynamicShakaP2PEngineConfig.html new file mode 100644 index 00000000..5d739a04 --- /dev/null +++ b/docs/v2.1.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

diff --git a/docs/v2.1.0/types/p2p_media_loader_shaka.PartialShakaEngineConfig.html b/docs/v2.1.0/types/p2p_media_loader_shaka.PartialShakaEngineConfig.html new file mode 100644 index 00000000..2b25bdd7 --- /dev/null +++ b/docs/v2.1.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

  • Optionalcore?: Partial<CoreConfig>

    Partial core config

    +
diff --git a/docs/v2.1.0/types/p2p_media_loader_shaka.ShakaP2PEngineConfig.html b/docs/v2.1.0/types/p2p_media_loader_shaka.ShakaP2PEngineConfig.html new file mode 100644 index 00000000..03fcbdd9 --- /dev/null +++ b/docs/v2.1.0/types/p2p_media_loader_shaka.ShakaP2PEngineConfig.html @@ -0,0 +1,176 @@ +ShakaP2PEngineConfig | P2P Media Loader Documentation
ShakaP2PEngineConfig: {
    core: DefinedCoreConfig;
}

Represents the complete configuration for ShakaP2PEngine.

+

Type declaration