Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't create data channel of publisher until sending data message #1118

Merged
merged 4 commits into from
May 6, 2024

Conversation

cnderrauber
Copy link
Contributor

@cnderrauber cnderrauber commented Apr 26, 2024

Will not merge this change until sfu server with livekit/livekit#2686 updated as the old server version always requires data channel
Enable this optimization if server supports optional publisher datachannel (protocol > 13)

Copy link

changeset-bot bot commented Apr 26, 2024

🦋 Changeset detected

Latest commit: 8ed27d7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Apr 26, 2024

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 79.13 KB (+0.12% 🔺)
dist/livekit-client.umd.js 84.75 KB (+0.11% 🔺)

Copy link
Contributor

@boks1971 boks1971 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! But, I think this requires a protocol version bump to ensure backwards compatibility.

Also, all clients need to do this to take advantage of this optimisation right?

@@ -1165,6 +1172,14 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
}

this.pcManager.requirePublisher();
// don't negotiate without any trascenvers or data channel, it will generate sdp without ice frag then negotiate failed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:nit: transceivers

@cnderrauber
Copy link
Contributor Author

But, I think this requires a protocol version bump to ensure backwards compatibility.

This is a client change so protocol bump doesn't work for it, the new server can work with old/new clients.

Also, all clients need to do this to take advantage of this optimisation right?

Right

@lukasIO
Copy link
Contributor

lukasIO commented Apr 26, 2024

as the old server version always requires data channel

what does that mean in terms of backwards compatibility of a client with this change trying to connect to an older server verison?

@cnderrauber
Copy link
Contributor Author

as the old server version always requires data channel

what does that mean in terms of backwards compatibility of a client with this change trying to connect to an older server verison?

The publisher peerconnection will be considered as failed by sfu.

@lukasIO
Copy link
Contributor

lukasIO commented Apr 29, 2024

in order to release this with a new protocol version, we'll need to handle updated leave requests as well as those are part of protocol version 13 and have not yet been implemented.

^ this has been done, but might have been unneeded as this PR only checks for server side protocol version.

@cnderrauber cnderrauber merged commit 0586b09 into main May 6, 2024
3 checks passed
@cnderrauber cnderrauber deleted the delay_pubdc branch May 6, 2024 08:29
@github-actions github-actions bot mentioned this pull request May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants