summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2020-11-26 02:34:48 +0900
committerSeungha Yang <seungha@centricular.com>2020-12-07 20:40:50 +0900
commit9e83c09be6e25f755a8209b9747c35f7cc7d1278 (patch)
tree6c74b5f8484551579ef8f0e3dfcc52e2b705a147
parent753f14f5de06158a61fb840e3bf277d0aa5e9bd2 (diff)
sendrecv/js: Convert taps to spaces
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/28>
-rw-r--r--webrtc/sendrecv/js/webrtc.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/webrtc/sendrecv/js/webrtc.js b/webrtc/sendrecv/js/webrtc.js
index 471085e..c532e09 100644
--- a/webrtc/sendrecv/js/webrtc.js
+++ b/webrtc/sendrecv/js/webrtc.js
@@ -120,11 +120,11 @@ function onServerMessage(event) {
handleIncomingError(event.data);
return;
}
- if (event.data.startsWith("OFFER_REQUEST")) {
- // The peer wants us to set up and then send an offer
- if (!peer_connection)
- createCall(null).then (generateOffer);
- }
+ if (event.data.startsWith("OFFER_REQUEST")) {
+ // The peer wants us to set up and then send an offer
+ if (!peer_connection)
+ createCall(null).then (generateOffer);
+ }
else {
// Handle incoming JSON SDP and ICE messages
try {
@@ -149,7 +149,7 @@ function onServerMessage(event) {
} else {
handleIncomingError("Unknown incoming JSON: " + msg);
}
- }
+ }
}
}
@@ -302,13 +302,13 @@ function createCall(msg) {
}
peer_connection.onicecandidate = (event) => {
- // We have a candidate, send it to the remote party with the
- // same uuid
- if (event.candidate == null) {
- console.log("ICE Candidate was null, done");
- return;
- }
- ws_conn.send(JSON.stringify({'ice': event.candidate}));
+ // We have a candidate, send it to the remote party with the
+ // same uuid
+ if (event.candidate == null) {
+ console.log("ICE Candidate was null, done");
+ return;
+ }
+ ws_conn.send(JSON.stringify({'ice': event.candidate}));
};
if (msg != null)