Bound native media preview capabilities and source range reads
This commit is contained in:
1 parent
4b0b5ebfd9
commit
370db7e791
13 files changed
+834
-46
No files matched your search
@@ -4,6 +4,7 @@ import {
|
||||
convertFileSrc,
|
||||
} from "@tauri-apps/api/core";
|
||||
import { CaptureBridge } from "./capture-bridge";
|
||||
import { nativePreviewToken } from "./media-access";
|
||||
|
||||
const capture = new CaptureBridge();
|
||||
export const isNativeDesktop = () => isTauri();
|
||||
@@ -25,6 +26,7 @@ export function invoke<T>(
|
||||
}
|
||||
|
||||
export function prepareMediaURL(path: string) {
|
||||
if (isTauri()) return convertFileSrc(path);
|
||||
if (isTauri())
|
||||
return convertFileSrc(nativePreviewToken(path), "searchi-media");
|
||||
return capture.mediaURL(path);
|
||||
}
|
||||
Reference in new issue
Block a user