{"id":11305,"date":"2023-12-19T13:46:21","date_gmt":"2023-12-19T04:46:21","guid":{"rendered":"https:\/\/www.ecomottblog.com\/?p=11305"},"modified":"2023-12-19T13:46:21","modified_gmt":"2023-12-19T04:46:21","slug":"%ef%bc%8alivekit%ef%bc%8a%e7%84%a1%e6%96%99%e3%81%a7%e3%83%93%e3%83%87%e3%82%aa%e9%80%9a%e8%a9%b1%e3%81%8c%e3%81%a7%e3%81%8d%e3%82%8b%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%82%92%e6%a7%8b%e7%af%89","status":"publish","type":"post","link":"https:\/\/www.ecomottblog.com\/?p=11305","title":{"rendered":"\uff0aLiveKit\uff0a\u7121\u6599\u3067\u30d3\u30c7\u30aa\u901a\u8a71\u304c\u3067\u304d\u308b\u30b5\u30fc\u30d0\u30fc\u3092\u69cb\u7bc9"},"content":{"rendered":"<p>G\u30ea\u30dd\u30fc\u30c8\u306e\u958b\u767a\u3092\u62c5\u5f53\u3057\u3066\u3044\u308b\u8d99\u3067\u3059\u3002<\/p>\n<p>\u30d3\u30c7\u30aa\u901a\u8a71\u3092\u3059\u308b\u305f\u3081\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u5927\u5909\u3060\u3068\u601d\u308f\u308c\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001<\/p>\n<p>oss\u3092\u8abf\u3079\u3066\u307f\u305f\u3089\u3001\u610f\u5916\u3068\u7c21\u5358\u306bSFU\u30b5\u30fc\u30d0\u30fc\u3092\u5efa\u3066\u308b\u3053\u3068\u304c\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u4eca\u56de\u5229\u7528\u3059\u308b\u306e\u306f\u3001<a href=\"https:\/\/docs.livekit.io\/realtime\/\">LiveKit<\/a><\/p>\n<blockquote><p><a class=\"chakra-link css-1r17tiu\" href=\"https:\/\/livekit.io\/\" target=\"_blank\" rel=\"noopener\">LiveKit<\/a>&nbsp;is an open source WebRTC stack that gives you everything needed to build scalable and real-time video, audio, and data experiences in your applications.<\/p><\/blockquote>\n<ul>\n<li><strong>\u6620\u50cf\u3001\u97f3\u58f0\u3001\u30c7\u30fc\u30bf\u306e\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u306e\u3084\u308a\u53d6\u308a\u304c\u53ef\u80fd<\/strong><\/li>\n<li><strong>TURN\u6a5f\u80fd\u3092\u5185\u8535<\/strong><\/li>\n<li><strong>SDK\u304c\u8c4a\u5bcc<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11361\" src=\"https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-101013.jpg\" alt=\"\" width=\"579\" height=\"234\" srcset=\"https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-101013.jpg 579w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-101013-300x121.jpg 300w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-101013-304x123.jpg 304w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-101013-282x114.jpg 282w\" sizes=\"(max-width: 579px) 100vw, 579px\" \/><\/p>\n<p>\u52d5\u4f5c\u78ba\u8a8d\u3082\u542b\u3081\u3066\u624b\u9806\u3092\u6b8b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<h3>\u5b9f\u884c\u74b0\u5883<\/h3>\n<p>\u30ed\u30fc\u30ab\u30eb\u3067\u3082\u52d5\u304b\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u4eca\u56de\u306f<\/p>\n<p>AWS\u4e0a\u306b\u30b5\u30fc\u30d0\u30fc\u3092\u5efa\u3066\u3066\u3001\u305d\u3061\u3089\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u52d5\u4f5c\u3092\u78ba\u8a8d\u3057\u307e\u3059<\/p>\n<p>os: <strong>Ubuntu 22.04.3 LTS<\/strong><\/p>\n<p>\u30fbElastic IP\u3092\u7d10\u3065\u3044\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u30fb\u30dd\u30fc\u30c8\u3092\u958b\u3051\u308b\u3001<a href=\"https:\/\/docs.livekit.io\/realtime\/self-hosting\/ports-firewall\/\">\u5229\u7528\u30dd\u30fc\u30c8\u4e00\u89a7<\/a><\/p>\n<h3>LiveKit\u5c0e\u5165<\/h3>\n<p>\u516c\u5f0fGit\u306f<a href=\"https:\/\/github.com\/livekit\/livekit\">\u3053\u3061\u3089<\/a><\/p>\n<p><strong>\u30fbLiveKit\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/p>\n<pre class=\"lang:default decode:true\">curl -sSL https:\/\/get.livekit.io | bash<\/pre>\n<p><strong>\u30fb<a class=\"color-fg-default\" href=\"https:\/\/github.com\/livekit\/livekit-cli\">livekit-cli<\/a>\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/p>\n<pre class=\"lang:default decode:true\">curl -sSL https:\/\/get.livekit.io\/cli | bash<\/pre>\n<p><strong>\u30fb\u958b\u767a\u30e2\u30fc\u30c9\u3067\u8d77\u52d5<\/strong><\/p>\n<pre class=\"lang:default decode:true\">livekit-server --dev --bind 0.0.0.0<\/pre>\n<h3>\u52d5\u4f5c\u78ba\u8a8d<\/h3>\n<p><strong>\u30fb\u30ed\u30fc\u30ab\u30ebpc\u304b\u3089\u30c6\u30b9\u30c8\u7528\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u7acb\u3061\u4e0a\u3052\u308b<\/strong><\/p>\n<pre class=\"lang:default decode:true \">git clone https:\/\/github.com\/livekit\/client-sdk-js\ncd client-sdk-js\/example\nnpm install\nnpm run sample<\/pre>\n<p>\u30d6\u30e9\u30a6\u30b6\u304c\u81ea\u52d5\u3067\u7acb\u3061\u4e0a\u304c\u308a\u3001\u4e0b\u8a18\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11366\" src=\"https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-133652.jpg\" alt=\"\" width=\"1271\" height=\"662\" srcset=\"https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-133652.jpg 1271w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-133652-300x156.jpg 300w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-133652-768x400.jpg 768w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-133652-1024x533.jpg 1024w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-133652-304x158.jpg 304w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-133652-282x147.jpg 282w\" sizes=\"(max-width: 1271px) 100vw, 1271px\" \/><\/p>\n<p>\u30fb<strong>Token<\/strong>\u767a\u884c<\/p>\n<p>\u30b5\u30fc\u30d0\u30fc\u304b\u3089<\/p>\n<pre class=\"lang:default decode:true \">livekit-cli create-token \\\n    --api-key devkey --api-secret secret \\\n    --join --room my-first-room --identity user1 \\\n    --valid-for 24h<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306bToken\u304c\u767a\u884c\u3055\u308c\u308b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11367\" src=\"https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-143612.jpg\" alt=\"\" width=\"1347\" height=\"38\" srcset=\"https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-143612.jpg 1347w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-143612-300x8.jpg 300w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-143612-768x22.jpg 768w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-143612-1024x29.jpg 1024w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-143612-304x9.jpg 304w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-143612-282x8.jpg 282w\" sizes=\"(max-width: 1347px) 100vw, 1347px\" \/><\/p>\n<p>\u767a\u884c\u3055\u308c\u305fToken\u3092web\u753b\u9762\u306e\u300cToken\u300d\u6b04\u306b\u5165\u529b<\/p>\n<p><strong>\u30fb\u7e4b\u3044\u3067\u307f\u308b<\/strong><\/p>\n<p>\u300cLiveKit URL\u300d\u6b04\u306b\u300cws:\/\/\uff5b<strong>\u30b5\u30fc\u30d0\u30fc\u306eElastic IP<\/strong>\uff5d:7880\u300d\u3092\u5165\u308c\u308b<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11369\" src=\"https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-144822.jpg\" alt=\"\" width=\"759\" height=\"371\" srcset=\"https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-144822.jpg 759w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-144822-300x147.jpg 300w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-144822-304x149.jpg 304w, https:\/\/www.ecomottblog.com\/wp-content\/uploads\/2023\/12\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-12-13-144822-282x138.jpg 282w\" sizes=\"(max-width: 759px) 100vw, 759px\" \/><\/p>\n<p>\u300c<strong>Connect<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059<\/p>\n<p>\u7e4b\u304c\u308b\u3068\u30ab\u30e1\u30e9\u6620\u50cf\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<p>\u753b\u9762\u4e0b\u306e\u30ed\u30b0\u304b\u3089\u3082\u78ba\u8a8d\u3067\u304d\u308b<\/p>\n<pre class=\"lang:default decode:true \">participant user1 connected  \ntracks published in 3508ms \nconnection quality changed user1 excellent<\/pre>\n<p>\u30fb<strong>\u540c\u3058\u624b\u9806\u30672\u53f0\u76ee\u30013\u53f0\u76ee\u3092\u7e4b\u3044\u3067\u78ba\u8a8d<\/strong><\/p>\n<h3>\u672c\u756a\u904b\u7528\u306e\u305f\u3081\u306b\u306f<\/h3>\n<p>\u30fb\u30c9\u30e1\u30a4\u30f3\u3092\u7528\u610f<\/p>\n<p>\u30fbSSL\u8a3c\u660e\u66f8\u8a2d\u5b9a<\/p>\n<p>\u30fbTURN\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001\u305d\u308c\u7528\u306e\u30c9\u30e1\u30a4\u30f3\u3068SSL\u8a2d\u5b9a\u304c\u5fc5\u8981<\/p>\n<p>\u8aac\u660e\u306f\u5272\u611b\u3057\u307e\u3059\u3001\u8a73\u7d30\u306f<a href=\"https:\/\/docs.livekit.io\/realtime\/self-hosting\/deployment\/\">\u3053\u3061\u3089<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u7d42\u308f\u308a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>G\u30ea\u30dd\u30fc\u30c8\u306e\u958b\u767a\u3092\u62c5\u5f53\u3057\u3066\u3044\u308b\u8d99\u3067\u3059\u3002 \u30d3\u30c7\u30aa\u901a\u8a71\u3092\u3059\u308b\u305f\u3081\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u5927\u5909\u3060\u3068\u601d\u308f\u308c\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001 oss\u3092\u8abf\u3079\u3066\u307f\u305f\u3089\u3001\u610f\u5916\u3068\u7c21\u5358\u306bSFU\u30b5\u30fc\u30d0\u30fc\u3092\u5efa\u3066\u308b\u3053\u3068\u304c\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":106,"featured_media":11352,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,99],"tags":[162],"_links":{"self":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/11305"}],"collection":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/users\/106"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11305"}],"version-history":[{"count":28,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/11305\/revisions"}],"predecessor-version":[{"id":11386,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/11305\/revisions\/11386"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/media\/11352"}],"wp:attachment":[{"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}