• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Development Web Development function user inactive

     
    • 0 Vote(s) - 0 Average

    function user inactive

    user sleeping
    GarrettBuckner
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2024 Oct
    Reputation: 0
    Country:United States
    #2
    2024-10-01, 03:45 AM (This post was last modified: 2024-10-01, 06:40 AM by GarrettBuckner. Edited 1 time in total.)
    (2024-09-10, 09:37 AM)Jobar Wrote: 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.

     geometry dash meltdowninactive.user.js

    JoBar.

    Hey there!
    So, I just whipped up this function to handle user inactivity during continuous playback. You know how it goes—if someone dozes off or steps away, the playback just keeps going forever. To tackle this, my script sets up a timer that monitors for any keyboard or mouse activity. If there's no activity, it resets the timer. When the timer runs out, a popup appears to check if the user is still around. If they don’t respond, the popup sticks around for 30 seconds before redirecting Jellyfin back to the home page. Oh, and don’t worry, the popup won’t show up on the home page or the dashboard.
    Integrating this is pretty simple—just a quick tweak to the index.html page will do the trick. You can also customize a few things: the default inactivity duration is set to 3 hours, and the popup stays on the screen for 10 seconds by default. Plus, you can easily translate the text into the user’s preferred language.
    This should make the whole experience a lot smoother! 
    Cheers, JoBar.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    Messages In This Thread
    function user inactive - by Jobar - 2024-09-10, 09:37 AM
    RE: function user inactive - by GarrettBuckner - 2024-10-01, 03:45 AM
    RE: function user inactive - by Jobar - 2024-10-01, 04:29 AM

    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode