Embed.js

First you need an embed.js file provided by administrator for your website that should be (but it’s not a must) put in public directory (accesible through https://linktoyourwebsite.com/embed.js)

By adding script tag to your website with embed.js as src (https://linktoyourwebsite.com/path/to/embed.js) you’re almost done!

Attributes of script tag

For embed.js to function correctly, you will need two attributes on script tag:

data-lm-partner - provided by administrator.

data-lm-link - link to your video, that will be displayed, you can add &iframeVideoLink=https://link/to/your/video same as mentioned here.

Additionaly, you can add these attributes:

Callback

data-lm-callback - instead of data-lm-link you can pass it if you want to use a function instead of link, more information here

Hide based on left time

data-lm-show-before-live-time - you can pass number in this attribute, so the embed frame won’t show until video start time is lower than amount of hours you provided.

Example:

Video start time is 2024.04.10 18:00, you entered 8, so the embed won’t show until 2024.04.10 10:00.

data-lm-show-after-live-time - same as above, but works the other way around.

Example:

Video start time is 2024.04.10 18:00, you entered 8, so the embed will stay until 2024.04.11 02:00.

Positioning on website

data-lm-position - accepts top-left, top-right, bottom-left, bottom-right this will determine what the embed position will be on your website.

data-lm-position-offset - a number added to bottom property, so if you have anything on the bottom of your website, the embed won’t be over it.

If you set data-lm-position to top-left or top-right it will be added to top property instead.

You need to add “px”, ”%”, “vh”, “dvh” or other units at the end.

data-lm-links - accepts array of objects with label, url and target properties. It will display links at the bottom of embed with specified text, that lead to specified link and acts depending on target property.

label - text of a link displayed

url - link

target - specifies target property of <a> tag, when it’s set as _blank there will be an additional icon to enhance user experience.

Example:

[{label: 'Example 1', url: '/path', target: '_blank'},{label: 'Example 2', url: 'https:://anotherwebsite.com/path/2', target: '_blank'}]

Hiding elements before starting a video

data-lm-default-action - accepts two values - play and links.

play - no links will be visible and user needs to interact with player for links to be visible.

links - links will be visible from the start.

First interaction state

data-lm-default-mode - accepts two values - bean and short.

bean - the player will start with a minimized state.

short - the player will start with opened state.

No matter which state you choose, after user interacts with video, the state he left the page with will be saved and loaded on next pages, this is only the first interaction state.

Correctly added script tag should look something like this:

<script src="https://linktoyourwebsite.com/path/to/embed.js" data-lm-partner="partner" data-lm-link="https://link/to/your/video"></script>