Lightweight embed codes


    The main thing you want to do in order have as light embed codes as possible is to not load the player and its component until someone actually clicks on it. This is achievable using the universal embed code together with the autoload option. This makes the end user load an image which gets replaced with the player when the user clicks on it. This helps to lower page load times, especially if you embed several videos on the same page.

    These settings apply both to getPresentation via the xmlrpc API and the AJAX embed method. However, the values are slightly different. For getPresentation the values are '1' / '0' as a strings and to the AJAX embed method the values are boolean true / false.

    The autoload option should be set to '0' / false to make the player not load on page load. And together with the autoload option, it is recommended that you also specify autoplay and set it to '1' / true. This way the player will autoplay the video once it loads. The user will still have to click once to load the player. Setting autoload to '0' / false and autoplay to '0' / false will force the end user to click two times to see the video.

    Was this article helpful?
    0 out of 0 found this helpful