0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

メモ:WebRTCのエコーアプリを自作してgetStats()してみた

0
Posted at

WebRTCのエコーアプリを実装して動きを確認したのでメモ

設計概要

PC/スマホ両対応のWebRTCテストアプリ(エコーするだけ)のアプリを実装

フロントエンド

PC/スマホ両対応するためWebアプリとした。Reactで実装し、Firebaseにホスティングした
ほかの人に使われないようFirebase Authenticationを使い、ID作成済みのユーザー以外使えないようにした
UIは以下のような形となった
image.png

バックエンド

WebRTCによる音声通信がインターネットをまたぐため、暗号化+UDPポートを利用するため、GCP上にGCEで仮想マシンを構築した
外向きの部分は、グローバルIPを確保し、Let's Encryptで証明書を取得、nginxをプロキシとして動作させた
WebRTCサーバ側はPythonで構築し、Uvicorn+FastAPI+aiortcを使うこととした
バックエンドは外部から叩かれないよう、Firebase Admin SDKを利用して、Firebase Authenticationで発行したTokenをVerifyするようにした。

感想

ネットワークプロトコルとクラウドインフラの両方の勉強になってよかった

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?