Repository navigation
Conversation
`DataTrackOptions::with_priority(TrackPriority)` sends the track's network priority to the server in `PublishDataTrackRequest.priority`, and keeps it in the track info so that a republish sends it again. `TrackPriority` is ordered the way firewall rules are: a lower value is more important; values below `TrackPriority::HIGH` (64) are reserved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Changeset incompleteThis PR's changeset is missing version bumps for packages that are affected by the change. The following packages still require a bump:
Already covered:
A package must be bumped when its own files change, and whenever a package it depends on is bumped (so downstream consumers get a matching release). Click here to create a changeset for the missing packages The link pre-populates a changeset file with If this change doesn't require a version bump, add the |
| /// | ||
| /// Ordered the way firewall rules are: a lower value is more important. Values below | ||
| /// [`TrackPriority::HIGH`] are reserved, and [`TrackPriority::new`] raises them to it. | ||
| #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] |
There was a problem hiding this comment.
issue: Relying on the derived implementation for Ord in this case produces comparisons that are not semantically valid:
assert!(TrackPriority::LOW < TrackPriority::HIGH) // fails
What
A publisher can give a data track a network priority when it publishes it:
TrackPriority: a number ordered the way firewall rules are, where a lower value is more important.HIGH(64),MEDIUM(128),LOW(192),VERY_LOW(254).HIGHare reserved;TrackPriority::newraises them toHIGH.with_priority, the request carries no priority and the server decides.PublishDataTrackRequest.priority.Notes
priorityfields.livekit-protocol/srchas only those four fields added. The generated code matchesgenerate_proto.shoutput for them.protocolsubmodule isn't bumped here. That can follow once #2015 is merged.Testing
cargo test -p livekit-datatrackpasses, including new tests for the request field and the value range.cargo check -p livekit -p livekit-ffipasses.🤖 Generated with Claude Code