Include Vimeo SDK on Client Side

Enonic version: 7.14.4
OS: Windows 11

Hi

I am trying to make an Enonic Integration of the the Vimeo SDK (Vimeo) for integrating the videoplayer. i use Webjar in build.gradle to include the files. but i am not able to add it in the parts html section

<script src=""
        data-th-src="${portal.assetUrl({'_path=/assets/github-com-vimeo-player-js-/2.9.1/player.js'})}"></script>
    <script>

Is it anything i’m not understanding about client side code? is there a better way of doing this?

Thanks for the help

Your path is wrong.

If you refer to <script data-th-src="${portal.assetUrl({'_path=/github-com-vimeo-player-js-/2.9.1/player.js'})}"></script> instead, it’ll load the script just fine.

The reason for this is that when you call the function portal.assetUrl in the Thymeleaf template, the “asset” part of the path is implied and not needed.

2 Likes