{"action":"created","comment":{"url":"https://api.github.com/repos/impress/impress.js/pulls/comments/170448713","pull_request_review_id":99138803,"id":170448713,"diff_hunk":"@@ -0,0 +1,172 @@\n+/**\n+ * Media Plugin\n+ *\n+ * The media plugin is a combination of a preeinit and prestepleave plugin. \n+ * It is executed before impress:init and before impress:stepleave.\n+ * \n+ * It will do the following things:\n+ * \n+ *   - Parse special shortcuts to full html5 audio or video nodes:\n+ *     e.g. <div class=\"media\" data-media-source=\"…\" data-media-type=\"audio/…\"></div>\n+ *     or   <span class=\"media\" data-media-source=\"…\" data-media-type=\"video/…\"></span>\n+ *     \n+ *     All type of html tags are allowed. Currently only a single source is supported.\n+ *     All nodes will have the control attribute added, except the 'data-media-controls=\"false\"'\n+ *     attribute is added.\n+ *     \n+ *         <div class=\"media\" data-media-source=\"…\" data-media-type=\"…/…\" data-media-controls=\"false\"></div>\n+ * \n+ *  - Add a special class when playing and pausing media (removing them when ending)\n+ *\n+ *  - Autostart videos when entering a step, if the attribute data-media-playonenter is set and not \"false\".\n+ *\n+ *  - Pause all video and audio an the active step when leaving it. This can be disabled for \n+ *    indivudual media nodes by adding the data-media-pauseonleave=\"false\" attribute. This attribute\n+ *    is inherited from the shortcut described above.\n+ *    \n+ *    Examples: \n+ *\n+ *      <audio contols data-media-pauseonleave=\"false\">","path":"src/plugins/media/media.js","position":29,"original_position":29,"commit_id":"38cbd7966f0f7abc7f4942a7780a244244bd8386","original_commit_id":"38cbd7966f0f7abc7f4942a7780a244244bd8386","user":{"login":"henrikingo","id":2482018,"avatar_url":"https://avatars1.githubusercontent.com/u/2482018?v=4","gravatar_id":"","url":"https://api.github.com/users/henrikingo","html_url":"https://github.com/henrikingo","followers_url":"https://api.github.com/users/henrikingo/followers","following_url":"https://api.github.com/users/henrikingo/following{/other_user}","gists_url":"https://api.github.com/users/henrikingo/gists{/gist_id}","starred_url":"https://api.github.com/users/henrikingo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henrikingo/subscriptions","organizations_url":"https://api.github.com/users/henrikingo/orgs","repos_url":"https://api.github.com/users/henrikingo/repos","events_url":"https://api.github.com/users/henrikingo/events{/privacy}","received_events_url":"https://api.github.com/users/henrikingo/received_events","type":"User","site_admin":false},"body":"Btw, you don't need to implement any code for this, but in documentation you could add an example for how to automatically move to next step when the media reached its end:\r\n\r\n    <audio onended=\"impress().next()\">\r\n\r\nThis is a nice way of creating narrated presentations where presentation moves forward after the media clip finished playing. The above allows for tighter synchronization than for example setting step durations.","created_at":"2018-02-25T10:40:37Z","updated_at":"2018-02-25T10:40:37Z","html_url":"https://github.com/impress/impress.js/pull/672#discussion_r170448713","pull_request_url":"https://api.github.com/repos/impress/impress.js/pulls/672","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/impress/impress.js/pulls/comments/170448713"},"html":{"href":"https://github.com/impress/impress.js/pull/672#discussion_r170448713"},"pull_request":{"href":"https://api.github.com/repos/impress/impress.js/pulls/672"}},"in_reply_to_id":170333915},"pull_request":{"url":"https://api.github.com/repos/impress/impress.js/pulls/672","id":170325569,"html_url":"https://github.com/impress/impress.js/pull/672","diff_url":"https://github.com/impress/impress.js/pull/672.diff","patch_url":"https://github.com/impress/impress.js/pull/672.patch","issue_url":"https://api.github.com/repos/impress/impress.js/issues/672","number":672,"state":"open","locked":false,"title":"PR for media plugin","user":{"login":"complanar","id":4706846,"avatar_url":"https://avatars2.githubusercontent.com/u/4706846?v=4","gravatar_id":"","url":"https://api.github.com/users/complanar","html_url":"https://github.com/complanar","followers_url":"https://api.github.com/users/complanar/followers","following_url":"https://api.github.com/users/complanar/following{/other_user}","gists_url":"https://api.github.com/users/complanar/gists{/gist_id}","starred_url":"https://api.github.com/users/complanar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/complanar/subscriptions","organizations_url":"https://api.github.com/users/complanar/orgs","repos_url":"https://api.github.com/users/complanar/repos","events_url":"https://api.github.com/users/complanar/events{/privacy}","received_events_url":"https://api.github.com/users/complanar/received_events","type":"User","site_admin":false},"body":"I’ve created a media plugin that enables pause on `impress:stepleave`, play on `impress:stepenter`, adds a special class to the body tag while playing media (useful for darkening the background in the meanwhile with CSS) and allows the use of some shorthands for inserting media. See commented source in `src/plugins/media/media.js` for details.\r\n\r\n`js/impress.js` was not built so far. ","created_at":"2018-02-20T22:22:07Z","updated_at":"2018-02-25T10:40:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab199f7b260ce2d3def5dd88bafde518994621eb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/impress/impress.js/pulls/672/commits","review_comments_url":"https://api.github.com/repos/impress/impress.js/pulls/672/comments","review_comment_url":"https://api.github.com/repos/impress/impress.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/impress/impress.js/issues/672/comments","statuses_url":"https://api.github.com/repos/impress/impress.js/statuses/38cbd7966f0f7abc7f4942a7780a244244bd8386","head":{"label":"complanar:master","ref":"master","sha":"38cbd7966f0f7abc7f4942a7780a244244bd8386","user":{"login":"complanar","id":4706846,"avatar_url":"https://avatars2.githubusercontent.com/u/4706846?v=4","gravatar_id":"","url":"https://api.github.com/users/complanar","html_url":"https://github.com/complanar","followers_url":"https://api.github.com/users/complanar/followers","following_url":"https://api.github.com/users/complanar/following{/other_user}","gists_url":"https://api.github.com/users/complanar/gists{/gist_id}","starred_url":"https://api.github.com/users/complanar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/complanar/subscriptions","organizations_url":"https://api.github.com/users/complanar/orgs","repos_url":"https://api.github.com/users/complanar/repos","events_url":"https://api.github.com/users/complanar/events{/privacy}","received_events_url":"https://api.github.com/users/complanar/received_events","type":"User","site_admin":false},"repo":{"id":120949326,"name":"impress.js","full_name":"complanar/impress.js","owner":{"login":"complanar","id":4706846,"avatar_url":"https://avatars2.githubusercontent.com/u/4706846?v=4","gravatar_id":"","url":"https://api.github.com/users/complanar","html_url":"https://github.com/complanar","followers_url":"https://api.github.com/users/complanar/followers","following_url":"https://api.github.com/users/complanar/following{/other_user}","gists_url":"https://api.github.com/users/complanar/gists{/gist_id}","starred_url":"https://api.github.com/users/complanar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/complanar/subscriptions","organizations_url":"https://api.github.com/users/complanar/orgs","repos_url":"https://api.github.com/users/complanar/repos","events_url":"https://api.github.com/users/complanar/events{/privacy}","received_events_url":"https://api.github.com/users/complanar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/complanar/impress.js","description":"It's a presentation framework based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com.","fork":true,"url":"https://api.github.com/repos/complanar/impress.js","forks_url":"https://api.github.com/repos/complanar/impress.js/forks","keys_url":"https://api.github.com/repos/complanar/impress.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/complanar/impress.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/complanar/impress.js/teams","hooks_url":"https://api.github.com/repos/complanar/impress.js/hooks","issue_events_url":"https://api.github.com/repos/complanar/impress.js/issues/events{/number}","events_url":"https://api.github.com/repos/complanar/impress.js/events","assignees_url":"https://api.github.com/repos/complanar/impress.js/assignees{/user}","branches_url":"https://api.github.com/repos/complanar/impress.js/branches{/branch}","tags_url":"https://api.github.com/repos/complanar/impress.js/tags","blobs_url":"https://api.github.com/repos/complanar/impress.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/complanar/impress.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/complanar/impress.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/complanar/impress.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/complanar/impress.js/statuses/{sha}","languages_url":"https://api.github.com/repos/complanar/impress.js/languages","stargazers_url":"https://api.github.com/repos/complanar/impress.js/stargazers","contributors_url":"https://api.github.com/repos/complanar/impress.js/contributors","subscribers_url":"https://api.github.com/repos/complanar/impress.js/subscribers","subscription_url":"https://api.github.com/repos/complanar/impress.js/subscription","commits_url":"https://api.github.com/repos/complanar/impress.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/complanar/impress.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/complanar/impress.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/complanar/impress.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/complanar/impress.js/contents/{+path}","compare_url":"https://api.github.com/repos/complanar/impress.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/complanar/impress.js/merges","archive_url":"https://api.github.com/repos/complanar/impress.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/complanar/impress.js/downloads","issues_url":"https://api.github.com/repos/complanar/impress.js/issues{/number}","pulls_url":"https://api.github.com/repos/complanar/impress.js/pulls{/number}","milestones_url":"https://api.github.com/repos/complanar/impress.js/milestones{/number}","notifications_url":"https://api.github.com/repos/complanar/impress.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/complanar/impress.js/labels{/name}","releases_url":"https://api.github.com/repos/complanar/impress.js/releases{/id}","deployments_url":"https://api.github.com/repos/complanar/impress.js/deployments","created_at":"2018-02-09T19:56:02Z","updated_at":"2018-02-09T19:56:04Z","pushed_at":"2018-02-24T20:58:33Z","git_url":"git://github.com/complanar/impress.js.git","ssh_url":"git@github.com:complanar/impress.js.git","clone_url":"https://github.com/complanar/impress.js.git","svn_url":"https://github.com/complanar/impress.js","homepage":"http://impress.js.org","size":4119,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"impress:master","ref":"master","sha":"e52866d1c46228049d7ac6e8860bf8e9145b1467","user":{"login":"impress","id":5477410,"avatar_url":"https://avatars1.githubusercontent.com/u/5477410?v=4","gravatar_id":"","url":"https://api.github.com/users/impress","html_url":"https://github.com/impress","followers_url":"https://api.github.com/users/impress/followers","following_url":"https://api.github.com/users/impress/following{/other_user}","gists_url":"https://api.github.com/users/impress/gists{/gist_id}","starred_url":"https://api.github.com/users/impress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/impress/subscriptions","organizations_url":"https://api.github.com/users/impress/orgs","repos_url":"https://api.github.com/users/impress/repos","events_url":"https://api.github.com/users/impress/events{/privacy}","received_events_url":"https://api.github.com/users/impress/received_events","type":"Organization","site_admin":false},"repo":{"id":3065454,"name":"impress.js","full_name":"impress/impress.js","owner":{"login":"impress","id":5477410,"avatar_url":"https://avatars1.githubusercontent.com/u/5477410?v=4","gravatar_id":"","url":"https://api.github.com/users/impress","html_url":"https://github.com/impress","followers_url":"https://api.github.com/users/impress/followers","following_url":"https://api.github.com/users/impress/following{/other_user}","gists_url":"https://api.github.com/users/impress/gists{/gist_id}","starred_url":"https://api.github.com/users/impress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/impress/subscriptions","organizations_url":"https://api.github.com/users/impress/orgs","repos_url":"https://api.github.com/users/impress/repos","events_url":"https://api.github.com/users/impress/events{/privacy}","received_events_url":"https://api.github.com/users/impress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/impress/impress.js","description":"It's a presentation framework based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com.","fork":false,"url":"https://api.github.com/repos/impress/impress.js","forks_url":"https://api.github.com/repos/impress/impress.js/forks","keys_url":"https://api.github.com/repos/impress/impress.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/impress/impress.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/impress/impress.js/teams","hooks_url":"https://api.github.com/repos/impress/impress.js/hooks","issue_events_url":"https://api.github.com/repos/impress/impress.js/issues/events{/number}","events_url":"https://api.github.com/repos/impress/impress.js/events","assignees_url":"https://api.github.com/repos/impress/impress.js/assignees{/user}","branches_url":"https://api.github.com/repos/impress/impress.js/branches{/branch}","tags_url":"https://api.github.com/repos/impress/impress.js/tags","blobs_url":"https://api.github.com/repos/impress/impress.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/impress/impress.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/impress/impress.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/impress/impress.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/impress/impress.js/statuses/{sha}","languages_url":"https://api.github.com/repos/impress/impress.js/languages","stargazers_url":"https://api.github.com/repos/impress/impress.js/stargazers","contributors_url":"https://api.github.com/repos/impress/impress.js/contributors","subscribers_url":"https://api.github.com/repos/impress/impress.js/subscribers","subscription_url":"https://api.github.com/repos/impress/impress.js/subscription","commits_url":"https://api.github.com/repos/impress/impress.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/impress/impress.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/impress/impress.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/impress/impress.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/impress/impress.js/contents/{+path}","compare_url":"https://api.github.com/repos/impress/impress.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/impress/impress.js/merges","archive_url":"https://api.github.com/repos/impress/impress.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/impress/impress.js/downloads","issues_url":"https://api.github.com/repos/impress/impress.js/issues{/number}","pulls_url":"https://api.github.com/repos/impress/impress.js/pulls{/number}","milestones_url":"https://api.github.com/repos/impress/impress.js/milestones{/number}","notifications_url":"https://api.github.com/repos/impress/impress.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/impress/impress.js/labels{/name}","releases_url":"https://api.github.com/repos/impress/impress.js/releases{/id}","deployments_url":"https://api.github.com/repos/impress/impress.js/deployments","created_at":"2011-12-28T22:23:19Z","updated_at":"2018-02-25T05:10:51Z","pushed_at":"2018-02-24T21:00:49Z","git_url":"git://github.com/impress/impress.js.git","ssh_url":"git@github.com:impress/impress.js.git","clone_url":"https://github.com/impress/impress.js.git","svn_url":"https://github.com/impress/impress.js","homepage":"http://impress.js.org","size":4127,"stargazers_count":33131,"watchers_count":33131,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6774,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":6774,"open_issues":39,"watchers":33131,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/impress/impress.js/pulls/672"},"html":{"href":"https://github.com/impress/impress.js/pull/672"},"issue":{"href":"https://api.github.com/repos/impress/impress.js/issues/672"},"comments":{"href":"https://api.github.com/repos/impress/impress.js/issues/672/comments"},"review_comments":{"href":"https://api.github.com/repos/impress/impress.js/pulls/672/comments"},"review_comment":{"href":"https://api.github.com/repos/impress/impress.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/impress/impress.js/pulls/672/commits"},"statuses":{"href":"https://api.github.com/repos/impress/impress.js/statuses/38cbd7966f0f7abc7f4942a7780a244244bd8386"}},"author_association":"NONE"}}
{"actor":{"display_login":"henrikingo"}}