Skip to content

Commit

Permalink
fix: enabling distant URIs for Lottie
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesEmond committed Apr 20, 2022
1 parent 57f0511 commit fcbe986
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/AddIns/Uno.UI.Lottie/LottieVisualSourceBase.wasm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ void OnJsonChanged(string updatedJson, string updatedCacheKey)
}
else
{
var documentPath = Windows.Storage.Helpers.AssetsPathBuilder.BuildAssetUri(UriSource?.PathAndQuery);
_domLoaded = false;
var documentPath = UriSource.Scheme.Equals("http") || UriSource.Scheme.Equals("https")
? UriSource.OriginalString
: Windows.Storage.Helpers.AssetsPathBuilder.BuildAssetUri(UriSource?.PathAndQuery);

js = new[]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public SampleLottieAnimation()
"ms-appx:///Lottie/4770-lady-and-dove.json",
"ms-appx:///Lottie/4930-checkbox-animation.json",
"ms-appx:///Lottie/this-file-does-not-exists.json",
"embedded://./(assembly).Lottie.loading.json"
"embedded://./(assembly).Lottie.loading.json",
"https://assets2.lottiefiles.com/datafiles/c56b08b89932c090a0948b53fd58427d/data.json"
};

file.SelectedIndex = 0;
Expand Down

0 comments on commit fcbe986

Please sign in to comment.