Add support for svgaplayerweb in SVGA viewer

This commit is contained in:
ema
2025-07-05 11:24:02 +08:00
parent efba55b8d5
commit f6ca3a62e2
9 changed files with 77 additions and 14 deletions

View File

@@ -20,7 +20,9 @@ using QuickLook.Plugin.ImageViewer.Webview.Svg;
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace QuickLook.Plugin.ImageViewer.Webview.Lottie;
@@ -76,3 +78,15 @@ public class LottieImagePanel : SvgImagePanel
base.WebView_WebResourceRequested(sender, args);
}
}
[ClassInterface(ClassInterfaceType.AutoDual)]
[ComVisible(true)]
public sealed class ScriptHandler(string path)
{
public string Path { get; } = path;
public async Task<string> GetPath()
{
return await Task.FromResult(new Uri(Path).AbsolutePath);
}
}