WebRTC ビデオ通話
:LiTarget: 用途
P2Pビデオ通話。Daily.co / Twilio / 自前WebRTC。
:LiSparkle: 特徴
- ビデオ/音声
- 画面共有
- 複数人対応
- チャット
:LiCode: コード(コピペ用)
import DailyIframe from '@daily-co/daily-js';
const callFrame = DailyIframe.createFrame({
showLeaveButton: true,
iframeStyle: { position: 'fixed', width: '100%', height: '100%', top: 0, left: 0 },
});
await callFrame.join({ url: 'https://your-domain.daily.co/room-id' });
callFrame.on('participant-joined', (e) => console.log('Joined:', e.participant.user_name));
callFrame.on('left-meeting', () => callFrame.destroy());
:LiHandPointer: 使い方
対象プロジェクトに該当ファイルをコピーして、props を流し込むだけ。
:LiAlertCircle: 注意事項
- 依存パッケージを忘れず追加