Reputation: 65
Though the title is decently explanatory, I'm curious as how netflix detects how a user is afk. I've looked through the code via chrome's inspect element, and found it may be done through javascript/jquery depending on the mouse position. Is there anyway anyone can verify this or if incorrect, discover the method it is determined? I'm looking to make a plugin to prevent it from pausing.
Upvotes: 0
Views: 1544
Reputation: 2457
It's hard to know for sure what Netflix exactly uses to determine if a user has left Netflix, as Netflix probably obfuscates their JavaScript code and it's illegal to reverse engineer it. But there a few possibilities:
document.hasFocus()
to see if it has changed.There's also this previous question on StackOverflow which includes many different answers to the same question you asked.
Upvotes: 2