How to show an element a few seconds before the end of playback

For example, you want to show a certain label 20 seconds before the end of playback. It will warn the user that at the end the player will switch to the next playlist file.

  1. Create a custom element with the text you want.
  2. Enable the Hide / up to the specified second from the end option for the element and specify the value (20).
  3. If you are using an embedded playlist, enable the Hide / if last playlist file option. If the player redirects, enable the option Hide / if there is no parameter and specify the parameter after

Now this element should show 20 seconds before the end of playback. You can make it clickable if you enable an Action and specify the api:next command to switch to the next file on click.

If the player uses a redirect, then you can add a variable to the text, for example {text1} and pass the text1 parameter in the player code (read more about text variables).

You can also specify {next} in the text if the player uses an internal playlist. The player will replace it with the name of the next file.

18.4.72023 © PlayerJS

Sign up free

Sign up
By signing up, you agree to Terms of Service
Login if you have an account

Restore password

Forgot email? Contact us