Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

fix(cursor/linux): force bundled mac-style SVG pack for show-cursor

webadderall001e910a8dcd
diff --git a/src/components/video-editor/videoPlayback/cursorRenderer.ts b/src/components/video-editor/videoPlayback/cursorRenderer.ts
index 974a0844..3b8f29d6 100644
--- a/src/components/video-editor/videoPlayback/cursorRenderer.ts
+++ b/src/components/video-editor/videoPlayback/cursorRenderer.ts
@@ -167,6 +167,7 @@ function getAvailableCursorKeys(): CursorAssetKey[] {
export async function preloadCursorAssets() {
if (!cursorAssetsPromise) {
cursorAssetsPromise = (async () => {
+ const isLinux = typeof navigator !== 'undefined' && /linux/i.test(navigator.platform);
let systemCursors: Record<string, SystemCursorAsset> = {};
try {
@@ -182,7 +183,9 @@ export async function preloadCursorAssets() {
SUPPORTED_CURSOR_KEYS.map(async (key) => {
const systemAsset = systemCursors[key];
const uploadedAsset = uploadedCursorAssets[key];
- const assetUrl = uploadedAsset?.url ?? systemAsset?.dataUrl;
+ const assetUrl = isLinux
+ ? uploadedAsset?.url
+ : uploadedAsset?.url ?? systemAsset?.dataUrl;
if (!assetUrl) {
console.warn(`[CursorRenderer] No cursor image for: ${key}`);
diff --git a/src/components/video-editor/videoPlayback/uploadedCursorAssets.ts b/src/components/video-editor/videoPlayback/uploadedCursorAssets.ts
index 8daff10f..f37d4587 100644
--- a/src/components/video-editor/videoPlayback/uploadedCursorAssets.ts
+++ b/src/components/video-editor/videoPlayback/uploadedCursorAssets.ts
@@ -32,13 +32,6 @@ export const uploadedCursorAssets: Partial<Record<CursorAssetKey, UploadedCursor
trim: { x: 480, y: 435, width: 333, height: 553 },
fallbackAnchor: { x: 0.18, y: 0.1 },
},
- 'not-allowed': {
- // Keep style consistent with bundled mac-like cursors instead of falling
- // back to platform-specific system icons.
- url: arrowUrl,
- trim: { x: 480, y: 435, width: 333, height: 553 },
- fallbackAnchor: { x: 0.18, y: 0.1 },
- },
text: {
url: textUrl,
trim: { x: 404, y: 192, width: 247, height: 596 },