Skip to content

Can't use dynamic addressing in DotLottieWorkerReact #524

Closed
@HesamSoleymani

Description

@HesamSoleymani

Overview

Relative addressing works fine in DotLottieReact like below example:

const dynamicAddress = "lotties/test1.lottie";
<DotLottieReact
   src={dynamicAddress}
/>

The file is actually located in this path: "public/lotties/test1.lottie".
But when using DotLottieWorkerReact it seems we should use absolute address instead:

<DotLottieWorkerReact
 src={window.location.origin+"/"+dynamicAddress}
/>

I think its better if both components work in a same way.
...

Labels

  • Add the Type: Bug label to this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions