Remember time


You can enable the memorization of time and position in playlists in the Settings / Remember

From this point the player will start to remember the playback data to continue it after the user returns to the same page in the same browser. 

How it works

The player uses certain data to identify the content. By default, this is the page URL (if the player is wrapped in an iframe then this is the URL to the iframe) and player id on the page.

If the combination of these parameters is constant and unique, then you do not need to do anything else. If the address of the page or players id changes (relevant for our WP plugin) the page may have several different addresses then memorization will be wrong.

To improve reliability you can add the cuid parameter to the player code with a unique and invariable combination of characters. In this case remembering the time will not depend on the page address and id of the player.

var player = new Playerjs({id:"player", file:"//site.com/video123.mp4", cuid:"video123"});

Since version 9.83 you can use the JS API cuid command if the content link is updated externally.

You can also add to playlists an id parameter with a unique combination of characters:
[
   {"title":"Season 1 serie 1","file":"video1.mp4","id":"s1s1"},
   {"title":"Season 1 serie 2","file":"video2.mp4","id":"s1s2"}
]

Button «Continue»

With PRO you can add custom elements. For example you can add custom buttons «Continue» and «Start over»

Just create a new element (text, picture or icon) and enable the option Hide / hide without remembering time

For the «Continue» button you must specify as an action api:play or for rewind button - api:seek,0;play

If the player should start from the saved time only when the button is pressed, the command should be api:timeplay, and the option Settings / Remember / Remember time / Sseek just when the button is pressed

You can use placeholders {time} and {title} in the text elements. If you want to pass a different value instead of title (for example, the full path), use the {title2} variable, and also specify the title2 parameter for each file in the playlist to pass the desired value.

Look this template for example.

Additional options

Settings allow you to enable the storage of the played files in the playlist, etc.

Additional options are available in the PRO version


19.9.112024 © PlayerJS

Sign up free

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

Restore password

Restore
Forgot email? Contact us