💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] > [github](https://github.com/henrikjoreteg/SimpleWebRTC) ## 概述 1. Create our WebRTC object ``` var webrtc = new SimpleWebRTC({ // the id/element dom element that will hold "our" video localVideoEl: 'localVideo', // the id/element dom element that will hold remote videos remoteVideosEl: 'remoteVideos', // immediately ask for camera access autoRequestMedia: true }); ``` 2. Tell it to join a room when ready ``` // we have to wait until it's ready webrtc.on('readyToCall', function () { // you can name it anything webrtc.joinRoom('your awesome room name'); }); ```