muaz-khan / RTCMultiConnection-Server

RTCMultiConnection socket.io server (npm install rtcmulticonnection-server)
https://muazkhan.com:9001/
MIT License
274 stars 146 forks source link

server does not work following the simple example #9

Open mikkokotila opened 5 years ago

mikkokotila commented 5 years ago

Following the installation instructions in https://github.com/muaz-khan/RTCMultiConnection-Server/wiki#install-using-npm and then trying to run the simple demo:

<script src="https://rtcmulticonnection.herokuapp.com/dist/RTCMultiConnection.min.js"></script>
<script src="https://rtcmulticonnection.herokuapp.com/socket.io/socket.io.js"></script>

<script>
var connection = new RTCMultiConnection();

// this line is VERY_important
connection.socketURL = 'http://localhost:9001/';

// if you want audio+video conferencing
connection.session = {
    audio: true,
    video: true
};

connection.openOrJoin('test');
</script>

...does not work.

FifineHex commented 5 years ago

try this

<script src="https://rtcmulticonnection.herokuapp.com/dist/RTCMultiConnection.min.js"></script>
<script src="https://rtcmulticonnection.herokuapp.com/node_modules/webrtc-adapter/out/adapter.js"></script>
<script src="https://rtcmulticonnection.herokuapp.com/socket.io/socket.io.js"></script>

<script>
var connection = new RTCMultiConnection();

// this line is VERY_important
connection.socketURL = 'http://localhost:9001/';

// if you want audio+video conferencing
connection.session = {
        audio: true,
        video: false
    };
    connection.mediaConstraints = {
        audio: true,
        video: false
    };
    connection.sdpConstraints.mandatory = {
        OfferToReceiveAudio: true,
        OfferToReceiveVideo: false
    };
connection.openOrJoin('testroom');
</script>
wanaideed commented 2 years ago

https://medium.com/@aideedprogrammer/video-broadcast-webrtc-using-ionic-apps-14affc0a8369