KinoUserPresence (Kino User Presence v0.1.2)
A module for tracking user presence in Livebook applications.
This module provides functionality to monitor user connections, track their activity through heartbeats, and execute callbacks when users join or leave. It uses Kino.JS.Live for real-time communication with clients.
Summary
Functions
Initializes a new user presence tracker.
Functions
Link to this function
listen(on_join, on_leave)
Initializes a new user presence tracker.
Parameters
on_join
: A function to be called when a user joins. It receives the user's origin as an argument.on_leave
: A function to be called when a user leaves. It receives the user's origin as an argument.
Returns
A new Kino.JS.Live struct configured for user presence tracking.
Example
KinoUserPresence.listen(
&IO.puts/1,
&IO.puts/1,
)