Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

skyway/old-skyway-webrtc-handson-js

This branch is 1 commit ahead of alanmshelly/camphor-webrtc-handson:handson_step6.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

56d23a9 · Sep 9, 2016

History

25 Commits
Nov 24, 2014
Sep 9, 2016
Jul 8, 2015
Jul 8, 2015
Jul 8, 2015

Repository files navigation

NTTCom WebRTC Handson Step 6

// openイベントのハンドラ
peer.on('open', function(id) {
    myPeerid = id;
    console.log('My peer ID is: ' + id);

    // カメラ映像を取得して表示する
    navigator.getUserMedia({
        audio: true,
        video: true
    }, function(stream){
        $('#myStream').prop('src', URL.createObjectURL(stream));
        myStream = stream;
    }, function(){
        console.error('getUserMedia error');
    });
});

// ユーザリストを取得して片っ端から繋ぐ
function connectToPeers() {
    peer.listAllPeers(function(list){
        for(var cnt = 0;cnt < list.length;cnt++){
            if(myPeerid != list[cnt]){
            var call = peer.call(list[cnt],myStream);
            setupCallEventHandlers(call);
                addCall(call);
            }
        }
    });
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 47.1%
  • JavaScript 30.0%
  • HTML 22.9%