element-call icon indicating copy to clipboard operation
element-call copied to clipboard

Grey tiles caused by media failure

Open ara4n opened this issue 3 years ago • 3 comments

We have one or more media setup problems causing grey tiles either at the beginning or mid of calls.

One of them is m.call.negotiate racing with m.call.answer from the callee when answering a call.

ara4n avatar Feb 10 '22 15:02 ara4n

hoping that https://github.com/matrix-org/matrix-js-sdk/commit/b4fe00a3a89900791dce21f23a56b67c0b5a5bef and https://github.com/matrix-org/matrix-js-sdk/commit/d42e2fe2c0380d694642c47ab58b3436991e6f02 will fix this.

ara4n avatar Feb 10 '22 19:02 ara4n

it didn't; have rageshaked.

ara4n avatar Feb 11 '22 13:02 ara4n

Theory is that the recurrence was Safari-specific, due to the 'replace call' logic failing when you lose glare.

So we probably need to look at the call direction when we replace the call and try to add the local call feeds. If we created the call, then we already have local call feeds in place and we don't need to do anything special. We shouldn't even pass local call feeds. Just an empty array. If it is an inbound call, we need to clone the call feeds and pass that array to queueGotCallFeedsForAnswer

https://github.com/matrix-org/matrix-js-sdk/commit/c801690e283a22f6f2b2e6f7ecc683bb0eb2fd68 is hopefully the fix.

Also hugely reduced the chances of glare happening in the first place by no longer glaring by default for every call, now we have sesssion IDs:

we thought glaring was the right option before we added session ids because otherwise we didn’t have a way to indicate that there was a new call when a user rejoined; the new call had a 50% chance of expecting others to call it, which never happened. so we placed calls every time we joined just in case. now we have session ids, everyone can see that the session id in the m.call.member changes when the new call joins, and so will try to call it (or wait for it to call; 50/50 split). so we no longer need to deliberately glare.

https://github.com/matrix-org/matrix-js-sdk/commit/d8e597ccdfb18bf307c8a6c5cc7b064d23eb1acf

ara4n avatar Feb 12 '22 10:02 ara4n