What are possible ways to detect whether a user has left?
I have some audios that I would like to be occupied only by one user. Once the user is gone, the audio should be free for other users to listen to.
How would you implement this?
Things I thought:
- I could let ajax send a ping every … seconds and detect on the server if I don’t get a signal for … seconds
- I could use Drab to peek at a hidden html tag with the audio_id every … seconds and see if I still find it
But are there easier solutions? Is there a signal if a session ends?
Many thanks for any help!