Coder Social home page Coder Social logo

Feature: User activity about neko HOT 8 CLOSED

Kamukage3e avatar Kamukage3e commented on July 18, 2024
Feature: User activity

from neko.

Comments (8)

m1k1o avatar m1k1o commented on July 18, 2024

We could track the last timestamp when the cursor on the remote screen is moved (webrtc messages) but this could delete your room when you are watching something since there is no interaction.

We could track document focus/blur and send it to websockets to know when user actually is on the page and when its only open in the background on a different tab. But this would not solve the issue when users leave open room and the tab focused.

Or simply adding some timeout to the room, like max age. And the room would be stopped when exceeding that value.

from neko.

Kamukage3e avatar Kamukage3e commented on July 18, 2024

We want to enable this feature via env like. NEKO_ACTIVITY_TIMEOUT = int. (default = 15 minutes)
But I don't know can I handle webrtc messages. Could you give me some guide ? Maybe I will do that feature and this feature helps to save some resource in Production environment

from neko.

Kamukage3e avatar Kamukage3e commented on July 18, 2024

I almost finished k8s operator based kubebuilder with gin alternative version of neko rooms and I want to enable NEKO_ACTIVITY_TIMEOUT = int on neko side like metric then handle via k8s operator.

from neko.

Kamukage3e avatar Kamukage3e commented on July 18, 2024

@m1k1o Could you give me some guide ?

from neko.

mbattista avatar mbattista commented on July 18, 2024

Can you please elaborate why you would need this?

Tracking mouse and even thinking about a default of 15 minutes sounds both horrible for a lot of usecases.

from neko.

yesBad avatar yesBad commented on July 18, 2024

Can you please elaborate why you would need this?

Tracking mouse and even thinking about a default of 15 minutes sounds both horrible for a lot of use cases.

I agree completely, like watching a presentation/video/movie. In most cases the users are just AFK watching what is happening on the screen.

from neko.

Kamukage3e avatar Kamukage3e commented on July 18, 2024

Can you please elaborate why you would need this?

Tracking mouse and even thinking about a default of 15 minutes sounds both horrible for a lot of usecases.

Especially when the client will use a blog on the site to read and forgot to close the tab or log out. It will reduce resource consumption. Especially in banks and other fields . Apache guacamole has like this feature.

from neko.

Kamukage3e avatar Kamukage3e commented on July 18, 2024
return types.Stats{
    Connections: atomic.LoadUint32(&ws.conns),
    Host:        host,
    Members:     ws.sessions.Members(),

    Banned: ws.state.AllBanned(),
    Locked: ws.state.AllLocked(),

    ServerStartedAt: ws.serverStartedAt,
    LastAdminLeftAt: ws.lastAdminLeftAt,
    LastUserLeftAt:  ws.lastUserLeftAt,
    LastActivityTime: ws.webrtc.GetUserLastActivity(),    // Any activity client side mouse or keyboard

    ControlProtection: ws.conf.ControlProtection,
    ImplicitControl:   ws.webrtc.ImplicitControl(),
}
I will push new metric later to git repo. This metric helps to track user activity 

from neko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.