Upgrade to Pro — share decks privately, control downloads, hide ads and more …

オンライン英会話とSkyWay

taminif
January 15, 2018

 オンライン英会話とSkyWay

taminif

January 15, 2018
Tweet

More Decks by taminif

Other Decks in Programming

Transcript

  1. ϏσΦνϟοτ෦෼ peer2 .on("open", (p2id) => { peer2id = p2id; //

    ૹΓଆ peer1 = new Peer(config); peer1 .on("open", (p1id) => { makeNewCall(); }); }); ͜ͷ1FFS͸ TLZXBZKTΛ JNQPSUͨ͠΋ͷ ࣍ϖʔδ
  2. ϏσΦνϟοτ෦෼ function makeNewCall() { const constraints = getConstraints(); getUserMedia(constraints) .then((myStream)

    => { console.log("created"); // طଘΦϒδΣΫτΛഁغ if (call !== null) { call.close(); call = null; } if (streamUrl !== null) { URL.revokeObjectURL(streamUrl); streamUrl = null; } console.log("sending stream..."); call = peer1.call(peer2id, myStream, { audioBandwidth: AUDIO_BANDWIDTH, // max audio bandwidth (kbps) videoBandwidth: Number($("#videoBandwidth").val()), // max video bandwidth (kbps) }); }) .catch(errorHandler); } 4USFBNΛऔಘ͠ 1SPNJTFΛฦ͢ औಘͨ͠4USFBNΛDBMM͠ ૬खʹૹ৴