I have an AnimatedVisualPlayer on my Page for playing a 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>
I installed these packages:
I did it also:
On WASM, iOS and macOS, you can put the Lottie .json files directly in a folder of the shared project (for example "Lottie/myanimation.json") and set their Build action as Content.
UWP can play the Lottie seamlessly:
However, WASM cannot play Lottie with this error:
Nuget Package Version(s):
Nuget Package:
Package Version(s):
How can I fix this ? Thanks.
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
.