Uno.Lottie WebAssembly中未捕获的类型JavaScript错误

伯克

我的页面上有一个AnimatedVisualPlayer,用于播放Lottie:

<winui:AnimatedVisualPlayer
    x:Name="player"
    AutoPlay="true" Width="150" Height ="150" PlaybackRate="1.5">

    <lottie:LottieVisualSource
        UriSource="ms-appx:///Lottie/waiter.json" />
</winui:AnimatedVisualPlayer>

我安装了这些软件包:

  • Microsoft.Toolkit.Uwp.UI.Lottie(用于theLottieVisualSource)
    • Microsoft.UI.Xaml(用于AnimatedVisualPlayer)
    • Uno.UI.Lottie(用于LottieVisualSource)
    • Uno.UI(用于AnimatedVisualPlayer)

我也这样做了:

在WASM,iOS和macOS上,您可以将Lottie .json文件直接放在共享项目的文件夹中(例如“ Lottie / myanimation.json”),并将其Build操作设置为Content。

UWP可以无缝玩乐透游戏:

在此处输入图片说明

但是,WASM无法玩Lottie并出现以下错误:

在此处输入图片说明

错误55

Nuget软件包版本:

Nuget软件包:

套件版本:

  • Uno.UI.RemoteControl {2.4.0}
  • Newtonsoft.Json {12.0.3}
  • Uno.UI.Lottie {2.4.0}
  • Uno.Wasm.Bootstrap {1.2.0}
  • Uno.Wasm.Bootstrap.DevServer {1.2.0}
  • ACM_Search_AdminApps.Shared {1.1.0}
  • Microsoft.Extensions.Logging.Filter {1.1.2}
  • Microsoft.Extensions.Logging.Con... {1.1.1}
  • NETStandard.Library {2.0.3}
  • Uno.UI {2.4.0}
  • ACM_Search_AdminApps.Shared {1.1.0}
  • Microsoft.NETCore.UniversalWindo... {6.2.10}
  • Microsoft.Extensions.Logging.Con... {1.1.1}
  • Microsoft.Extensions.Logging.Filter {1.1.2}
  • Microsoft.Toolkit.Uwp.UI.Lottie {6.0.0}
  • Microsoft.UI.Xaml {2.4.2}
  • Newtonsoft.Json {12.0.3}
  • Uno.Core {2.0.0}
  • Microsoft.Toolkit.Uwp.UI.Lottie {6.0.0}

How can I fix this ? Thanks.

Carl de Billy

This is a bug in the Lottie add-in for Uno-Wasm, caused by the fact you were using the PlaybackRate and you're running in a non-english context with a culture where the decimal are serialized using a comma and not a dot.

This PR #3257 should fix the problem.

UPDATE: This PR has been merged and the fix will be available in Uno v3.0.0-dev.135.

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章