nixamp 0.28.2 → 0.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/directory.d.ts +2 -0
- package/dist/directory.js +3 -0
- package/dist/owner.js +2 -0
- package/dist/server.js +66 -1
- package/dist/translation-passes.d.ts +2 -7
- package/dist/translation-passes.js +2 -3
- package/dist/upgrade-allowance.d.ts +1 -1
- package/dist/upgrade-allowance.js +6 -3
- package/package.json +1 -1
- package/src/directory.ts +5 -0
- package/src/owner.ts +1 -0
- package/src/server.ts +57 -1
- package/src/translation-passes.ts +2 -3
- package/src/upgrade-allowance.ts +6 -3
- package/web/dist/assets/{hls-3VKVEQE3-Cw5UD-5P.js → hls-3VKVEQE3-B4Sk5BbY.js} +1 -1
- package/web/dist/assets/index-B33hHbmF.js +3 -0
- package/web/dist/assets/{mpegts-a5NkXKRN.js → mpegts-CoCC1wqt.js} +1 -1
- package/web/dist/assets/{mpegts-LO6RVLD6-DS0PXyu3.js → mpegts-LO6RVLD6-Ct0Biz5E.js} +1 -1
- package/web/dist/index.html +13 -6
- package/web/dist/sw.js +5 -5
- package/web/dist/assets/index-BqcDIh2Q.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./index-
|
|
1
|
+
import{t as e}from"./index-B33hHbmF.js";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),u=[[/^(hvc1|hev1)/i,`H.265`],[/^av01/i,`AV1`],[/^(vp09|vp9)/i,`VP9`],[/^(ec-3|ec3)/i,`Dolby Digital Plus audio`],[/^(ac-3|ac3)/i,`Dolby Digital audio`],[/^dts/i,`DTS audio`],[/^(mp4a\.69|mp4a\.6b)/i,`MP2 audio`],[/^mp3$/i,`MP3 audio`],[/^mp4a\.40\./i,`AAC audio`]];function d(e){if(!e)return null;for(let[t,n]of u)if(t.test(e))return n;return e}function f(e,t){if(!t||!e)return[];if(e===`audio`){if(/^mp4a\.40\./i.test(t))return[`audio/mp4; codecs="mp4a.40.2"`];if(/^mp3$/i.test(t))return[`audio/mpeg`,`audio/mp4; codecs="mp3"`];if(/^opus$/i.test(t))return[`audio/mp4; codecs="opus"`,`audio/mp4; codecs="Opus"`]}return[`${e}/mp4; codecs="${t}"`]}function p(e,t,n=``,r=`stream`){if(!e||typeof t!=`function`)return null;let i=[[`video`,e.videoCodec],[`audio`,e.audioCodec]],a=[];for(let[e,n]of i)if(n&&!f(e,n).some(e=>{try{return t(e)}catch{return!1}})){let e=d(n);e&&a.push(e)}if(a.length===0)return null;let o=a.length===1?a[0]:`${String(a[0])} and ${String(a[1])}`;return`This ${r} is ${String(o)}, which this browser cannot decode.${n?` ${n}`:``}`}var m=2e3,h=5e3,g=3;function _(e,t={}){return{enableWorker:t.enableWorker??!1,enableStashBuffer:!0,stashInitialSize:393216,liveBufferLatencyChasing:!1,liveBufferLatencyMaxLatency:5,liveBufferLatencyMinRemain:1,autoCleanupSourceBuffer:!0,autoCleanupMaxBackwardDuration:30,autoCleanupMinBackwardDuration:10,lazyLoad:!1,lazyLoadMaxDuration:60,lazyLoadRecoverDuration:30,seekType:`range`}}async function v(t,n={}){let{media:r,src:i,isTv:a}=t,o=await e(()=>import(`./mpegts-CoCC1wqt.js`).then(e=>l(e.default,1)),[]),s=o.default??o;if(!s.getFeatureList().mseLivePlayback)return t.onError(`This browser cannot play transport streams.`),{destroy:()=>void 0,levels:()=>[]};let c=_(a,n),u=null,d=!1,f=0,v=null,y=null,b=-1,x=0,S=()=>{v&&clearTimeout(v),y&&clearInterval(y),v=null,y=null},C=()=>{if(!u)return;let e=u;u=null;try{e.destroy()}catch{}},w=e=>{d||(d=!0,S(),C(),t.onError(e))},T=e=>{if(!d){if(f>=5){w(e);return}f+=1,S(),C(),t.onNotice(`Reconnecting\u2026 (${String(f)}/5)`),v=setTimeout(()=>{v=null,d||D()},m*2**(f-1))}},E=()=>{y&&clearInterval(y),b=r.currentTime,x=0,y=setInterval(()=>{if(!d&&u){if(r.paused||r.ended||r.seeking){x=0,b=r.currentTime;return}if(r.currentTime===b){x+=1,x>=g&&(x=0,T(`The stream stopped sending.`));return}b=r.currentTime,x=0}},h)};function D(){u=s.createPlayer({type:`mpegts`,isLive:t.live,url:i,withCredentials:n.withCredentials??!1},c),u.on(s.Events.MEDIA_INFO??`media_info`,(...e)=>{let t=e[0],r=p(t,e=>globalThis.MediaSource?.isTypeSupported?.(e)??!1,n.unplayableAdvice??``);r&&w(r)}),u.on(s.Events.ERROR??`error`,(...e)=>{let t=String(e[1]??``);T(`This stream could not be played (${t}).`)}),u.attachMediaElement(r),u.load(),E(),t.onReady?.({live:t.live,levels:[]})}let O=()=>{f=0,t.onNotice(null)};return r.addEventListener(`playing`,O),D(),{destroy(){d=!0,S(),r.removeEventListener(`playing`,O),C()},levels:()=>[]}}export{v as createMpegtsEngine,s as t};
|
package/web/dist/index.html
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<meta property="og:title" content="nixamp: broadcast live radio, TV and film from your own machine" />
|
|
18
18
|
<meta property="og:description" content="Launch your own live radio, TV and film network from your machine. Listen free, go live in one command, get paid with x402." />
|
|
19
19
|
<meta property="og:type" content="website" />
|
|
20
|
-
<script type="module" crossorigin src="/assets/index-
|
|
20
|
+
<script type="module" crossorigin src="/assets/index-B33hHbmF.js"></script>
|
|
21
21
|
<link rel="stylesheet" crossorigin href="/assets/index-BKyAT0fX.css">
|
|
22
22
|
</head>
|
|
23
23
|
<body>
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
session, which the site will serve when it refuses a server's. -->
|
|
97
97
|
<div id="embed" class="embed" hidden>
|
|
98
98
|
<iframe id="embed-frame" title="The link, played" allow="autoplay; encrypted-media; fullscreen; picture-in-picture"
|
|
99
|
-
|
|
99
|
+
referrerpolicy="strict-origin-when-cross-origin"></iframe>
|
|
100
100
|
</div>
|
|
101
101
|
<audio id="audio"></audio>
|
|
102
102
|
<div id="title-line" class="track-title" data-i18n="Nothing loaded.">Nothing loaded.</div>
|
|
@@ -121,8 +121,8 @@
|
|
|
121
121
|
title="Copy this stream's URL, to play it in VLC or another player"
|
|
122
122
|
aria-label="Copy this stream's URL" data-i18n-aria-label="Copy this stream's URL">⧉</button>
|
|
123
123
|
<button id="copy-nixamp" type="button" class="icon" hidden
|
|
124
|
-
title="Copy a nixamp
|
|
125
|
-
aria-label="Copy
|
|
124
|
+
title="Copy a nixamp link to this live room"
|
|
125
|
+
aria-label="Copy live room link" data-i18n-aria-label="Copy live room link">↗</button>
|
|
126
126
|
<button id="fullscreen" type="button" class="ghost" hidden
|
|
127
127
|
title="Full screen" data-i18n-title="Full screen" aria-label="Full screen" data-i18n-aria-label="Full screen">⛶</button>
|
|
128
128
|
<button id="download-now" type="button" class="ghost" hidden
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
<p class="hint" id="translation-balance"></p>
|
|
136
136
|
<details id="transcript-voice-settings" hidden>
|
|
137
137
|
<summary data-i18n="Audio options">Audio options</summary>
|
|
138
|
-
<label class="transcript-switch"><input type="checkbox" id="transcript-background" checked /><span data-i18n="Keep background
|
|
138
|
+
<label class="transcript-switch"><input type="checkbox" id="transcript-background" checked /><span data-i18n="Keep source background audio"> Keep source background audio</span></label>
|
|
139
139
|
<label class="background-level"><span data-i18n="Background level">Background level </span><input id="transcript-background-level" type="range" min="0" max="200" step="5" value="100" aria-valuetext="100 percent" /> <output id="transcript-background-value" for="transcript-background-level">100%</output></label>
|
|
140
140
|
<p class="hint">Speech removal is approximate; turn this off if original voices bleed through.</p>
|
|
141
141
|
<div id="transcript-speakers" role="group" aria-label="Speaker voices" data-i18n-aria-label="Speaker voices"></div>
|
|
@@ -448,6 +448,7 @@
|
|
|
448
448
|
<p class="hint">Every panel, on or off. Move a panel by dragging its ≡ handle, or focus that handle and press Alt + Up or Down. ▁ shades it to its title bar; ✕ hides it.</p>
|
|
449
449
|
<ul id="panels-list" class="directory-list panels-list"></ul>
|
|
450
450
|
<div class="picker">
|
|
451
|
+
<button id="panels-save" type="button" class="button" title="Save this panel setup on this device" data-i18n="Save setup">Save setup</button>
|
|
451
452
|
<button id="panels-reset" type="button" class="ghost" title="Every panel back where the page puts it" data-i18n="Reset layout">Reset layout</button>
|
|
452
453
|
</div>
|
|
453
454
|
</section>
|
|
@@ -460,6 +461,12 @@
|
|
|
460
461
|
nixamp.com knew about servers at all. -->
|
|
461
462
|
<section class="panel player-only col-a" data-title="Server" data-i18n-data-title="Server" id="remote-panel">
|
|
462
463
|
<p class="hint" data-i18n="Pick a server in the directory, or paste its link here.">Pick a server in the directory, or paste its link here.</p>
|
|
464
|
+
<label class="picker" for="remote-server">
|
|
465
|
+
<span data-i18n="Choose a server">Choose a server</span>
|
|
466
|
+
<select id="remote-server" aria-label="Choose a server" data-i18n-aria-label="Choose a server">
|
|
467
|
+
<option value="">Select a server…</option>
|
|
468
|
+
</select>
|
|
469
|
+
</label>
|
|
463
470
|
<form id="remote-form" class="picker">
|
|
464
471
|
<input id="remote-url" type="text" inputmode="url" placeholder="a server's link, https://…:4321/view/…" aria-label="A server's link" data-i18n-aria-label="A server's link" />
|
|
465
472
|
<button type="submit" class="button" data-i18n="Connect">Connect</button>
|
|
@@ -509,7 +516,7 @@
|
|
|
509
516
|
<a href="#account-panel" id="translation-sign-in">Sign in for free sessions or to purchase</a>
|
|
510
517
|
<div class="purchase-actions"><button type="button" class="button" id="translation-checkout" disabled data-i18n="Buy pass">Buy pass</button><a id="translation-checkout-link" target="_blank" rel="noopener noreferrer" hidden data-i18n="Open secure checkout ↗ (new tab)">Open secure checkout ↗ (new tab)</a><button type="button" id="translation-check-payment" hidden data-i18n="Check payment">Check payment</button></div>
|
|
511
518
|
<details class="purchase-terms"><summary data-i18n="Usage rates and expiry">Usage rates and expiry</summary>
|
|
512
|
-
<p class="hint">After the
|
|
519
|
+
<p class="hint">After the ten free sessions, new sessions draw from purchased credit at 5× the base speech API rates: $0.25 per 1,000 voice characters plus $1.10 per submitted audio hour. Live recognition includes repeated context, usually three submitted hours per listening hour. Shared live audio has the same paid access price for every listener.</p>
|
|
513
520
|
<p class="hint">Unused credit expires. Buying before expiry adds credit and keeps the later expiry date. Your pass works across players on this account.</p>
|
|
514
521
|
</details>
|
|
515
522
|
<p id="translation-purchase-note" role="status" aria-live="polite" aria-atomic="true"></p>
|
package/web/dist/sw.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* nixamp service worker — generated, do not edit */
|
|
2
|
-
const CACHE = "nixamp-
|
|
2
|
+
const CACHE = "nixamp-1789437659330";
|
|
3
3
|
const PRECACHE = [
|
|
4
4
|
"/",
|
|
5
5
|
"/.well-known/openaccess.json",
|
|
@@ -13,15 +13,15 @@ const PRECACHE = [
|
|
|
13
13
|
"/assets/fi-3Awdi4xT.js",
|
|
14
14
|
"/assets/fr-ChJB95FS.js",
|
|
15
15
|
"/assets/hi-OutMojZO.js",
|
|
16
|
-
"/assets/hls-3VKVEQE3-
|
|
16
|
+
"/assets/hls-3VKVEQE3-B4Sk5BbY.js",
|
|
17
17
|
"/assets/hls-n74Cnh8A.js",
|
|
18
18
|
"/assets/hu-fhESdEDW.js",
|
|
19
19
|
"/assets/id-DEiYuHM3.js",
|
|
20
|
+
"/assets/index-B33hHbmF.js",
|
|
20
21
|
"/assets/index-BKyAT0fX.css",
|
|
21
|
-
"/assets/index-BqcDIh2Q.js",
|
|
22
22
|
"/assets/it-BWr9AXgr.js",
|
|
23
|
-
"/assets/mpegts-
|
|
24
|
-
"/assets/mpegts-
|
|
23
|
+
"/assets/mpegts-CoCC1wqt.js",
|
|
24
|
+
"/assets/mpegts-LO6RVLD6-Ct0Biz5E.js",
|
|
25
25
|
"/assets/native-C7JTKWJH-BUyIoj0P.js",
|
|
26
26
|
"/assets/nl-CRyTjXF_.js",
|
|
27
27
|
"/assets/ru-B9x7d0z_.js",
|