2024-09-10, 09:37 AM
(This post was last modified: 2024-09-10, 05:12 PM by Jobar. Edited 1 time in total.)
Hi,
I just created a function to manage user inactivity during continuous playback. Indeed, if the user is asleep or away, the playback continues indefinitely.
To get around this problem, my script runs a timer and checks that there is no keyboard or mouse event otherwise it resets the timer.
If the time is up, a popup will be displayed to confirm whether or not the user is present.
without a response from the user, this popup appears 30 seconds and redirects Jellyfin to the home page.
This script does not display the popup on the home page and dashboard.
To integrate it, a modification of the index.html page is enough.
There is just the choice of:
- The duration of inactivity chosen: 3 hours by default.
- The duration of the popup: 10 seconds by default.
- translate texts into the language of the user.
inactive.user.js
JoBar.
I just created a function to manage user inactivity during continuous playback. Indeed, if the user is asleep or away, the playback continues indefinitely.
To get around this problem, my script runs a timer and checks that there is no keyboard or mouse event otherwise it resets the timer.
If the time is up, a popup will be displayed to confirm whether or not the user is present.
without a response from the user, this popup appears 30 seconds and redirects Jellyfin to the home page.
This script does not display the popup on the home page and dashboard.
To integrate it, a modification of the index.html page is enough.
There is just the choice of:
- The duration of inactivity chosen: 3 hours by default.
- The duration of the popup: 10 seconds by default.
- translate texts into the language of the user.
inactive.user.js
JoBar.