surflion-service 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/surflion.js +14 -0
package/package.json
CHANGED
package/surflion.js
CHANGED
|
@@ -1476,6 +1476,7 @@ var SurfLion = {
|
|
|
1476
1476
|
SurfLion.eventHandlers.registered_expiring(data)
|
|
1477
1477
|
});
|
|
1478
1478
|
SurfLion.userAgent.on('newRTCSession', function (data) {
|
|
1479
|
+
console.log('data', data)
|
|
1479
1480
|
if (data.originator == 'remote') {
|
|
1480
1481
|
if (!SurfLion.canIncoming){
|
|
1481
1482
|
return
|
|
@@ -1532,6 +1533,19 @@ var SurfLion = {
|
|
|
1532
1533
|
console.info('onSDP, type - ', data.type, ' sdp - ', data.sdp);
|
|
1533
1534
|
}
|
|
1534
1535
|
});
|
|
1536
|
+
|
|
1537
|
+
data.session.on('peerconnection', function (e) {
|
|
1538
|
+
console.log('peer connection');
|
|
1539
|
+
|
|
1540
|
+
e.peerconnection.addEventListener('track', function(event) {
|
|
1541
|
+
console.log('onaddstream');
|
|
1542
|
+
SurfLion.ringtoneStream.loop = false;
|
|
1543
|
+
SurfLion.ringtoneStream.src = null
|
|
1544
|
+
SurfLion.ringtoneStream.srcObject = event.streams[0];
|
|
1545
|
+
SurfLion.ringtoneStream.srcObject.play();
|
|
1546
|
+
});
|
|
1547
|
+
});
|
|
1548
|
+
|
|
1535
1549
|
data.session.on('progress', function (data) {
|
|
1536
1550
|
});
|
|
1537
1551
|
});
|