How to use skyway-js - 2 common examples

To help you get started, we’ve selected a few skyway-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github weblio / webrtc-kun / src / js / script.es View on Github external
function initializePeersFirstCall() {
    // 受け側
    peer2 = new Peer(config);

    peer2
        .on("call", (call) => {
            call.answer(null, {
                audioBandwidth: AUDIO_BANDWIDTH, // max audio bandwidth (kbps)
                videoBandwidth: Number($("#videoBandwidth").val()), // max video bandwidth (kbps)
            });
            call
                .on("stream", (peerStream) => {
                    console.log("received stream");
                    // videoタグに設定
                    streamUrl = URL.createObjectURL(peerStream);
                    $("#video").attr("src", streamUrl);
                });
        });
    peer2
github weblio / webrtc-kun / src / js / script.es View on Github external
.on("open", (p2id) => {
            peer2id = p2id;

            // 送り側
            peer1 = new Peer(config);

            peer1
                .on("open", (p1id) => {
                    makeNewCall();
                });
        });
}

skyway-js

The official JavaScript SDK for SkyWay

Apache-2.0
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis

Popular skyway-js functions

Similar packages