项目作者: Imporial

项目描述 :
基于 Signalr 的 WebRTC 包
高级语言: JavaScript
项目地址: git://github.com/Imporial/WebRTC_SignalR.git
创建时间: 2014-04-02T10:25:30Z
项目社区:https://github.com/Imporial/WebRTC_SignalR

开源协议:Apache License 2.0

下载


基于 Signalr 的 WebRTC 包

使用方法

创建会话房间

  1. var localStream;
  2. $(document).ready(function () {
  3. getUserMedia({ audio: false, video: true },
  4. gotStream, function () { });
  5. })
  6. function start() {
  7. var webRtc = WebRTC.createRoom(房间名, localStream, function () { })
  8. }
  9. function gotStream(stream) {
  10. attachMediaStream(显示元素, stream);
  11. localStream = stream;
  12. }

==========
加入会话房间

  1. var webRtc;
  2. function call() {
  3. webRtc = WebRTC.joinRoom(用户名, 房间名, gotRemoteStream1);
  4. }
  5. function gotRemoteStream1(e) {
  6. attachMediaStream(显示元素, e.stream);
  7. }