Fix tracks not being resumed in case of a startPublishing vs track#4087
Fix tracks not being resumed in case of a startPublishing vs track#4087toger5 wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
This isn't making sense to me… if no tracks are found on which we can resumeUpstream, how would we have previously found any tracks on which to pauseUpstream? And what would've caused the app to pauseUpstream in the first place? (I don't see any mention of pausing in Jorge's logs.)
Less relatedly, the startPublishing and stopPublishing methods appear to be misnomers as they deal with pausing and resuming media streaming rather than track publications.
|
I can still tests this, as it takes a minute to do it: I'd just need some deployed URL. Tested this using the deploy url below and I still see the same behaviour, sorry. |
Yeah it is because we don't have control other track creation vs publication. The initial design wanted to do that (hence the current naming), so it was creating the track and publishing which ultimatly was creating duplicate tracks. The livekit "highlevel" mode auto publish tracks once created, so the closest thing we can do is to pause the stream. The fix for that is to create our own low level track management API instead of the livekit one. |
I am also not yet 100% convinced.
Is valeres comment on the startPublishing function. So we do have some inconsistency on So there is no mention of pausing because they already start in pasused state like valere has observed.
I am a bit confused by lk here. I think calling publish creates a publication but does not always imply that you actuality send them upstream. you can publish without upstreaming (I think). |
|
@jmartinesp |
Yes, I could still reproduce the issue. I even tried using it on both ends (EW, EXA). |
I added additional logs. Maybe you can do one more rageshake. |
|
Done (rageshake mentions this PR). |
Oh no it seems we are not getting EC logs again... but it also says: Version: embedded-v0.20.1 |
|
That's the version in Element Web though (technically, Element Desktop)? There is another rageshake containing the info from the EXA device. |
Found it. |
Content
We make sure to resume upstream in case startPublish failed to do so (
resumeUpstreamsfailed)We can see this in the logs:
No track found for source(this was found with the help of an LLM)
Motivation and context
https://matrix.to/#/!yuFzMhMqKzNFvoLqcJ:one.ems.host/$6qF5LPK58oJPOqGDLOBs-Hsb52oAPksA-3ifz9jVQqI?via=matrix.org&via=element.io&via=lant.uk
Screenshots / GIFs
Tests
@jmartinesp needs to test with a device where this race occurred
Checklist