{"id":965,"date":"2015-09-30T14:31:19","date_gmt":"2015-09-30T05:31:19","guid":{"rendered":"http:\/\/green-rabbit-4e0a4194074c787f.znlc.jp\/ili-zine\/?p=965"},"modified":"2016-01-29T14:35:33","modified_gmt":"2016-01-29T05:35:33","slug":"20150930","status":"publish","type":"post","link":"https:\/\/www.ilii.jp\/ili-zine\/geek\/20150930.html","title":{"rendered":"\u7b2c37\u56de\u3000WebRTC\u3092\u4f7f\u3063\u305f\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30d3\u30c7\u30aa\u4f1a\u8b70\u30b5\u30f3\u30d7\u30eb"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u3046\u3061\u3067\u3059\u3002<\/p>\n<p>\u6700\u8fd1\u3001\u300cWebRTC\u300d\u306b\u95a2\u3057\u3066\u76f8\u8ac7\u3092\u9802\u304f\u3053\u3068\u304c\u5897\u3048\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u79c1\u304c\u306f\u3058\u3081\u3066\u3053\u306e\u8a00\u8449\u3092\u805e\u3044\u305f\u306e\u306f\u30012\uff5e3\u5e74\u524d\u306e\u3053\u3068\u3060\u3063\u305f\u304b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u305d\u306e\u6642\u306e\u79c1\u306f\u3001\u30b9\u30ab\u30a4\u30d7\u7b49\u306e\u5c02\u7528\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306a\u304f\u3001\u30d6\u30e9\u30a6\u30b6\u3060\u3051\u3067\u30d3\u30c7\u30aa\u3084\u30b5\u30a6\u30f3\u30c9\u30c7\u30d0\u30a4\u30b9\u3092\u64cd\u4f5c\u3057\u3066\u30c6\u30ec\u30d3\u4f1a\u8b70\u3092\u5b9f\u73fe\u3067\u304d\u308b\u3001\u3068\u3044\u3063\u305f\u307c\u3093\u3084\u308a\u3068\u3057\u305f\u7406\u89e3\u5ea6\u3067\u3001\u5177\u4f53\u7684\u306b\u3069\u3046\u3044\u3063\u305f\u3082\u306e\u304c\u3042\u308b\u304b\u77e5\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>WebRTC\u3067\u306f\u306a\u3044\u30c6\u30ec\u30d3\u4f1a\u8b70\u30b7\u30b9\u30c6\u30e0\u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306b\u95a2\u3057\u3066\u306f\u300c\u7b2c23\u56de \u96fb\u8a71\u4ea4\u63db\u6a5f\u80fd\u3084\u30c6\u30ec\u30d3\u4f1a\u8b70\u3092\u5b9f\u73fe\u3059\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u300d\u3067\u3082\u7d39\u4ecb\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u300cWebRTC\u3092\u89e6\u3063\u305f\u3053\u3068\u3042\u308b\uff1f\u4ed5\u4e8b\u3042\u308b\u3093\u3060\u3051\u3069\u3002\u300d\u300c\u81ea\u5206\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306b\u30c6\u30ec\u30d3\u4f1a\u8b70\u6a5f\u80fd\u3092\u8f09\u305b\u3066\u3001\u30c6\u30ec\u30d3\u4f1a\u8b70\u76f8\u8ac7\u3092\u5b9f\u73fe\u3057\u305f\u3044\u3002\u300d\u3068\u3044\u3063\u305f\u3054\u76f8\u8ac7\u304c\u5897\u3048\u3066\u304d\u305f\u306e\u3067\u3001\u4eca\u56de\u306f\u3001WebRTC\u3067\u5b9f\u88c5\u3055\u308c\u305f\u300c\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30c6\u30ec\u30d3\u4f1a\u8b70\u300d\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u52d5\u304b\u3057\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\u25a0WebRTC\u3068\u306f<\/strong><\/p>\n<p><a href=\"http:\/\/www.webrtc.org\/\" target=\"_blank\">http:\/\/www.webrtc.org\/<\/a><\/p>\n<p>\u516c\u5f0f\u30b5\u30a4\u30c8\u306b\u3088\u308b\u3068\u3001WebRTC\u3068\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u4e0a\u3067\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u73fe\u3059\u308b\u30aa\u30fc\u30d7\u30f3\u306a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u5b9f\u88c5\u3059\u308b\u969b\u306fjavascript API\u3092\u4f7f\u3063\u3066\u3053\u308c\u3089\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3068\u306e\u3053\u3068\u3002<\/p>\n<p><strong>\u25a0WebRT\u3092\u5b9f\u73fe\u3059\u308b\u306e\u306b\u5fc5\u8981\u306a\u3082\u306e<\/strong><\/p>\n<p>WebRTC\u3092\u4f7f\u3063\u305f\u30c6\u30ec\u30d3\u4f1a\u8b70\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001\u52d5\u753b\u3084\u97f3\u58f0\u306a\u3069\u306e\u901a\u4fe1\u306f\u30d6\u30e9\u30a6\u30b6\u9593\u3067\u76f4\u63a5\u884c\u308f\u308c\u308b\u3001\u3044\u308f\u3086\u308b\u300cP2P\u300d\u3068\u3044\u3046\u69cb\u6210\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u3069\u306e\u7aef\u672b\u540c\u58eb\u3092\u3064\u306a\u3050\u304b\u3092\u7ba1\u7406\u3059\u308b\u3001\u300c\u30d6\u30ed\u30fc\u30ab\u30fc\u30b5\u30fc\u30d0\u30fc\u300d\u3068\u8a00\u308f\u308c\u308b\u53d6\u6b21\u304e\u306e\u30b7\u30b9\u30c6\u30e0\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u5168\u3066\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u52d5\u4f5c\u3059\u308b\u308f\u3051\u3067\u306f\u306a\u304f\u3001IE\u3067\u306f\u52d5\u304d\u307e\u305b\u3093\u304c\u3001Chrome\u3001firefox\u306a\u3069\u3067\u306f\u52d5\u4f5c\u3057\u307e\u3059\u3002iPhone\u3084Android\u7aef\u672b\u306eSafari\u3084Chrome\u3067\u3082\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u25a0\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306eWebRTC\u30e9\u30a4\u30d6\u30e9\u30ea\u300cpeerjs\u300d<br \/>\n<\/strong><br \/>\nWebRTC\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u30cd\u30a4\u30c6\u30a3\u30d6\u306ajavascript API\u3092\u4f7f\u7528\u3059\u308b\u3088\u308a\u3082\u3001\u3053\u306eAPI\u3092\u30e9\u30c3\u30d7\u3057\u305f\u3082\u306e\u3092\u4f7f\u3046\u307b\u3046\u304c\u7c21\u5358\u306b\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u30a2\u30af\u30c6\u30a3\u30d6\u3067\u77e5\u540d\u5ea6\u3082\u9ad8\u3044\u300cpeerjs\u300d\u3068\u3044\u3046\u3001\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306eWebRTC\u306ejavascript\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001NTT\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u30ba\u304c\u300cSkyWay\u300d\u3068\u3044\u3046WebRTC\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u63d0\u4f9b\u3057\u3066\u304a\u308a\u3001\u3053\u308c\u3082\u4e2d\u8eab\u300cpeerjs\u300d\u3067\u52d5\u304f\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u65e5\u672c\u8a9e\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u305f\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3059\u308b\u3053\u3068\u3067\u7121\u6599\u3067\u30d6\u30ed\u30fc\u30ab\u30fc\u30b5\u30fc\u30d0\u30fc\u3092\u5229\u7528\u3067\u304d\u308b\u3068\u306e\u3053\u3068\u3067\u3001\u307e\u305a\u306f\u3053\u308c\u3092\u5229\u7528\u3057\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\u25a0Peerjs\u30d9\u30fc\u30b9\u306e\u300cSkyWay\u300d\u30b5\u30fc\u30d3\u30b9\u30b5\u30a4\u30c8<\/strong><\/p>\n<p><a href=\"https:\/\/nttcom.github.io\/skyway\/index.html\" target=\"_blank\">https:\/\/nttcom.github.io\/skyway\/index.html<\/a><\/p>\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8-&gt;Javascript-&gt;\u30b9\u30bf\u30fc\u30c8\u30ac\u30a4\u30c9\u306e\u9806\u306b\u79fb\u52d5\u3059\u308b\u3068\u3001SkyWay\u3092\u4f7f\u3063\u3066WebRTC\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u516c\u958b\u3055\u308c\u3066\u304a\u308a\u3001\u5b9f\u969b\u306b\u306f\u3001PeerJS\u306e\u65e5\u672c\u8a9eAPI\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/nttcom.github.io\/skyway\/docs\/#JS\" target=\"_blank\">https:\/\/nttcom.github.io\/skyway\/docs\/#JS<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-927\" src=\"https:\/\/www.ilii.jp\/ili-zine\/wp-content\/uploads\/2016\/01\/201509u01.jpg\" alt=\"201509u01\" width=\"480\" height=\"302\" srcset=\"https:\/\/www.ilii.jp\/ili-zine\/wp-content\/uploads\/2016\/01\/201509u01.jpg 480w, https:\/\/www.ilii.jp\/ili-zine\/wp-content\/uploads\/2016\/01\/201509u01-380x239.jpg 380w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>\u3053\u306e\u30b5\u30fc\u30d3\u30b9\u3067\u30d6\u30ed\u30fc\u30ab\u30fc\u30b5\u30fc\u30d0\u30fc\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u300cAPI\u30ad\u30fc\u300d\u3068\u3044\u3046\u3082\u306e\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u300cAPI\u30ad\u30fc\u306e\u7533\u3057\u8fbc\u307f\u300d\u306e\u30ea\u30f3\u30af\u5148\u30da\u30fc\u30b8\u304c\u73fe\u6642\u70b9(2015\/09\/27)\u3067\u306f\u30ea\u30f3\u30af\u5207\u308c\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u5148\u307b\u3069\u306eSkyWay\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u30c8\u30c3\u30d7\u304b\u3089\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u884c\u3044\u3001\u30c6\u30ec\u30d3\u4f1a\u8b70\u3092\u516c\u958b\u3059\u308b\u30b5\u30a4\u30c8\u306eURL\u3092\u5165\u529b\u3059\u308b\u3068\u3001\u300cAPI\u30ad\u30fc\u300d\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u25a0\u30b5\u30fc\u30d0\u30fc\u306e\u6e96\u5099<\/strong><\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30c6\u30ec\u30d3\u4f1a\u8b70\u7528\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u8868\u793a\u3059\u308b\u30b5\u30fc\u30d0\u30fc\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u300cpeerjs.opensourcedemo.biz\u300d\u3068\u3044\u3046\u30c9\u30e1\u30a4\u30f3\u3092\u7528\u610f\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u56de\u4f7f\u7528\u3059\u308b\u30b5\u30fc\u30d0\u30fc\u3078DNS\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fcapache\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u306b\u3001\u30d3\u30c7\u30aa\u30c1\u30e3\u30c3\u30c8\u306e\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u300cindex.html\u300d\u3068\u300cstyle.css\u300d\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u4e0a\u306b\u914d\u7f6e\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9<br \/>\n<a href=\"https:\/\/github.com\/nttcom\/peerjs\/tree\/master\/examples\" target=\"_blank\">https:\/\/github.com\/nttcom\/peerjs\/tree\/master\/examples<\/a><\/p>\n<p>index.html\u5185\u306e\u4ee5\u4e0b\u306eAPI\u30ad\u30fc\u90e8\u5206\u3092SkyWay\u3067\u53d6\u5f97\u3057\u305fAPI\u30ad\u30fc\u306b\u7f6e\u304d\u63db\u3048\u308b<br \/>\n\u3068\u3001\u3059\u3050\u306b\u30d3\u30c7\u30aa\u30c1\u30e3\u30c3\u30c8\u304c\u52d5\u304f\u306e\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>8 \/\/ Compatibility shim<br \/>\n9 navigator.getUserMedia = navigator.getUserMedia || navigat<br \/>\nor.webkitGetUserMedia || navigator.mozGetUserMedia;<br \/>\n10 \/\/ PeerJS object<br \/>\n11 var peer = new Peer({ key: &#8216;API\u30ad\u30fc\u306b\u7f6e\u304d\u63db\u3048\u308b\u90e8\u5206&#8217;, debu<br \/>\ng: 3});<br \/>\n12 peer.on(&#8216;open&#8217;, function(){<br \/>\n13 $(&#8216;#my-id&#8217;).text(peer.id);<br \/>\n14 });<\/p>\n<p>\u4eca\u56deSkyWay\u3067\u52d5\u304b\u3057\u305f\u30d3\u30c7\u30aa\u30c1\u30e3\u30c3\u30c8\u306eURL\u306f\u3053\u3061\u3089<br \/>\n<a href=\"http:\/\/peerjs.opensourcedemo.biz\/\" target=\"_blank\">http:\/\/peerjs.opensourcedemo.biz\/<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-926\" src=\"https:\/\/www.ilii.jp\/ili-zine\/wp-content\/uploads\/2016\/01\/201509u02.jpg\" alt=\"201509u02\" width=\"480\" height=\"289\" srcset=\"https:\/\/www.ilii.jp\/ili-zine\/wp-content\/uploads\/2016\/01\/201509u02.jpg 480w, https:\/\/www.ilii.jp\/ili-zine\/wp-content\/uploads\/2016\/01\/201509u02-380x229.jpg 380w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>\u30d3\u30c7\u30aa\u30c1\u30e3\u30c3\u30c8\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u3001\u4ee5\u4e0b\u306e\u65b9\u6cd5\u3067\u8a66\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>1. \u30d6\u30e9\u30a6\u30b6\u30922\u3064\u7acb\u3061\u4e0a\u3052\u3066\u4e21\u65b9\u306b\u4e0a\u8a18URL\u3092\u5165\u529b\u3059\u308b\u3002<br \/>\n2. \u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u3068\u3001<\/p>\n<p>Your id: XXXXXXXXXXXX<\/p>\n<p>\u3068\u3044\u3046\u5f62\u3067ID\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u305d\u306eID\u3092\u3001\u8d77\u52d5\u3057\u305f\u3082\u3046\u7247\u65b9\u306e\u30d6\u30e9\u30a6\u30b6\u306eCall\u30dc\u30bf\u30f3\u306e\u5de6\u306b\u5165\u529b\u3057\u3066\u5b9f\u884c\u3059\u308b\u3068\u3001\u30d3\u30c7\u30aa\u4f1a\u8b70\u304c\u3059\u3050\u306b\u59cb\u307e\u308a\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u306a\u306e\u3067\u3001\u547c\u3073\u51fa\u3057\u304c\u884c\u308f\u308c\u308b\u3053\u3068\u306a\u304f\u3001\u5373\u63a5\u7d9a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f1a\u793e\u306e\u540c\u50da\u3084\u53cb\u4eba\u7b49\u306b\u5354\u529b\u3057\u3066\u3082\u3089\u3044\u3001\u547c\u3073\u51fa\u3057\u5074\u3068\u53d7\u3051\u5074\u3067\u5225\u308c\u3066\u8a66\u3057\u3066\u307f\u308b\u3068\u3001\u5b9f\u969b\u306e\u6620\u50cf\u3084\u4f1a\u8a71\u306e\u30c6\u30b9\u30c8\u307e\u3067\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\u25a0\u30d6\u30ed\u30fc\u30ab\u30fc\u30b5\u30fc\u30d0\u30fc\u3082\u81ea\u524d\u3067\u69cb\u7bc9\u3057\u3001\u5168\u3066\u81ea\u524d\u3067\u30d5\u30eb\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306eWebRTC\u3092\u3084\u3063\u3066\u307f\u308b<\/strong><\/p>\n<p>\u4e0a\u8a18\u3067\u306f\u3001NTT\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u30ba\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308bSkyWay\u306e\u30d6\u30ed\u30fc\u30ab\u30fc\u30b5\u30fc\u30d0\u30fc\u3092\u5229\u7528\u3057\u3066WebRTC\u3092\u7c21\u5358\u306b\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306f\u3001peerjs\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308b\u30d6\u30ed\u30fc\u30ab\u30fc\u30b5\u30fc\u30d0\u30fc\u3068\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u3092\u4f7f\u3063\u3066\u3001\u81ea\u5206\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u5168\u3066\u81ea\u524d\u3067\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>1.node.js\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<p>peerjs\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308bpeerjs-server\u306fnode.js\u3067\u52d5\u3044\u3066\u3044\u307e\u3059\u3002<br \/>\n\u7b2c34\u56de\u300c\u30b5\u30fc\u30d0\u30fc\u76e3\u8996\u300d\u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u300d\u3067\u7d39\u4ecb\u3057\u305fuptime\u3068\u3044\u3046\u30b5\u30fc\u30d0\u30fc\u76e3\u8996\u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3082node.js\u3067\u52d5\u3044\u3066\u307e\u3057\u305f\u3002\u6700\u8fd1\u306e\u30c8\u30ec\u30f3\u30c9\u3067\u3059\u306d\u3002<\/p>\n<p>\u4eca\u56de\u5229\u7528\u3057\u3066\u3044\u308b\u30b5\u30fc\u30d0\u30fc\u306fCentOS7\u3067\u3001\u524d\u6e96\u5099\u3068\u3057\u3066epel\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089yum\u3067node.js\u3068npm\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u3061\u306a\u307f\u306b\u3001yum\u306fCentOS\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u7ba1\u7406\u3059\u308b\u30c4\u30fc\u30eb\u3067\u3001npm\u306fNode\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u7ba1\u7406\u3059\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<p>2.epel\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8ffd\u52a0<br \/>\nyum install epel-release<\/p>\n<p>3.node.js\u3068npm\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\nyum install node.js npm<\/p>\n<p>\u6b21\u306b\u3001npm\u3092\u4f7f\u3063\u3066peerjs\u30b5\u30fc\u30d0\u30fc\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u306e\u306f\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u306e\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u3042\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p>npm install peer<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b node_modules\u3068\u3044\u3046<br \/>\n\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p>.\/node_modules\/peer\/bin\/peerjs &#8211;port 9000 &#8211;key geekfeed &amp;<\/p>\n<p>port\u306e9000\u3084\u3001key\u306egeekfeed\u306f\u4efb\u610f\u306e\u3082\u306e\u306b\u5909\u3048\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u6700\u5f8c\u306e &amp; \u306f\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u8d77\u52d5\u3067\u3059\u3002<\/p>\n<p>Peerjs-server\u306e\u30bd\u30fc\u30b9\u306e\u516c\u958bURL\u306f\u3053\u3061\u3089<br \/>\nhttps:\/\/github.com\/peers\/peerjs-server<\/p>\n<p>\u3053\u308c\u3067\u3001\u30d6\u30ed\u30fc\u30ab\u30fc\u30b5\u30fc\u30d0\u30fc\u3082\u81ea\u524d\u3067\u7528\u610f\u3067\u304d\u307e\u3057\u305f\u306e\u3067\u3001\u5148\u307b\u3069\u306eindex.html\u3092\u5225\u306e\u540d\u524d\u3067\u30b3\u30d4\u30fc\u3057\u3066\u3001\u8a2d\u5b9a\u5185\u5bb9\u3082\u4ee5\u4e0b\u306b\u5909\u3048\u307e\u3059\u3002<\/p>\n<p>8 \/\/ Compatibility shim<br \/>\n9 navigator.getUserMedia = navigator.getUserMedia || navigat<br \/>\nor.webkitGetUserMedia || navigator.mozGetUserMedia;<br \/>\n10 \/\/ PeerJS object<br \/>\n11 var peer = new Peer({ key: &#8216;geekfeed&#8217;, host: &#8216;\/&#8217;, port: 90<br \/>\n00, secure: false,debug: 3});<br \/>\n12 peer.on(&#8216;open&#8217;, function(){<br \/>\n13 $(&#8216;#my-id&#8217;).text(peer.id);<br \/>\n14 });<\/p>\n<p>\u30d6\u30ed\u30fc\u30ab\u30fc\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u81ea\u524d\u306e\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u52d5\u304b\u3057\u305f\u30d3\u30c7\u30aa\u30c1\u30e3\u30c3\u30c8\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/peerjs.opensourcedemo.biz\/index2.html\" target=\"_blank\">http:\/\/peerjs.opensourcedemo.biz\/index2.html<\/a><\/p>\n<p>\u3061\u3083\u3093\u3068\u30d6\u30ed\u30fc\u30ab\u30fc\u30b5\u30fc\u30d0\u30fc\u304b\u3089ID\u304c\u8fd4\u3055\u308c\u3066\u52d5\u3044\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3044\u304b\u304c\u3067\u3057\u305f\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u4eca\u56de\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u3057\u305f\u3053\u3068\u304c\u306a\u3044\u65b9\u306b\u3068\u3063\u3066\u306f\u624b\u9806\u7b49\u304c\u610f\u5473\u4e0d\u660e\u3060\u3063\u305f\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u4e00\u65b9\u3001\u958b\u767a\u306e\u65b9\u306b\u306f\u3001\u7d50\u69cb\u7c21\u5358\u306b\u5b9f\u88c5\u3067\u304d\u308b\u3093\u3060\u3068\u3044\u3046\u3053\u3068\u304c\u304a\u5206\u304b\u308a\u9802\u3051\u305f\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u79c1\u81ea\u8eab\u3082\u30b5\u30f3\u30d7\u30eb\u3092\u69cb\u7bc9\u3057\u3066\u307f\u308b\u307e\u3067\u306f\u3001\u306a\u3093\u3068\u306a\u304f\u6982\u5ff5\u7684\u306b\u7406\u89e3\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3057\u305f\u304c\u3001\u5b9f\u969b\u306b\u69cb\u7bc9\u3057\u3066\u307f\u3066\u3001\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u306a\u3069\u306b\u7c21\u5358\u306b\u8a2d\u7f6e\u3067\u304d\u308b\u306a\u3001<br \/>\n\u3068\u5b9f\u611f\u3057\u305f\u306e\u3067\u3057\u305f\u3002<\/p>\n<p>\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9 geek(\u5909\u4eba)\u5217\u4f1d \u30d0\u30c3\u30af\u30ca\u30f3\u30d0\u30fc<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u3046\u3061\u3067\u3059\u3002 \u6700\u8fd1\u3001\u300cWebRTC\u300d\u306b\u95a2\u3057\u3066\u76f8\u8ac7\u3092\u9802\u304f\u3053\u3068\u304c\u5897\u3048\u3066\u304d\u307e\u3057\u305f\u3002 \u79c1\u304c\u306f\u3058\u3081\u3066\u3053\u306e\u8a00\u8449\u3092\u805e\u3044\u305f\u306e\u306f\u30012\uff5e3\u5e74\u524d\u306e\u3053\u3068\u3060\u3063\u305f\u304b\u3068\u601d\u3044\u307e\u3059\u3002 \u305d\u306e\u6642\u306e\u79c1\u306f\u3001\u30b9\u30ab\u30a4\u30d7\u7b49\u306e\u5c02\u7528\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":926,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[17],"tags":[],"class_list":["post-965","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-geek"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.ilii.jp\/ili-zine\/wp-json\/wp\/v2\/posts\/965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ilii.jp\/ili-zine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ilii.jp\/ili-zine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ilii.jp\/ili-zine\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ilii.jp\/ili-zine\/wp-json\/wp\/v2\/comments?post=965"}],"version-history":[{"count":2,"href":"https:\/\/www.ilii.jp\/ili-zine\/wp-json\/wp\/v2\/posts\/965\/revisions"}],"predecessor-version":[{"id":967,"href":"https:\/\/www.ilii.jp\/ili-zine\/wp-json\/wp\/v2\/posts\/965\/revisions\/967"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ilii.jp\/ili-zine\/wp-json\/wp\/v2\/media\/926"}],"wp:attachment":[{"href":"https:\/\/www.ilii.jp\/ili-zine\/wp-json\/wp\/v2\/media?parent=965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ilii.jp\/ili-zine\/wp-json\/wp\/v2\/categories?post=965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ilii.jp\/ili-zine\/wp-json\/wp\/v2\/tags?post=965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}