@uniai-fe/util-rtc
v0.1.0
Published
WebRTC utilities for UNIAI FE projects
Readme
@uniai-fe/util-rtc
WebRTC 기반 스트리밍을 단일 모듈로 다룰 수 있도록 정리한 유틸 패키지입니다.
WHEP( WebRTC-HTTP Egress Protocol ) 시나리오를 우선 지원하며, 추가적인 프로토콜에 맞춰 확장할 수 있도록 가볍게 구성했습니다.
설치
pnpm add @uniai-fe/util-rtc사용 예시
import { startWhepStream } from "@uniai-fe/util-rtc";
const teardown = await startWhepStream({
endpoint: "https://site.rtc.uniai.co.kr/cam-id/whep",
token: "issued-token",
video: document.querySelector("video")!,
});
// 스트리밍 종료
teardown.close();스크립트
| 명령어 | 설명 |
| ---------------- | ---------------------- |
| pnpm lint | ESLint 검사 |
| pnpm typecheck | TypeScript 타입 검사 |
| pnpm build | d.ts 생성 및 번들 출력 |
라이선스
MIT
