{"action":"created","comment":{"url":"https://api.github.com/repos/whatwg/html/pulls/comments/50694402","id":50694402,"diff_hunk":"@@ -32078,11 +32123,58 @@ interface <dfn>HTMLMediaElement</dfn> : <span>HTMLElement</span> {\n \n   <hr>\n \n+  <p>All <span data-x=\"media element\">media elements</span> have a <dfn>list of pending play\n+  promises</dfn> which is initially an empty list.</p>\n+\n+  <p>The <dfn>notify playing steps</dfn> for a <span>media element</span> are as follows:</p>\n+\n+  <ol>\n+\n+   <li><p><span>Queue a task</span> to:</p></li>\n+\n+   <ol>\n+\n+    <li><p><span>Fire a simple event</span> named <code data-x=\"event-media-playing\">playing</code>\n+    at the element.</p></li>\n+\n+    <li><p>For each promise in the <span>list of pending play promises</span> resolve it with\n+    undefined, then clear the list.</p></li>\n+\n+   </ol>\n+\n+  </ol>\n+\n   <p>When the <dfn><code data-x=\"dom-media-play\">play()</code></dfn> method on a <span>media\n   element</span> is invoked, the user agent must run the following steps.</p>\n \n   <ol>\n \n+   <li><p>If the <span>media element</span>'s <code data-x=\"dom-media-paused\">paused</code>\n+   attribute is true and the user agent or the system does not allow media playback in the current\n+   context, return a promise rejected with <code>NotAllowedError</code> exception and abort these\n+   steps.</p></li>\n+\n+   <p class=\"note\">This is meant to be used for example by user agents requiring a user interaction","path":"source","position":169,"original_position":169,"commit_id":"5796c916ad82f086b804ce58ef4b8e48d1d34a50","original_commit_id":"5796c916ad82f086b804ce58ef4b8e48d1d34a50","user":{"login":"mounirlamouri","id":573590,"avatar_url":"https://avatars.githubusercontent.com/u/573590?v=3","gravatar_id":"","url":"https://api.github.com/users/mounirlamouri","html_url":"https://github.com/mounirlamouri","followers_url":"https://api.github.com/users/mounirlamouri/followers","following_url":"https://api.github.com/users/mounirlamouri/following{/other_user}","gists_url":"https://api.github.com/users/mounirlamouri/gists{/gist_id}","starred_url":"https://api.github.com/users/mounirlamouri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mounirlamouri/subscriptions","organizations_url":"https://api.github.com/users/mounirlamouri/orgs","repos_url":"https://api.github.com/users/mounirlamouri/repos","events_url":"https://api.github.com/users/mounirlamouri/events{/privacy}","received_events_url":"https://api.github.com/users/mounirlamouri/received_events","type":"User","site_admin":false},"body":"Done *2.","created_at":"2016-01-25T13:45:58Z","updated_at":"2016-01-25T13:45:58Z","html_url":"https://github.com/whatwg/html/pull/509#discussion_r50694402","pull_request_url":"https://api.github.com/repos/whatwg/html/pulls/509","_links":{"self":{"href":"https://api.github.com/repos/whatwg/html/pulls/comments/50694402"},"html":{"href":"https://github.com/whatwg/html/pull/509#discussion_r50694402"},"pull_request":{"href":"https://api.github.com/repos/whatwg/html/pulls/509"}}},"pull_request":{"url":"https://api.github.com/repos/whatwg/html/pulls/509","id":55880855,"html_url":"https://github.com/whatwg/html/pull/509","diff_url":"https://github.com/whatwg/html/pull/509.diff","patch_url":"https://github.com/whatwg/html/pull/509.patch","issue_url":"https://api.github.com/repos/whatwg/html/issues/509","number":509,"state":"open","locked":false,"title":"Make HTMLMediaElement.prototype.play() return a promise","user":{"login":"mounirlamouri","id":573590,"avatar_url":"https://avatars.githubusercontent.com/u/573590?v=3","gravatar_id":"","url":"https://api.github.com/users/mounirlamouri","html_url":"https://github.com/mounirlamouri","followers_url":"https://api.github.com/users/mounirlamouri/followers","following_url":"https://api.github.com/users/mounirlamouri/following{/other_user}","gists_url":"https://api.github.com/users/mounirlamouri/gists{/gist_id}","starred_url":"https://api.github.com/users/mounirlamouri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mounirlamouri/subscriptions","organizations_url":"https://api.github.com/users/mounirlamouri/orgs","repos_url":"https://api.github.com/users/mounirlamouri/repos","events_url":"https://api.github.com/users/mounirlamouri/events{/privacy}","received_events_url":"https://api.github.com/users/mounirlamouri/received_events","type":"User","site_admin":false},"body":"This is allowing a simpler flow to know whether playback started or\r\nwhether it failed. It also allows the UA to reject the promise if\r\nplayback is not allowed in the current context, solving issues websites\r\nhave to detect whether autoplay restrictions blocked the playback.\r\n\r\nSee issue #505.","created_at":"2016-01-13T10:46:34Z","updated_at":"2016-01-25T13:45:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a0c063b6fb581c0377d28fbc023bfc4d0f328fa","assignee":{"login":"foolip","id":498917,"avatar_url":"https://avatars.githubusercontent.com/u/498917?v=3","gravatar_id":"","url":"https://api.github.com/users/foolip","html_url":"https://github.com/foolip","followers_url":"https://api.github.com/users/foolip/followers","following_url":"https://api.github.com/users/foolip/following{/other_user}","gists_url":"https://api.github.com/users/foolip/gists{/gist_id}","starred_url":"https://api.github.com/users/foolip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foolip/subscriptions","organizations_url":"https://api.github.com/users/foolip/orgs","repos_url":"https://api.github.com/users/foolip/repos","events_url":"https://api.github.com/users/foolip/events{/privacy}","received_events_url":"https://api.github.com/users/foolip/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/whatwg/html/pulls/509/commits","review_comments_url":"https://api.github.com/repos/whatwg/html/pulls/509/comments","review_comment_url":"https://api.github.com/repos/whatwg/html/pulls/comments{/number}","comments_url":"https://api.github.com/repos/whatwg/html/issues/509/comments","statuses_url":"https://api.github.com/repos/whatwg/html/statuses/5796c916ad82f086b804ce58ef4b8e48d1d34a50","head":{"label":"mounirlamouri:play-promise","ref":"play-promise","sha":"5796c916ad82f086b804ce58ef4b8e48d1d34a50","user":{"login":"mounirlamouri","id":573590,"avatar_url":"https://avatars.githubusercontent.com/u/573590?v=3","gravatar_id":"","url":"https://api.github.com/users/mounirlamouri","html_url":"https://github.com/mounirlamouri","followers_url":"https://api.github.com/users/mounirlamouri/followers","following_url":"https://api.github.com/users/mounirlamouri/following{/other_user}","gists_url":"https://api.github.com/users/mounirlamouri/gists{/gist_id}","starred_url":"https://api.github.com/users/mounirlamouri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mounirlamouri/subscriptions","organizations_url":"https://api.github.com/users/mounirlamouri/orgs","repos_url":"https://api.github.com/users/mounirlamouri/repos","events_url":"https://api.github.com/users/mounirlamouri/events{/privacy}","received_events_url":"https://api.github.com/users/mounirlamouri/received_events","type":"User","site_admin":false},"repo":{"id":49516708,"name":"html","full_name":"mounirlamouri/html","owner":{"login":"mounirlamouri","id":573590,"avatar_url":"https://avatars.githubusercontent.com/u/573590?v=3","gravatar_id":"","url":"https://api.github.com/users/mounirlamouri","html_url":"https://github.com/mounirlamouri","followers_url":"https://api.github.com/users/mounirlamouri/followers","following_url":"https://api.github.com/users/mounirlamouri/following{/other_user}","gists_url":"https://api.github.com/users/mounirlamouri/gists{/gist_id}","starred_url":"https://api.github.com/users/mounirlamouri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mounirlamouri/subscriptions","organizations_url":"https://api.github.com/users/mounirlamouri/orgs","repos_url":"https://api.github.com/users/mounirlamouri/repos","events_url":"https://api.github.com/users/mounirlamouri/events{/privacy}","received_events_url":"https://api.github.com/users/mounirlamouri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mounirlamouri/html","description":"HTML Standard","fork":true,"url":"https://api.github.com/repos/mounirlamouri/html","forks_url":"https://api.github.com/repos/mounirlamouri/html/forks","keys_url":"https://api.github.com/repos/mounirlamouri/html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mounirlamouri/html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mounirlamouri/html/teams","hooks_url":"https://api.github.com/repos/mounirlamouri/html/hooks","issue_events_url":"https://api.github.com/repos/mounirlamouri/html/issues/events{/number}","events_url":"https://api.github.com/repos/mounirlamouri/html/events","assignees_url":"https://api.github.com/repos/mounirlamouri/html/assignees{/user}","branches_url":"https://api.github.com/repos/mounirlamouri/html/branches{/branch}","tags_url":"https://api.github.com/repos/mounirlamouri/html/tags","blobs_url":"https://api.github.com/repos/mounirlamouri/html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mounirlamouri/html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mounirlamouri/html/git/refs{/sha}","trees_url":"https://api.github.com/repos/mounirlamouri/html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mounirlamouri/html/statuses/{sha}","languages_url":"https://api.github.com/repos/mounirlamouri/html/languages","stargazers_url":"https://api.github.com/repos/mounirlamouri/html/stargazers","contributors_url":"https://api.github.com/repos/mounirlamouri/html/contributors","subscribers_url":"https://api.github.com/repos/mounirlamouri/html/subscribers","subscription_url":"https://api.github.com/repos/mounirlamouri/html/subscription","commits_url":"https://api.github.com/repos/mounirlamouri/html/commits{/sha}","git_commits_url":"https://api.github.com/repos/mounirlamouri/html/git/commits{/sha}","comments_url":"https://api.github.com/repos/mounirlamouri/html/comments{/number}","issue_comment_url":"https://api.github.com/repos/mounirlamouri/html/issues/comments{/number}","contents_url":"https://api.github.com/repos/mounirlamouri/html/contents/{+path}","compare_url":"https://api.github.com/repos/mounirlamouri/html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mounirlamouri/html/merges","archive_url":"https://api.github.com/repos/mounirlamouri/html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mounirlamouri/html/downloads","issues_url":"https://api.github.com/repos/mounirlamouri/html/issues{/number}","pulls_url":"https://api.github.com/repos/mounirlamouri/html/pulls{/number}","milestones_url":"https://api.github.com/repos/mounirlamouri/html/milestones{/number}","notifications_url":"https://api.github.com/repos/mounirlamouri/html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mounirlamouri/html/labels{/name}","releases_url":"https://api.github.com/repos/mounirlamouri/html/releases{/id}","deployments_url":"https://api.github.com/repos/mounirlamouri/html/deployments","created_at":"2016-01-12T17:25:01Z","updated_at":"2016-01-12T17:25:02Z","pushed_at":"2016-01-20T15:27:08Z","git_url":"git://github.com/mounirlamouri/html.git","ssh_url":"git@github.com:mounirlamouri/html.git","clone_url":"https://github.com/mounirlamouri/html.git","svn_url":"https://github.com/mounirlamouri/html","homepage":"https://html.spec.whatwg.org/multipage/","size":103647,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"whatwg:master","ref":"master","sha":"b09402f7f1f910bcb6025cfd255b0b7291f300a6","user":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars.githubusercontent.com/u/2226336?v=3","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"repo":{"id":11969507,"name":"html","full_name":"whatwg/html","owner":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars.githubusercontent.com/u/2226336?v=3","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/whatwg/html","description":"HTML Standard","fork":false,"url":"https://api.github.com/repos/whatwg/html","forks_url":"https://api.github.com/repos/whatwg/html/forks","keys_url":"https://api.github.com/repos/whatwg/html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whatwg/html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whatwg/html/teams","hooks_url":"https://api.github.com/repos/whatwg/html/hooks","issue_events_url":"https://api.github.com/repos/whatwg/html/issues/events{/number}","events_url":"https://api.github.com/repos/whatwg/html/events","assignees_url":"https://api.github.com/repos/whatwg/html/assignees{/user}","branches_url":"https://api.github.com/repos/whatwg/html/branches{/branch}","tags_url":"https://api.github.com/repos/whatwg/html/tags","blobs_url":"https://api.github.com/repos/whatwg/html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whatwg/html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whatwg/html/git/refs{/sha}","trees_url":"https://api.github.com/repos/whatwg/html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whatwg/html/statuses/{sha}","languages_url":"https://api.github.com/repos/whatwg/html/languages","stargazers_url":"https://api.github.com/repos/whatwg/html/stargazers","contributors_url":"https://api.github.com/repos/whatwg/html/contributors","subscribers_url":"https://api.github.com/repos/whatwg/html/subscribers","subscription_url":"https://api.github.com/repos/whatwg/html/subscription","commits_url":"https://api.github.com/repos/whatwg/html/commits{/sha}","git_commits_url":"https://api.github.com/repos/whatwg/html/git/commits{/sha}","comments_url":"https://api.github.com/repos/whatwg/html/comments{/number}","issue_comment_url":"https://api.github.com/repos/whatwg/html/issues/comments{/number}","contents_url":"https://api.github.com/repos/whatwg/html/contents/{+path}","compare_url":"https://api.github.com/repos/whatwg/html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whatwg/html/merges","archive_url":"https://api.github.com/repos/whatwg/html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whatwg/html/downloads","issues_url":"https://api.github.com/repos/whatwg/html/issues{/number}","pulls_url":"https://api.github.com/repos/whatwg/html/pulls{/number}","milestones_url":"https://api.github.com/repos/whatwg/html/milestones{/number}","notifications_url":"https://api.github.com/repos/whatwg/html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whatwg/html/labels{/name}","releases_url":"https://api.github.com/repos/whatwg/html/releases{/id}","deployments_url":"https://api.github.com/repos/whatwg/html/deployments","created_at":"2013-08-08T06:26:07Z","updated_at":"2016-01-25T03:58:03Z","pushed_at":"2016-01-25T13:34:31Z","git_url":"git://github.com/whatwg/html.git","ssh_url":"git@github.com:whatwg/html.git","clone_url":"https://github.com/whatwg/html.git","svn_url":"https://github.com/whatwg/html","homepage":"https://html.spec.whatwg.org/multipage/","size":114961,"stargazers_count":368,"watchers_count":368,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":84,"mirror_url":null,"open_issues_count":158,"forks":84,"open_issues":158,"watchers":368,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/whatwg/html/pulls/509"},"html":{"href":"https://github.com/whatwg/html/pull/509"},"issue":{"href":"https://api.github.com/repos/whatwg/html/issues/509"},"comments":{"href":"https://api.github.com/repos/whatwg/html/issues/509/comments"},"review_comments":{"href":"https://api.github.com/repos/whatwg/html/pulls/509/comments"},"review_comment":{"href":"https://api.github.com/repos/whatwg/html/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/whatwg/html/pulls/509/commits"},"statuses":{"href":"https://api.github.com/repos/whatwg/html/statuses/5796c916ad82f086b804ce58ef4b8e48d1d34a50"}}}}