fix(linux): auto-install managed plugin copy; include in asset updates (#127)

This commit is contained in:
2026-06-14 17:25:28 -07:00
committed by GitHub
parent ae7e6f82a8
commit a117c5759c
53 changed files with 3050 additions and 152 deletions
@@ -137,6 +137,46 @@ test('autoplay ready gate requests overlay pointer recovery when media readiness
assert.equal(pointerRecoveryRequests, 1);
});
test('autoplay ready gate reports the released autoplay signal once', async () => {
const releasedSignals: string[] = [];
const gate = createAutoplayReadyGate({
isAppOwnedFlowInFlight: () => false,
getCurrentMediaPath: () => '/media/video.mkv',
getCurrentVideoPath: () => null,
getPlaybackPaused: () => true,
getMpvClient: () =>
({
connected: true,
requestProperty: async () => true,
send: () => {},
}) as never,
signalPluginAutoplayReady: () => {},
onAutoplayReadyReleased: (signal) => {
releasedSignals.push(signal.payload.text);
},
schedule: (callback) => {
queueMicrotask(callback);
return 1 as never;
},
logDebug: () => {},
});
gate.maybeSignalPluginAutoplayReady(
{ text: '__warm__', tokens: null },
{ forceWhilePaused: true },
);
await new Promise((resolve) => setTimeout(resolve, 0));
gate.maybeSignalPluginAutoplayReady(
{ text: '次の字幕', tokens: null },
{ forceWhilePaused: true },
);
await new Promise((resolve) => setTimeout(resolve, 0));
assert.deepEqual(releasedSignals, ['__warm__']);
});
test('autoplay ready gate does not unpause again after a later manual pause on the same media', async () => {
const commands: Array<Array<string | boolean>> = [];
let playbackPaused = true;