diff --git a/net/web/src/context/useRingContext.hook.js b/net/web/src/context/useRingContext.hook.js index d4625537..a0158254 100644 --- a/net/web/src/context/useRingContext.hook.js +++ b/net/web/src/context/useRingContext.hook.js @@ -33,11 +33,6 @@ export function useRingContext() { const audioTrack = useRef(); const iceServers = [ - { - urls: 'stun:35.165.123.117:5001?transport=udp', - username: 'user', - credential: 'pass' - }, { urls: 'turn:35.165.123.117:5001?transport=udp', username: 'user', @@ -174,6 +169,7 @@ export function useRingContext() { ws.current.close(); } else if (signal.description) { +console.log("NULL STREAM"); stream.current = null; if (signal.description.type === 'offer' && pc.current.signalingState !== 'stable') { return; //rudely ignore @@ -295,6 +291,7 @@ export function useRingContext() { pc.current.ontrack = (ev) => { //{streams: [stream]}) => { console.log("ADD TRACK", ev); if (!stream.current) { +console.log("NEW MEDIA!"); stream.current = new MediaStream(); updateState({ remoteStream: stream.current }); } @@ -361,6 +358,8 @@ export function useRingContext() { } } else if (signal.description) { +console.log("NEW DESCRIPTION"); + stream.current = null; if (signal.description.type === 'offer' && pc.current.signalingState !== 'stable') { await pc.current.setLocalDescription({ type: "rollback" }); } diff --git a/net/web/src/session/Session.jsx b/net/web/src/session/Session.jsx index a281891a..bfc31de9 100644 --- a/net/web/src/session/Session.jsx +++ b/net/web/src/session/Session.jsx @@ -80,12 +80,18 @@ export function Session() { setCallHeight(height); setCallWidth(videoWidth * (height / videoHeight)); } + else if (videoHeight < 256 || videoWidth < 256) { + setCallHeight(256); + setCallWidth(256); + } else { setCallHeight(videoHeight); setCallWidth(videoWidth); } }; +console.log(" SET REMOTE STREAM"); remote.current.srcObject = state.remoteStream; + remote.current.load(); remote.current.play(); } else { diff --git a/net/web/src/session/contact/Contact.jsx b/net/web/src/session/contact/Contact.jsx index fd410c53..52cd4109 100644 --- a/net/web/src/session/contact/Contact.jsx +++ b/net/web/src/session/contact/Contact.jsx @@ -9,10 +9,6 @@ export function Contact({ close, guid, listing }) { const [ modal, modalContext ] = Modal.useModal(); const { state, actions } = useContact(guid, listing, close); - const ring = async () => { - actions.ring(); - }; - const updateContact = async (action) => { try { await action(); @@ -98,6 +94,7 @@ export function Contact({ close, guid, listing }) {
updateContact(actions.disconnect)}>Disconnect
updateContact(actions.disconnectRemove)}>Delete Contact
+
Call Contact
)} @@ -137,8 +134,6 @@ export function Contact({ close, guid, listing }) { )} -
RING
-