{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/wake-lock/issues/48","labels_url":"https://api.github.com/repos/w3c/wake-lock/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/w3c/wake-lock/issues/48/comments","events_url":"https://api.github.com/repos/w3c/wake-lock/issues/48/events","html_url":"https://github.com/w3c/wake-lock/issues/48","id":63684181,"number":48,"title":"Delegate wake lock relevance to Page Visibility API","user":{"login":"andrey-logvinov","id":8895482,"avatar_url":"https://avatars.githubusercontent.com/u/8895482?v=3","gravatar_id":"","url":"https://api.github.com/users/andrey-logvinov","html_url":"https://github.com/andrey-logvinov","followers_url":"https://api.github.com/users/andrey-logvinov/followers","following_url":"https://api.github.com/users/andrey-logvinov/following{/other_user}","gists_url":"https://api.github.com/users/andrey-logvinov/gists{/gist_id}","starred_url":"https://api.github.com/users/andrey-logvinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrey-logvinov/subscriptions","organizations_url":"https://api.github.com/users/andrey-logvinov/orgs","repos_url":"https://api.github.com/users/andrey-logvinov/repos","events_url":"https://api.github.com/users/andrey-logvinov/events{/privacy}","received_events_url":"https://api.github.com/users/andrey-logvinov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-23T10:07:32Z","updated_at":"2015-05-28T15:49:42Z","closed_at":"2015-05-28T15:49:42Z","body":"At present, the spec lists a number of conditions besides Document's `keepScreenAwake` attribute which determine whether the Document is relevant to wake lock, such as being in the foreground tab, being focused etc. so that the actual screen wake lock is applied only when the user is (or can be potentially) paying attention to the page.\r\nHowever, there is an existing spec which deals with those conditions, namely [Page Visibility API](http://www.w3.org/TR/page-visibility). This spec has consistent implementation among major web browsers so it makes sense to use it to specify wake lock applicability criteria.\r\nIt is however worth noting that current implementations of Page Visibility API don't go beyond basic visibility checks such as that the page is in the foreground tab and the browser window is not minimized (though the spec itself might suggest that actual pixel-level page visibility is reported).\r\nMaking use of Page Visibility API has been already suggested in #24."},"comment":{"url":"https://api.github.com/repos/w3c/wake-lock/issues/comments/106432679","html_url":"https://github.com/w3c/wake-lock/issues/48#issuecomment-106432679","issue_url":"https://api.github.com/repos/w3c/wake-lock/issues/48","id":106432679,"user":{"login":"andrey-logvinov","id":8895482,"avatar_url":"https://avatars.githubusercontent.com/u/8895482?v=3","gravatar_id":"","url":"https://api.github.com/users/andrey-logvinov","html_url":"https://github.com/andrey-logvinov","followers_url":"https://api.github.com/users/andrey-logvinov/followers","following_url":"https://api.github.com/users/andrey-logvinov/following{/other_user}","gists_url":"https://api.github.com/users/andrey-logvinov/gists{/gist_id}","starred_url":"https://api.github.com/users/andrey-logvinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrey-logvinov/subscriptions","organizations_url":"https://api.github.com/users/andrey-logvinov/orgs","repos_url":"https://api.github.com/users/andrey-logvinov/repos","events_url":"https://api.github.com/users/andrey-logvinov/events{/privacy}","received_events_url":"https://api.github.com/users/andrey-logvinov/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T15:49:42Z","updated_at":"2015-05-28T15:49:42Z","body":"PR merged, closing the issue."}}