Lottie player issue with unpkg.com library

Created on 14 October 2021, over 2 years ago
Updated 16 September 2023, 10 months ago

Default library added in lottie_player not working that much great.
https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js: { type: external, minified: true }

Already there is an issue raised for the above CDN package (unpkg.com)
https://github.com/LottieFiles/lottie-player/issues/109

Instead in the file media_entity_lottie.libraries.yml, replacing package with bodymovin working without an issue, and also support on IE browsers including IE 11

lottie_player:
  remote: https://github.com/LottieFiles/lottie-player
  license:
    name: MIT
    url: https://github.com/LottieFiles/lottie-player/blob/master/LICENSE
    gpl-compatible: true
  js:
    https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.7.14/lottie.min.js: { type: external, minified: true }

Also replacing file-lottie-player.html.twig with

<lottie-player {{ attributes.removeAttribute("controls").removeAttribute("background") }} loop autoplay="true" background="transparent"></lottie-player>
<div class="lottie" data-animation-path={{attributes.src}} data-anim-loop="true" data-bm-renderer="svg" data-name="somename"></div>

Note: lottie class will be identified by bodymovin package. so on page load, it will be initialized and not required any additional js code.

🐛 Bug report
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇮🇳India Sreenivas Bttv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024