API
User
In this section, we'll look at ways to track user actions with Vidstack Player.
WARNING
This page is a work in progress.
Events
All media events can be traced back to their origin, the event that started it all. The native isTrusted
event property will indicate whether the action was performed by a user:
📖 See request events for further reading.
Seeking
User seeking can be tracked by waiting for the media-seeking-request
and media-seek-request
events to fire, and then checking whether their origin is trusted:
Idle
The user idle state indicates whether the user has been inactive for a set period of time (default is 2s). It can be tracked by subscribing to the userIdle
property on the media store like so:
Previous
<-
Live
Next
Keyboard
->