SupremeTechnopriest / react-idle-timer

User activity timer component
https://idletimer.dev
MIT License
1.15k stars 143 forks source link

When video is running activity is not detected⚡️ #370

Open StefanoPitto opened 1 year ago

StefanoPitto commented 1 year ago

What problem does your feature request solve?

When a video is running there is no activity detected. Is there any case when this could be fixed?

Describe the solution you are proposing.

Detect activity when playing video.

Describe alternatives you have considered.

No response

Importance

I Need It

Additional Context

SupremeTechnopriest commented 1 year ago

I would just listen to the play and playing events and call idleTimer.pause() and listen to the pause and end events and call idleTimer.reset()

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#events