Adaptive Music v0.8.3 multiplayer and floating music controls
Validate and generate manual release / package (push) Waiting to run

This commit is contained in:
Jason committed 2026-12-05 20:29:27 -05:00
1 parent acc8cbafc6
commit fbc265b526
33 files changed
+1673 -131

No files matched your search

+12 -2
View File
@@ -76,7 +76,9 @@ test('wizard inspects only the imported dedicated identity, loads stable catalog
socket.onmessage?.({data:JSON.stringify({message_id:msg.message_id,result})});
});},close(){this.onclose?.();}};queueMicrotask(()=>socket.onopen?.());return socket;
};
const context={state:'running',destination:{},resume(){return Promise.resolve();},createMediaStreamDestination:()=>({stream:{getTracks:()=>[]}}),createGain:()=>({connect(){}}),close:async()=>{}};
const gains=[], edges=[], streamOutput={stream:{getTracks:()=>[]}};
const context={state:'running',destination:{},resume(){return Promise.resolve();},createMediaStreamDestination:()=>streamOutput,
createGain(){const node={gain:{value:1,setTargetAtTime(value){this.value=value;}},connect(output){edges.push([node,output]);}};gains.push(node);return node;},close:async()=>{}};
const sdk={loadSendspinClientIdentity:()=>({clientId:target}),SendspinCore:class{timeSyncInfo={synced:true};async connect(){}disconnect(){}}};
const originalNavigator=globalThis.navigator;
Object.defineProperty(globalThis,'navigator',{configurable:true,value:{locks:{request:async(name,opts,fn)=>fn({})}}});
@@ -85,7 +87,15 @@ test('wizard inspects only the imported dedicated identity, loads stable catalog
const supplied={maUrl:'https://ma.example.test',token:'private-fixture',identityStorage:{'sendspin-identity-sk':'A'.repeat(43)},campaign:'world',targetName:player.name,webSocketAuthLogSafe:true,allowCatalogPlayback:true};
const profile=await host.inspect(supplied);assert.equal(profile.target,target);assert.deepEqual(profile.approvedProviders,['approved']);
const catalog=await host.readCatalog(profile,{reconnecting:true});const again=await host.inspect(supplied);assert.equal(profile.catalogKey,again.catalogKey);
host.setMonitorLevel(0.25);
await host.start(profile);assert.equal(host.connected,true);assert.equal(host.supports(catalog[0]),true);assert.equal(host.supports({provider:'ma',id:'forged'}),false);
const [,shared,monitor]=gains;
assert.ok(edges.some(([from,to])=>from===shared&&to===streamOutput));
assert.ok(edges.some(([from,to])=>from===monitor&&to===context.destination));
assert.equal(monitor.gain.value,0.25);
host.setMonitorLevel(0);
assert.equal(monitor.gain.value,0);
assert.equal(shared.gain.value,1);
assert.ok(calls.filter(c=>c.command==='players/get').every(c=>c.args.player_id===target));assert.ok(!calls.some(c=>c.command==='players/all'||c.command==='player_queues/play_media'));assert.ok(requested>=3);
await host.close();assert.equal(host.supports(catalog[0]),false);
}finally{await host.close();Object.defineProperty(globalThis,'navigator',{configurable:true,value:originalNavigator});}
@@ -118,7 +128,7 @@ test('automatic provisioning uses the bound API session, waits for queue registr
const sdk={loadSendspinClientIdentity(storage){if(!storage.getItem('sendspin-identity-sk'))storage.setItem('sendspin-identity-sk','A'.repeat(43));return {clientId:player.player_id};},SendspinCore:class{
timeSyncInfo={synced:true};pairingToken='private-pairing-fixture';constructor(config){core=this;this.config=config;softwareVolume=config.useHardwareVolume===false;}async connect(){this.config.storage.setItem('pairing-fixture','retained');}disconnect(){}
}};
const context={state:'running',destination:{},resume:async()=>{},createMediaStreamDestination:()=>({stream:{getTracks:()=>[]}}),createGain:()=>({connect(){}}),close:async()=>{}};
const context={state:'running',destination:{},resume:async()=>{},createMediaStreamDestination:()=>({stream:{getTracks:()=>[]}}),createGain:()=>({connect(){},gain:{value:1}}),close:async()=>{}};
const locks={async request(_name,_options,callback){
if(lockHeld)return callback(null);
lockHeld=true;