{"action":"created","issue":{"url":"https://api.github.com/repos/tor4kichi/Hohoema/issues/629","repository_url":"https://api.github.com/repos/tor4kichi/Hohoema","labels_url":"https://api.github.com/repos/tor4kichi/Hohoema/issues/629/labels{/name}","comments_url":"https://api.github.com/repos/tor4kichi/Hohoema/issues/629/comments","events_url":"https://api.github.com/repos/tor4kichi/Hohoema/issues/629/events","html_url":"https://github.com/tor4kichi/Hohoema/issues/629","id":303022530,"number":629,"title":"投コメの優先表示とニコスクリプト対応","user":{"login":"tor4kichi","id":7813604,"avatar_url":"https://avatars2.githubusercontent.com/u/7813604?v=4","gravatar_id":"","url":"https://api.github.com/users/tor4kichi","html_url":"https://github.com/tor4kichi","followers_url":"https://api.github.com/users/tor4kichi/followers","following_url":"https://api.github.com/users/tor4kichi/following{/other_user}","gists_url":"https://api.github.com/users/tor4kichi/gists{/gist_id}","starred_url":"https://api.github.com/users/tor4kichi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tor4kichi/subscriptions","organizations_url":"https://api.github.com/users/tor4kichi/orgs","repos_url":"https://api.github.com/users/tor4kichi/repos","events_url":"https://api.github.com/users/tor4kichi/events{/privacy}","received_events_url":"https://api.github.com/users/tor4kichi/received_events","type":"User","site_admin":false},"labels":[{"id":355583487,"url":"https://api.github.com/repos/tor4kichi/Hohoema/labels/feature","name":"feature","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-07T09:26:31Z","updated_at":"2018-04-17T09:01:44Z","closed_at":null,"author_association":"OWNER","body":"## 前提知識\r\n* 投稿者コメントについて\r\n  * http://qa.nicovideo.jp/faq/show/599\r\n* ニコスクリプトとは\r\n  * http://qa.nicovideo.jp/faq/show/7386\r\n\r\nニコスクリプトを活用してる動画例\r\nhttp://www.nicovideo.jp/watch/sm32843532\r\n\r\n## HTML5での投コメ取得方法\r\n\r\n> http://nmsg.nicovideo.jp/api.json/\r\n\r\nこちらでコメントを取得した場合、コメント列の最後尾に投稿者コメントがあります。例えば以下のようなデータになってます\r\n\r\n```\r\n{\r\n\t\"chat\": {\r\n\t\t\"thread\": \"1520342061\",\r\n\t\t\"fork\": 1,\r\n\t\t\"no\": 1,\r\n\t\t\"vpos\": 0,\r\n\t\t\"date\": 1520355768,\r\n\t\t\"date_usec\": 221000,\r\n\t\t\"premium\": 1,\r\n\t\t\"mail\": \"green\",\r\n\t\t\"content\": \"＠デフォルト\"\r\n\t}\r\n}, {\r\n\t\"chat\": {\r\n\t\t\"thread\": \"1520342061\",\r\n\t\t\"fork\": 1,\r\n\t\t\"no\": 2,\r\n\t\t\"vpos\": 0,\r\n\t\t\"date\": 1520355768,\r\n\t\t\"date_usec\": 221000,\r\n\t\t\"premium\": 1,\r\n\t\t\"mail\": \"@900\",\r\n\t\t\"content\": \"＠シーク禁止\"\r\n\t}\r\n}, {\r\n\t\"chat\": {\r\n\t\t\"thread\": \"1520342061\",\r\n\t\t\"fork\": 1,\r\n\t\t\"no\": 3,\r\n\t\t\"vpos\": 84000,\r\n\t\t\"date\": 1520355768,\r\n\t\t\"date_usec\": 221000,\r\n\t\t\"premium\": 1,\r\n\t\t\"content\": \"＠ジャンプ #13:00\"\r\n\t}\r\n}, {\r\n\t\"chat\": {\r\n\t\t\"thread\": \"1520342061\",\r\n\t\t\"fork\": 1,\r\n\t\t\"no\": 4,\r\n\t\t\"vpos\": 90000,\r\n\t\t\"date\": 1520355768,\r\n\t\t\"date_usec\": 221000,\r\n\t\t\"premium\": 1,\r\n\t\t\"content\": \"＠ジャンプ #00:00\"\r\n\t}\r\n}\r\n```\r\n\r\n命令スクリプトがcontent部分に記載されていて、動画がvposの位置を超えたら実行します。\r\n\r\n投稿者コメントはuser_idが省略されています。\r\n\r\n```\r\nif (chat.user_id==null && chat.content.StartWith('＠'))\r\n{\r\n     // 投コメスクリプトとして処理\r\n}\r\n```\r\n\r\nといった形で実装すると良さそうです。\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tor4kichi/Hohoema/issues/comments/381909871","html_url":"https://github.com/tor4kichi/Hohoema/issues/629#issuecomment-381909871","issue_url":"https://api.github.com/repos/tor4kichi/Hohoema/issues/629","id":381909871,"user":{"login":"tor4kichi","id":7813604,"avatar_url":"https://avatars2.githubusercontent.com/u/7813604?v=4","gravatar_id":"","url":"https://api.github.com/users/tor4kichi","html_url":"https://github.com/tor4kichi","followers_url":"https://api.github.com/users/tor4kichi/followers","following_url":"https://api.github.com/users/tor4kichi/following{/other_user}","gists_url":"https://api.github.com/users/tor4kichi/gists{/gist_id}","starred_url":"https://api.github.com/users/tor4kichi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tor4kichi/subscriptions","organizations_url":"https://api.github.com/users/tor4kichi/orgs","repos_url":"https://api.github.com/users/tor4kichi/repos","events_url":"https://api.github.com/users/tor4kichi/events{/privacy}","received_events_url":"https://api.github.com/users/tor4kichi/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T09:01:44Z","updated_at":"2018-04-17T09:01:44Z","author_association":"OWNER","body":"TAS動画ランキングで見られるようなスクリプトコメントを非表示にしておかないと見づらいようです。"}}
{"actor":{"display_login":"tor4kichi"}}