Skip to content

Commit

Permalink
chore(video, spaces): remove console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
madhur-push committed Dec 14, 2023
1 parent 6189b8e commit bff51a3
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 117 deletions.
7 changes: 0 additions & 7 deletions packages/restapi/src/lib/space/acceptPromotionRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ export async function acceptPromotionRequest(
) {
const { signalData, promoteeAddress, spaceId, role } = options || {};

console.log(
'acceptPromotionRequest options',
options,
'local stream',
this.data.local.stream
);

await addSpeakers({
spaceId: this.spaceSpecificData.spaceId,
signer: this.signer,
Expand Down
2 changes: 0 additions & 2 deletions packages/restapi/src/lib/space/broadcastRaisedHand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export async function broadcastRaisedHand(
) {
const { promoteeAddress } = options || {};

console.log('BROADCAST RAISE HAND', options);

// update live space info
const updatedLiveSpaceData = produce(
this.spaceSpecificData.liveSpaceData,
Expand Down
12 changes: 0 additions & 12 deletions packages/restapi/src/lib/space/join.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ export async function join(this: Space) {
}
});

console.log(
'ISSPEAKER',
isSpeaker,
'isListner',
isListner,
'isSpeakerPending',
isSpeakerPending
);

const hostAddress = getPlainAddress(space.spaceCreator);
const incomingIndex = getIncomingIndexFromAddress(
this.data.incoming,
Expand All @@ -69,7 +60,6 @@ export async function join(this: Space) {

// if speaker is pending then approve first or if listner is pending/not found then approve first
if (!isSpeaker && !isListner) {
console.log('CALLING APPROVE');
await approve({
signer: this.signer,
pgpPrivateKey: this.pgpPrivateKey,
Expand All @@ -80,7 +70,6 @@ export async function join(this: Space) {

if (isSpeaker || isSpeakerPending) {
// Call the host and join the mesh connection
console.log('CALLING REQUEST');
await this.request({
senderAddress: this.data.local.address,
recipientAddress: hostAddress,
Expand All @@ -96,7 +85,6 @@ export async function join(this: Space) {
spaceId: this.spaceSpecificData.spaceId,
env: this.env,
});
console.log('UPDATED SPACE', updatedSpace);
// update space specific data
this.setSpaceSpecificData(() => ({
...updatedSpace,
Expand Down
2 changes: 0 additions & 2 deletions packages/restapi/src/lib/space/onJoinListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export interface OnJoinListenerType {
export async function onJoinListener(this: Space, options: OnJoinListenerType) {
const { receivedAddress } = options || {};

console.log('JOIN LISTENER CALLED', 'receivedAddress', receivedAddress);

// method should be called only by the host
if (
pCAIP10ToWallet(this.spaceSpecificData.spaceCreator) !==
Expand Down
4 changes: 0 additions & 4 deletions packages/restapi/src/lib/space/onReceiveMetaMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export function onReceiveMetaMessage(
) {
const { receivedMetaMessage } = options || {};

console.log('ONRECEIVEMETAMESSAGE', receivedMetaMessage);

if (
receivedMetaMessage.messageType !== MessageType.META ||
typeof receivedMetaMessage.messageObj !== 'object' ||
Expand All @@ -28,8 +26,6 @@ export function onReceiveMetaMessage(
receivedMetaMessage.messageObj as Omit<InfoMessage, 'type'>
).info.arbitrary as LiveSpaceData;

console.log('RECEIVED LIVE SPACE DATA', receivedLiveSpaceData);

this.setSpaceSpecificData(() => ({
...this.spaceSpecificData,
liveSpaceData: receivedLiveSpaceData,
Expand Down
2 changes: 0 additions & 2 deletions packages/restapi/src/lib/space/requestToBePromoted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export async function requestToBePromoted(
) {
const { role, promotorAddress } = options || {};

console.log("requestToBePromoted", options);

// requesting host to include local computer into the mesh connection
this.request({
senderAddress: this.data.local.address,
Expand Down
6 changes: 0 additions & 6 deletions packages/restapi/src/lib/space/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,14 @@ export async function start(this: Space): Promise<void> {

// const { streamKey, playbackId } = responseData;

// console.log('livepeer details', streamKey, playbackId);

// this.update({ meta: playbackId });

// let redirectUrl;
// try {
// console.log('Ignore the following error');

// // the redirect URL from the above GET request
// await axios.get(`https://livepeer.studio/webrtc/${streamKey}`);
// } catch (err: any) {
// console.log('redirectUrl error', err);
// redirectUrl = err.request.responseURL;
// }

Expand Down Expand Up @@ -219,8 +215,6 @@ export async function start(this: Space): Promise<void> {
// new RTCSessionDescription({ type: 'answer', sdp: answerSDP })
// );
// }

console.log('Live Stream started');
} catch (err) {
console.error(`[Push SDK] - API - Error - API ${start.name} -: `, err);
throw Error(`[Push SDK] - API - Error - API ${start.name} -: ${err}`);
Expand Down
Loading

0 comments on commit bff51a3

Please sign in to comment.