client/packages/call/src/mediaShare/index.ts
Alois 62aaa7c01d
Some checks failed
/ release (push) Has been cancelled
/ build-web (push) Has been cancelled
/ build-desktop (linux) (push) Has been cancelled
/ build-mobile (push) Has been cancelled
(feat): improve mobile
(feat): add camera sharing
(fix): vite tauri connection
(fix): methanium/ui theme not applied to call popout
2026-08-01 01:25:41 +02:00

27 lines
721 B
TypeScript

import { BrowserMediaShareAdapter } from "./browser";
import { ElectronMediaShareAdapter } from "./electron";
import { TauriMediaShareAdapter } from "./tauri";
import type { MediaShareAdapter } from "./types";
let adapter: MediaShareAdapter | null = null;
export function getMediaShareAdapter(): MediaShareAdapter {
if (!adapter) {
adapter = window.tensaminMobileMedia
? new TauriMediaShareAdapter()
: window.tensaminDesktop?.media
? new ElectronMediaShareAdapter()
: new BrowserMediaShareAdapter();
}
return adapter;
}
export type {
MediaShareAdapter,
MediaShareCapabilities,
MediaShareKind,
MediaShareRequest,
MediaShareSession,
MediaShareSource,
} from "./types";