Closed jonasmedeiros closed 8 years ago
Test is using Opera browser, sometimes safari sometimes firefox, I use temasys plugin for safari.
<script src="https://cdn.temasys.com.sg/adapterjs/0.11.x/adapter.debug.js"></script>
<script src="https://cdn.temasys.com.sg/skylink/skylinkjs/0.6.12/skylink.complete.min.js"></script>
skylink = new Skylink();
//Temasys Adapter for Not native WebRTC browsers
AdapterJS.webRTCReady(function() {
skylink.init('free_account');
skylink.joinRoom('room-4', {
userData:'somename',
audio: true,
video: true
});
});
Hi @gunsline2,
Based on your code above, it seems like you re-referencing AdapterJS which the bundled script of SkylinkJS skylink.complete.js
does that already. The bundled version contains the AdapterJS and socket.io-client dependency it requires and follows. It's only the skylink.debug.js
script where you require to reference both the AdapterJS and socket.io-client dependencies.
SkylinkJS 0.6.12
uses AdapterJS 0.13.3
as a heads up.
Additionally, SkylinkJS init()
function already takes care of the AdapterJS.webRTCReady
part so you don't have to call the method.
Here's how it should be for an example:
<script src="https://cdn.temasys.com.sg/skylink/skylinkjs/0.6.12/skylink.complete.min.js"></script>
var skylink = new Skylink();
skylink.init('free_account', function (err, success) {
if (err) return;
skylink.joinRoom('room-4', {
userData:'somename',
audio: true,
video: true
});
});
You can try the getaroom.io demo which currently uses SkylinkJS version 0.6.12
.
Btw, we have an article on how to setup SkylinkJS which may be useful for you https://temasys.com.sg/getting-started-with-webrtc-and-skylinkjs/
Hi @gunsline2, did you managed to resolve your issue?
Hi @gunsline2, I assume you have resolved your issue since following up this issue #231. If that is so, I would close this ticket.
Hi @letchoo Yes was the version thanks
Thanks! I'll close this ticket then.
So the $(document).ready() function is not needed, for the JS code, right? I always face this issue where the skylink.min.js script is not found at all. Any help would be appreciated. Thanks.
Hi @ApurvaKunkulol, this seems to be your app key configuration. Note that 404 is directed to the platform server URL. Check the CORS url field configuration on your app key.
@letchoo Thanks for the prompt reply. I have defined my CORS url as below:
localhost,polls_1 Is this how it should be defined. I am just trying out the Web SDK of Temasys, hence the localhost. Please point out any mistake that might have been made. Thanks.
@ApurvaKunkulol are you connecting from https://localhost/
or https://polls_1
? If you are for example am connecting from https://www.app.com
or https://192.168.1.5
(CORS URL app.com,192.168.1.5
).
@letchoo I am connecting from localhost. Example URL: http://localhost:8000/polls_1/ In this case how should it be specified?
@ApurvaKunkulol localhost
is required only. /polls_1
is the path, :8000
is the port and http://
is the protocol. A recommendation is just the domain name itself that is required.
That clears a lot. Thanks.
Also I have another question, in the skylink.init() function, which one should be included
the "KEYID" or the "secret"
in the "apikey" part as shown below:
skylink.init({ apiKey:"xxxxxxxx", defaultRoom: "Apurva's Chat room." }, function(){ skylink.joinRoom({ audio: true, video: true }); });
@ApurvaKunkulol "KEYID" (app key ID) is for the appKey
(or the older format apiKey
) you configure in the init()
method. The "secret" is used for generating a hash (which we recommend from the web server end) which can be used to authenticate the platform usage instead of using CORS domain authentication. The init()
method API doc should contain the segment on how the hash is generated.
So this essentially means that I will have to use the "KEYID", in my app, right?
@ApurvaKunkulol yes you will still require it for whatever authentication methods.
Thanks a ton for taking out the time @letchoo , I highly appreciate that. I can see my own face in the browser now!! 😄
Look the error, I have the same code runing with simplewebrtc working fine.
adapter.min.js:2 Uncaught NotSupportedError: Failed to execute 'createOffer' on 'RTCPeerConnection': Unsatisfiable constraint iceRestartwebkitRTCPeerConnection.(anonymous function) @ adapter.min.js:2(anonymous function) @ skylink.min.js:4checkMediaDataChannelSettings @ adapter.min.js:2Skylink._doOffer @ skylink.min.js:4Skylink._addPeer @ skylink.min.js:3Skylink._welcomeHandler @ skylink.min.js:6Skylink._processSingleMessage @ skylink.min.js:5Skylink._processSigMessage @ skylink.min.js:5(anonymous function) @ skylink.min.js:5Emitter.emit @ skylink.complete.min.js:2Socket.onevent @ skylink.complete.min.js:2Socket.onpacket @ skylink.complete.min.js:2(anonymous function) @ skylink.complete.min.js:2Emitter.emit @ skylink.complete.min.js:2Manager.ondecoded @ skylink.complete.min.js:2(anonymous function) @ skylink.complete.min.js:2Emitter.emit @ skylink.complete.min.js:2Decoder.add @ skylink.complete.min.js:4Manager.ondata @ skylink.complete.min.js:2(anonymous function) @ skylink.complete.min.js:2Emitter.emit @ skylink.complete.min.js:2Socket.onPacket @ skylink.complete.min.js:2(anonymous function) @ skylink.complete.min.js:2Emitter.emit @ skylink.complete.min.js:2Transport.onPacket @ skylink.complete.min.js:2Transport.onData @ skylink.complete.min.js:2ws.onmessage @ skylink.complete.min.js:3