(feat): improve mobile
(feat): add camera sharing (fix): vite tauri connection (fix): methanium/ui theme not applied to call popout
This commit is contained in:
parent
b5ce3c554d
commit
62aaa7c01d
31 changed files with 1915 additions and 859 deletions
27
packages/call/src/mediaShare/index.ts
Normal file
27
packages/call/src/mediaShare/index.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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";
|
||||
Loading…
Reference in a new issue