Skip to content

Commit fde23fc

Browse files
Add files via upload
1 parent c302419 commit fde23fc

File tree

5 files changed

+3
-7
lines changed

5 files changed

+3
-7
lines changed

EaseRTC.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class EaseRTC {
2020
this.pc.addIceCandidate(new RTCIceCandidate(JSON.parse(iceCandidate)));
2121
}
2222
addTrack(track) {
23-
console.log(track)
2423
return new Promise(async(res, rej)=>{
2524
const sender = this.pc.addTrack(track);
2625
res(sender)
@@ -57,7 +56,6 @@ class EaseRTC {
5756
createAnswer(offer = new RTCSessionDescription()) {
5857
return new Promise(async (res, rej) => {
5958
this.pc.ondatachannel = (e) => {
60-
console.log(e);
6159
if (e.channel.label == "EaseRTCReconnectionChannel") {
6260
this.EaseRTCReconnectionChannel = e.channel;
6361
this.EaseRTCReconnectionChannel.onmessage = (e) => {
@@ -76,7 +74,7 @@ class EaseRTC {
7674
try {
7775
await this.pc.setRemoteDescription(new RTCSessionDescription(JSON.parse(offer)));
7876
} catch (error) {
79-
console.log("Error while setting offer SDP", error)
77+
rej("Error while setting offer SDP", error)
8078
}
8179
try {
8280
await this.pc.createAnswer(this.answerOptions).then(async answer => {

answer.css

+1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ body,html{
3535
border-radius: 50px;
3636
background-color: #008eff;
3737
color: #ffffff;
38+
cursor: pointer;
3839
}

answer.js

-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ RTC.onTrack = (e) => {
3636
setInterval(() => {
3737
const SDP = localStorage.getItem("offerSDP");
3838
if (SDP) {
39-
console.log(SDP)
4039
//setting offer and creating answer
4140
RTC.createAnswer(SDP).then(e => {
4241
localStorage.setItem("answerSDP", e)
@@ -45,7 +44,6 @@ setInterval(() => {
4544
}
4645
const ICE = localStorage.getItem("offerIce");
4746
if (ICE) {
48-
console.log(ICE)
4947
//setting ICE
5048
RTC.addIce(ICE)
5149
localStorage.removeItem("offerIce");

offer.css

+1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ body,html{
3535
border-radius: 50px;
3636
background-color: #008eff;
3737
color: #ffffff;
38+
cursor: pointer;
3839
}

offer.js

-2
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ RTC.createOffer().then(e => {
4040
setInterval(() => {
4141
const SDP = localStorage.getItem("answerSDP");
4242
if (SDP) {
43-
console.log(SDP)
4443
//setting answer SDP
4544
RTC.acceptAnswer(SDP)
4645
localStorage.removeItem("answerSDP");
4746
}
4847
const ICE = localStorage.getItem("answerIce");
4948
if (ICE) {
50-
console.log(ICE)
5149
//setting ICE
5250
RTC.addIce(ICE)
5351
localStorage.removeItem("answerIce");

0 commit comments

Comments
 (0)