mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-10 16:19:24 -07:00
fix: align youtube playback with shared overlay startup
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
export interface AnkiIntegrationRuntimeProxyServer {
|
||||
start(options: { host: string; port: number; upstreamUrl: string }): void;
|
||||
stop(): void;
|
||||
waitUntilReady(): Promise<void>;
|
||||
}
|
||||
|
||||
interface AnkiIntegrationRuntimeDeps {
|
||||
@@ -131,6 +132,13 @@ export class AnkiIntegrationRuntime {
|
||||
return this.config;
|
||||
}
|
||||
|
||||
waitUntilReady(): Promise<void> {
|
||||
if (!this.started || !this.isProxyTransportEnabled()) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return this.getOrCreateProxyServer().waitUntilReady();
|
||||
}
|
||||
|
||||
start(): void {
|
||||
if (this.started) {
|
||||
this.stop();
|
||||
|
||||
Reference in New Issue
Block a user