mirror of
https://api.glitch.com/git/yaswvc
synced 2026-01-12 17:28:11 +00:00
Compare commits
No commits in common. "62a2a001add06c9c74a6320e8dc98bb44b889af9" and "6ace8df5d44ecb1ba343589d848c485208d235b2" have entirely different histories.
62a2a001ad
...
6ace8df5d4
2 changed files with 10 additions and 26 deletions
|
|
@ -92,19 +92,7 @@
|
|||
<button class="btn btn-sm btn-danger" v-on:click="hangUp()">
|
||||
Disconnect
|
||||
</button>
|
||||
<hr>
|
||||
<div class="messages mt-1" style="min-height:30px;border:1px solid lightgrey;border-radius:.25rem;"></div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-10">
|
||||
<input type="text" v-model="chatInput" class="form-control">
|
||||
</div>
|
||||
<div class="col-12 col-sm-2">
|
||||
<div class="btn btn-primary float-right" v-on:click="sendMessage()">
|
||||
Send
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="messages"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,10 +13,16 @@ var app = new Vue({
|
|||
{ urls: 'stun:stun.sipnet.net:3478' },
|
||||
{ urls: 'stun:stun.ideasip.com:3478' },
|
||||
{ urls: 'stun:stun.iptel.org:3478' },
|
||||
{ urls: 'turn:numb.viagenie.ca', username: 'imvasanthv@gmail.com', credential: 'd0ntuseme' },
|
||||
{
|
||||
urls: 'turn:161.35.211.133:3478',
|
||||
username: 'guest',
|
||||
credential: 'somepassword'
|
||||
urls: [
|
||||
'turn:173.194.72.127:19305?transport=udp',
|
||||
'turn:[2404:6800:4008:C01::7F]:19305?transport=udp',
|
||||
'turn:173.194.72.127:443?transport=tcp',
|
||||
'turn:[2404:6800:4008:C01::7F]:443?transport=tcp'
|
||||
],
|
||||
username: 'CKjCuLwFEgahxNRjuTAYzc/s6OMT',
|
||||
credential: 'u1SQDR/SQsPQIxXNWQT7czc/G4c='
|
||||
}
|
||||
],
|
||||
'sdpSemantics': 'unified-plan',
|
||||
|
|
@ -26,7 +32,6 @@ var app = new Vue({
|
|||
stream: null,
|
||||
calls: [],
|
||||
connections: [],
|
||||
chatInput: '',
|
||||
},
|
||||
methods: {
|
||||
logMessage: function(message) {
|
||||
|
|
@ -76,21 +81,12 @@ var app = new Vue({
|
|||
},
|
||||
hangUp: function() {
|
||||
this.calls.forEach(c => {
|
||||
console.log('hangUp - closing', c);
|
||||
c.close();
|
||||
});
|
||||
this.connections.forEach(c => {
|
||||
console.log('hangUp - closing', c);
|
||||
c.close();
|
||||
});
|
||||
},
|
||||
sendMessage: function(text = this.chatInput) {
|
||||
this.connections.forEach(c => {
|
||||
c.send(text);
|
||||
this.logMessage(`Me: ${text}`);
|
||||
this.chatInput = '';
|
||||
});
|
||||
},
|
||||
listenForPeerEvents: function () {
|
||||
this.peer.on('open', (id) => {
|
||||
localStorage.setItem('yaswvc-peerId', id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue