// 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);
}
}
});
}
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.
forked from alanmshelly/camphor-webrtc-handson
-
Notifications
You must be signed in to change notification settings - Fork 3
skyway/old-skyway-webrtc-handson-js
This branch is 1 commit ahead of alanmshelly/camphor-webrtc-handson:handson_step6.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- CSS 47.1%
- JavaScript 30.0%
- HTML 22.9%