From e63fb1e5f1c2e6375fbd3a3120842bf1519b4f87 Mon Sep 17 00:00:00 2001 From: David Chen Date: Fri, 19 Jun 2026 11:08:33 -0700 Subject: [PATCH 1/3] rename all Packet Trailer to Frame Metadata --- examples/local_video/src/publisher.rs | 10 +++--- examples/local_video/src/subscriber.rs | 4 +-- livekit-ffi-node-bindings/proto/room_pb.d.ts | 6 ++-- livekit-ffi-node-bindings/proto/room_pb.js | 4 +-- livekit-ffi-node-bindings/proto/track_pb.d.ts | 16 ++++----- livekit-ffi-node-bindings/proto/track_pb.js | 14 ++++---- livekit-ffi/protocol/room.proto | 2 +- livekit-ffi/protocol/track.proto | 8 ++--- livekit-ffi/src/conversion/room.rs | 36 +++++++++---------- livekit-ffi/src/conversion/track.rs | 12 +++---- livekit/src/room/options.rs | 8 ++--- .../src/room/participant/local_participant.rs | 20 +++++------ livekit/src/room/publication/local.rs | 4 +-- livekit/src/room/publication/mod.rs | 8 ++--- livekit/src/room/publication/remote.rs | 4 +-- livekit/tests/packet_trailer_test.rs | 10 +++--- 16 files changed, 83 insertions(+), 83 deletions(-) diff --git a/examples/local_video/src/publisher.rs b/examples/local_video/src/publisher.rs index 5e604d560..c9cbb93c2 100644 --- a/examples/local_video/src/publisher.rs +++ b/examples/local_video/src/publisher.rs @@ -2,7 +2,7 @@ use anyhow::Result; use clap::{Parser, ValueEnum}; use livekit::e2ee::{key_provider::*, E2eeOptions, EncryptionType}; use livekit::options::{ - self, video as video_presets, PacketTrailerFeatures, TrackPublishOptions, VideoCodec, + self, video as video_presets, FrameMetadataFeatures, TrackPublishOptions, VideoCodec, VideoEncoderBackend, VideoEncoding, VideoPreset, }; use livekit::prelude::*; @@ -1178,16 +1178,16 @@ async fn run(args: Args, ctrl_c_received: Arc) -> Result<()> { ); } - let mut packet_trailer_features = PacketTrailerFeatures::default(); - packet_trailer_features.user_timestamp = args.attach_timestamp; - packet_trailer_features.frame_id = args.attach_frame_id; + let mut frame_metadata_features = FrameMetadataFeatures::default(); + frame_metadata_features.user_timestamp = args.attach_timestamp; + frame_metadata_features.frame_id = args.attach_frame_id; let publish_opts = |codec: VideoCodec| TrackPublishOptions { source: TrackSource::Camera, simulcast: args.simulcast, video_codec: codec, video_encoder: requested_encoder, - packet_trailer_features, + frame_metadata_features, video_encoding: Some(main_encoding.clone()), simulcast_layers: args.simulcast.then(|| simulcast_presets.clone()), ..Default::default() diff --git a/examples/local_video/src/subscriber.rs b/examples/local_video/src/subscriber.rs index abb5aa4cd..54f4fff5e 100644 --- a/examples/local_video/src/subscriber.rs +++ b/examples/local_video/src/subscriber.rs @@ -881,7 +881,7 @@ async fn handle_track_subscribed( } info!( - "Subscribed to video track: {} (sid {}) from {} - codec: {}, simulcast: {}, dimension: {}x{}, packet_trailer_features: {:?}", + "Subscribed to video track: {} (sid {}) from {} - codec: {}, simulcast: {}, dimension: {}x{}, frame_metadata_features: {:?}", publication.name(), publication.sid(), participant.identity(), @@ -889,7 +889,7 @@ async fn handle_track_subscribed( publication.simulcasted(), publication.dimension().0, publication.dimension().1, - publication.packet_trailer_features(), + publication.frame_metadata_features(), ); { diff --git a/livekit-ffi-node-bindings/proto/room_pb.d.ts b/livekit-ffi-node-bindings/proto/room_pb.d.ts index 5f97a5764..176c47026 100644 --- a/livekit-ffi-node-bindings/proto/room_pb.d.ts +++ b/livekit-ffi-node-bindings/proto/room_pb.d.ts @@ -20,7 +20,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto2 } from "@bufbuild/protobuf"; import type { DisconnectReason, OwnedParticipant, ParticipantInfo, ParticipantPermission } from "./participant_pb.js"; -import type { OwnedTrack, OwnedTrackPublication, PacketTrailerFeature, TrackPublicationInfo, TrackSource } from "./track_pb.js"; +import type { FrameMetadataFeature, OwnedTrack, OwnedTrackPublication, TrackPublicationInfo, TrackSource } from "./track_pb.js"; import type { RtcStats } from "./stats_pb.js"; import type { VideoCodec } from "./video_frame_pb.js"; import type { E2eeOptions, EncryptionState } from "./e2ee_pb.js"; @@ -1844,9 +1844,9 @@ export declare class TrackPublishOptions extends Message { preconnectBuffer?: boolean; /** - * @generated from field: repeated livekit.proto.PacketTrailerFeature packet_trailer_features = 10; + * @generated from field: repeated livekit.proto.FrameMetadataFeature frame_metadata_features = 10; */ - packetTrailerFeatures: PacketTrailerFeature[]; + frameMetadataFeatures: FrameMetadataFeature[]; /** * RTP scalability mode (e.g. "L3T3_KEY"). When set, a single RTP diff --git a/livekit-ffi-node-bindings/proto/room_pb.js b/livekit-ffi-node-bindings/proto/room_pb.js index 4f4df2404..7794a1ed0 100644 --- a/livekit-ffi-node-bindings/proto/room_pb.js +++ b/livekit-ffi-node-bindings/proto/room_pb.js @@ -22,7 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const { proto2 } = require("@bufbuild/protobuf"); const { DisconnectReason, OwnedParticipant, ParticipantInfo, ParticipantPermission } = require("./participant_pb.js"); -const { OwnedTrack, OwnedTrackPublication, PacketTrailerFeature, TrackPublicationInfo, TrackSource } = require("./track_pb.js"); +const { FrameMetadataFeature, OwnedTrack, OwnedTrackPublication, TrackPublicationInfo, TrackSource } = require("./track_pb.js"); const { RtcStats } = require("./stats_pb.js"); const { VideoCodec } = require("./video_frame_pb.js"); const { E2eeOptions, EncryptionState } = require("./e2ee_pb.js"); @@ -729,7 +729,7 @@ const TrackPublishOptions = /*@__PURE__*/ proto2.makeMessageType( { no: 7, name: "source", kind: "enum", T: proto2.getEnumType(TrackSource), opt: true }, { no: 8, name: "stream", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, { no: 9, name: "preconnect_buffer", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 10, name: "packet_trailer_features", kind: "enum", T: proto2.getEnumType(PacketTrailerFeature), repeated: true }, + { no: 10, name: "frame_metadata_features", kind: "enum", T: proto2.getEnumType(FrameMetadataFeature), repeated: true }, { no: 11, name: "scalability_mode", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, { no: 12, name: "video_encoder", kind: "enum", T: proto2.getEnumType(VideoEncoderBackend), opt: true }, ], diff --git a/livekit-ffi-node-bindings/proto/track_pb.d.ts b/livekit-ffi-node-bindings/proto/track_pb.d.ts index e4a854afd..8aaf93650 100644 --- a/livekit-ffi-node-bindings/proto/track_pb.d.ts +++ b/livekit-ffi-node-bindings/proto/track_pb.d.ts @@ -136,18 +136,18 @@ export declare enum AudioTrackFeature { } /** - * @generated from enum livekit.proto.PacketTrailerFeature + * @generated from enum livekit.proto.FrameMetadataFeature */ -export declare enum PacketTrailerFeature { +export declare enum FrameMetadataFeature { /** - * @generated from enum value: PTF_USER_TIMESTAMP = 0; + * @generated from enum value: FMF_USER_TIMESTAMP = 0; */ - PTF_USER_TIMESTAMP = 0, + FMF_USER_TIMESTAMP = 0, /** - * @generated from enum value: PTF_FRAME_ID = 1; + * @generated from enum value: FMF_FRAME_ID = 1; */ - PTF_FRAME_ID = 1, + FMF_FRAME_ID = 1, } /** @@ -431,9 +431,9 @@ export declare class TrackPublicationInfo extends Message audioFeatures: AudioTrackFeature[]; /** - * @generated from field: repeated livekit.proto.PacketTrailerFeature packet_trailer_features = 13; + * @generated from field: repeated livekit.proto.FrameMetadataFeature frame_metadata_features = 13; */ - packetTrailerFeatures: PacketTrailerFeature[]; + frameMetadataFeatures: FrameMetadataFeature[]; constructor(data?: PartialMessage); diff --git a/livekit-ffi-node-bindings/proto/track_pb.js b/livekit-ffi-node-bindings/proto/track_pb.js index 4755e0b2f..8ecc19d4d 100644 --- a/livekit-ffi-node-bindings/proto/track_pb.js +++ b/livekit-ffi-node-bindings/proto/track_pb.js @@ -80,13 +80,13 @@ const AudioTrackFeature = /*@__PURE__*/ proto2.makeEnum( ); /** - * @generated from enum livekit.proto.PacketTrailerFeature + * @generated from enum livekit.proto.FrameMetadataFeature */ -const PacketTrailerFeature = /*@__PURE__*/ proto2.makeEnum( - "livekit.proto.PacketTrailerFeature", +const FrameMetadataFeature = /*@__PURE__*/ proto2.makeEnum( + "livekit.proto.FrameMetadataFeature", [ - {no: 0, name: "PTF_USER_TIMESTAMP"}, - {no: 1, name: "PTF_FRAME_ID"}, + {no: 0, name: "FMF_USER_TIMESTAMP"}, + {no: 1, name: "FMF_FRAME_ID"}, ], ); @@ -195,7 +195,7 @@ const TrackPublicationInfo = /*@__PURE__*/ proto2.makeMessageType( { no: 10, name: "remote", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, { no: 11, name: "encryption_type", kind: "enum", T: proto2.getEnumType(EncryptionType), req: true }, { no: 12, name: "audio_features", kind: "enum", T: proto2.getEnumType(AudioTrackFeature), repeated: true }, - { no: 13, name: "packet_trailer_features", kind: "enum", T: proto2.getEnumType(PacketTrailerFeature), repeated: true }, + { no: 13, name: "frame_metadata_features", kind: "enum", T: proto2.getEnumType(FrameMetadataFeature), repeated: true }, ], ); @@ -319,7 +319,7 @@ exports.TrackKind = TrackKind; exports.TrackSource = TrackSource; exports.StreamState = StreamState; exports.AudioTrackFeature = AudioTrackFeature; -exports.PacketTrailerFeature = PacketTrailerFeature; +exports.FrameMetadataFeature = FrameMetadataFeature; exports.CreateVideoTrackRequest = CreateVideoTrackRequest; exports.CreateVideoTrackResponse = CreateVideoTrackResponse; exports.CreateAudioTrackRequest = CreateAudioTrackRequest; diff --git a/livekit-ffi/protocol/room.proto b/livekit-ffi/protocol/room.proto index 08b051084..fd413bf11 100644 --- a/livekit-ffi/protocol/room.proto +++ b/livekit-ffi/protocol/room.proto @@ -312,7 +312,7 @@ message TrackPublishOptions { optional TrackSource source = 7; optional string stream = 8; optional bool preconnect_buffer = 9; - repeated PacketTrailerFeature packet_trailer_features = 10; + repeated FrameMetadataFeature frame_metadata_features = 10; // RTP scalability mode (e.g. "L3T3_KEY"). When set, a single RTP // encoding is produced with this mode, enabling true SVC for codecs // that support it (VP9, AV1). Has no effect for VP8/H264. diff --git a/livekit-ffi/protocol/track.proto b/livekit-ffi/protocol/track.proto index 17ced5ec3..b6eb77551 100644 --- a/livekit-ffi/protocol/track.proto +++ b/livekit-ffi/protocol/track.proto @@ -91,7 +91,7 @@ message TrackPublicationInfo { required bool remote = 10; required EncryptionType encryption_type = 11; repeated AudioTrackFeature audio_features = 12; - repeated PacketTrailerFeature packet_trailer_features = 13; + repeated FrameMetadataFeature frame_metadata_features = 13; } message OwnedTrackPublication { @@ -161,7 +161,7 @@ enum AudioTrackFeature { TF_PRECONNECT_BUFFER = 6; // client will buffer audio once available and send it to the server via bytes stream once connected } -enum PacketTrailerFeature { - PTF_USER_TIMESTAMP = 0; - PTF_FRAME_ID = 1; +enum FrameMetadataFeature { + FMF_USER_TIMESTAMP = 0; + FMF_FRAME_ID = 1; } diff --git a/livekit-ffi/src/conversion/room.rs b/livekit-ffi/src/conversion/room.rs index a166b3a8e..ffd41e0ad 100644 --- a/livekit-ffi/src/conversion/room.rs +++ b/livekit-ffi/src/conversion/room.rs @@ -19,7 +19,7 @@ use livekit::{ E2eeOptions, EncryptionType, }, options::{ - AudioEncoding, PacketTrailerFeatures, TrackPublishOptions, VideoEncoderBackend, + AudioEncoding, FrameMetadataFeatures, TrackPublishOptions, VideoEncoderBackend, VideoEncoding, }, prelude::*, @@ -31,23 +31,23 @@ use livekit::{ }; use std::time::Duration; -fn packet_trailer_features_from_proto(features: Vec) -> PacketTrailerFeatures { - let mut packet_trailer_features = PacketTrailerFeatures::default(); +fn frame_metadata_features_from_proto(features: Vec) -> FrameMetadataFeatures { + let mut frame_metadata_features = FrameMetadataFeatures::default(); for feature in - features.into_iter().filter_map(|value| proto::PacketTrailerFeature::try_from(value).ok()) + features.into_iter().filter_map(|value| proto::FrameMetadataFeature::try_from(value).ok()) { match feature { - proto::PacketTrailerFeature::PtfUserTimestamp => { - packet_trailer_features.user_timestamp = true; + proto::FrameMetadataFeature::FmfUserTimestamp => { + frame_metadata_features.user_timestamp = true; } - proto::PacketTrailerFeature::PtfFrameId => { - packet_trailer_features.frame_id = true; + proto::FrameMetadataFeature::FmfFrameId => { + frame_metadata_features.frame_id = true; } } } - packet_trailer_features + frame_metadata_features } fn video_encoder_from_proto(backend: Option) -> Option { @@ -329,8 +329,8 @@ impl From for TrackPublishOptions { preconnect_buffer: opts .preconnect_buffer .unwrap_or(default_publish_options.preconnect_buffer), - packet_trailer_features: packet_trailer_features_from_proto( - opts.packet_trailer_features, + frame_metadata_features: frame_metadata_features_from_proto( + opts.frame_metadata_features, ), video_encoder: video_encoder_from_proto(opts.video_encoder) .unwrap_or(default_publish_options.video_encoder), @@ -355,22 +355,22 @@ impl From for AudioEncoding { mod tests { use livekit::options::{TrackPublishOptions, VideoEncoderBackend}; - use super::{packet_trailer_features_from_proto, video_encoder_from_proto}; + use super::{frame_metadata_features_from_proto, video_encoder_from_proto}; use crate::proto; #[test] - fn packet_trailer_features_default_to_empty() { - let features = packet_trailer_features_from_proto(Vec::new()); + fn frame_metadata_features_default_to_empty() { + let features = frame_metadata_features_from_proto(Vec::new()); assert!(!features.user_timestamp); assert!(!features.frame_id); } #[test] - fn packet_trailer_features_enable_known_flags() { - let features = packet_trailer_features_from_proto(vec![ - proto::PacketTrailerFeature::PtfUserTimestamp.into(), - proto::PacketTrailerFeature::PtfFrameId.into(), + fn frame_metadata_features_enable_known_flags() { + let features = frame_metadata_features_from_proto(vec![ + proto::FrameMetadataFeature::FmfUserTimestamp.into(), + proto::FrameMetadataFeature::FmfFrameId.into(), ]); assert!(features.user_timestamp); diff --git a/livekit-ffi/src/conversion/track.rs b/livekit-ffi/src/conversion/track.rs index 653af6c36..47fd64471 100644 --- a/livekit-ffi/src/conversion/track.rs +++ b/livekit-ffi/src/conversion/track.rs @@ -39,10 +39,10 @@ impl From<&FfiPublication> for proto::TrackPublicationInfo { .into_iter() .map(|i| proto::AudioTrackFeature::from(i).into()) .collect(), - packet_trailer_features: publication - .packet_trailer_features() + frame_metadata_features: publication + .frame_metadata_features() .into_iter() - .map(|i| proto::PacketTrailerFeature::from(i).into()) + .map(|i| proto::FrameMetadataFeature::from(i).into()) .collect(), } } @@ -164,14 +164,14 @@ impl From for proto::AudioTrackFeature { } } -impl From for proto::PacketTrailerFeature { +impl From for proto::FrameMetadataFeature { fn from(value: livekit_protocol::PacketTrailerFeature) -> Self { match value { livekit_protocol::PacketTrailerFeature::PtfUserTimestamp => { - proto::PacketTrailerFeature::PtfUserTimestamp + proto::FrameMetadataFeature::FmfUserTimestamp } livekit_protocol::PacketTrailerFeature::PtfFrameId => { - proto::PacketTrailerFeature::PtfFrameId + proto::FrameMetadataFeature::FmfFrameId } } } diff --git a/livekit/src/room/options.rs b/livekit/src/room/options.rs index e95d19ac4..9cfb4ecda 100644 --- a/livekit/src/room/options.rs +++ b/livekit/src/room/options.rs @@ -74,12 +74,12 @@ pub struct AudioPreset { #[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] #[non_exhaustive] -pub struct PacketTrailerFeatures { +pub struct FrameMetadataFeatures { pub user_timestamp: bool, pub frame_id: bool, } -impl PacketTrailerFeatures { +impl FrameMetadataFeatures { pub(crate) fn is_empty(&self) -> bool { !self.user_timestamp && !self.frame_id } @@ -121,7 +121,7 @@ pub struct TrackPublishOptions { pub source: TrackSource, pub stream: String, pub preconnect_buffer: bool, - pub packet_trailer_features: PacketTrailerFeatures, + pub frame_metadata_features: FrameMetadataFeatures, /// Preferred encoder backend for video tracks published with these options. /// /// If the requested backend is unavailable, the SDK logs a warning and @@ -146,7 +146,7 @@ impl Default for TrackPublishOptions { source: TrackSource::Unknown, stream: "".to_string(), preconnect_buffer: false, - packet_trailer_features: PacketTrailerFeatures::default(), + frame_metadata_features: FrameMetadataFeatures::default(), video_encoder: VideoEncoderBackend::Auto, scalability_mode: None, } diff --git a/livekit/src/room/participant/local_participant.rs b/livekit/src/room/participant/local_participant.rs index 3d381ab9e..956bfc96c 100644 --- a/livekit/src/room/participant/local_participant.rs +++ b/livekit/src/room/participant/local_participant.rs @@ -61,7 +61,7 @@ fn needs_video_sender_transformer( options: &TrackPublishOptions, has_publish_timing_subscribers: bool, ) -> bool { - !options.packet_trailer_features.is_empty() || has_publish_timing_subscribers + !options.frame_metadata_features.is_empty() || has_publish_timing_subscribers } #[derive(Default)] @@ -377,7 +377,7 @@ impl LocalParticipant { } req.packet_trailer_features = - options.packet_trailer_features.to_proto().into_iter().map(|f| f as i32).collect(); + options.frame_metadata_features.to_proto().into_iter().map(|f| f as i32).collect(); let mut encodings = Vec::default(); match &track { @@ -436,7 +436,7 @@ impl LocalParticipant { if let LocalTrack::Video(video_track) = &track { let has_timing_subscribers = video_track.has_publish_timing_subscribers(); if needs_video_sender_transformer(&options, has_timing_subscribers) { - let trailers_enabled = !options.packet_trailer_features.is_empty(); + let trailers_enabled = !options.frame_metadata_features.is_empty(); log::info!( "sender frame transformer enabled for local video track {} (packet_trailer={}, publish_timing={})", publication.sid(), @@ -993,12 +993,12 @@ impl LocalParticipant { #[cfg(test)] mod tests { use super::*; - use crate::options::PacketTrailerFeatures; + use crate::options::FrameMetadataFeatures; #[test] - fn timing_subscribers_request_video_sender_transformer_without_packet_trailers() { + fn timing_subscribers_request_video_sender_transformer_without_frame_metadata() { let options = TrackPublishOptions { - packet_trailer_features: PacketTrailerFeatures::default(), + frame_metadata_features: FrameMetadataFeatures::default(), ..Default::default() }; @@ -1006,9 +1006,9 @@ mod tests { } #[test] - fn packet_trailer_features_request_video_sender_transformer_without_timing_subscribers() { + fn frame_metadata_features_request_video_sender_transformer_without_timing_subscribers() { let options = TrackPublishOptions { - packet_trailer_features: PacketTrailerFeatures { + frame_metadata_features: FrameMetadataFeatures { user_timestamp: true, frame_id: false, }, @@ -1019,9 +1019,9 @@ mod tests { } #[test] - fn video_sender_transformer_is_skipped_without_timing_or_packet_trailers() { + fn video_sender_transformer_is_skipped_without_timing_or_frame_metadata() { let options = TrackPublishOptions { - packet_trailer_features: PacketTrailerFeatures::default(), + frame_metadata_features: FrameMetadataFeatures::default(), ..Default::default() }; diff --git a/livekit/src/room/publication/local.rs b/livekit/src/room/publication/local.rs index 0a12e4e27..dcf543481 100644 --- a/livekit/src/room/publication/local.rs +++ b/livekit/src/room/publication/local.rs @@ -150,7 +150,7 @@ impl LocalTrackPublication { self.inner.info.read().audio_features.clone() } - pub fn packet_trailer_features(&self) -> Vec { - self.inner.info.read().packet_trailer_features.clone() + pub fn frame_metadata_features(&self) -> Vec { + self.inner.info.read().frame_metadata_features.clone() } } diff --git a/livekit/src/room/publication/mod.rs b/livekit/src/room/publication/mod.rs index c9ea5b9fb..3bd056d37 100644 --- a/livekit/src/room/publication/mod.rs +++ b/livekit/src/room/publication/mod.rs @@ -60,7 +60,7 @@ impl TrackPublication { pub fn is_remote(self: &Self) -> bool; pub fn encryption_type(self: &Self) -> EncryptionType; pub fn audio_features(self: &Self) -> Vec; - pub fn packet_trailer_features(self: &Self) -> Vec; + pub fn frame_metadata_features(self: &Self) -> Vec; pub(crate) fn on_muted(self: &Self, on_mute: impl Fn(TrackPublication) + Send + 'static) -> (); pub(crate) fn on_unmuted(self: &Self, on_unmute: impl Fn(TrackPublication) + Send + 'static) -> (); @@ -97,7 +97,7 @@ struct PublicationInfo { pub proto_info: proto::TrackInfo, pub encryption_type: EncryptionType, pub audio_features: Vec, - pub packet_trailer_features: Vec, + pub frame_metadata_features: Vec, } pub(crate) type MutedHandler = Box; @@ -145,7 +145,7 @@ pub(super) fn new_inner( .into_iter() .map(|item| item.try_into().unwrap()) .collect(), - packet_trailer_features: info + frame_metadata_features: info .packet_trailer_features .iter() .filter_map(|v| PacketTrailerFeature::try_from(*v).ok()) @@ -171,7 +171,7 @@ pub(super) fn update_info( info.mime_type = new_info.mime_type.clone(); info.simulcasted = is_simulcasted(&new_info); info.audio_features = new_info.audio_features().collect(); - info.packet_trailer_features = new_info + info.frame_metadata_features = new_info .packet_trailer_features .iter() .filter_map(|v| PacketTrailerFeature::try_from(*v).ok()) diff --git a/livekit/src/room/publication/remote.rs b/livekit/src/room/publication/remote.rs index 9e21b1383..0c3325f6a 100644 --- a/livekit/src/room/publication/remote.rs +++ b/livekit/src/room/publication/remote.rs @@ -400,7 +400,7 @@ impl RemoteTrackPublication { self.inner.info.read().audio_features.clone() } - pub fn packet_trailer_features(&self) -> Vec { - self.inner.info.read().packet_trailer_features.clone() + pub fn frame_metadata_features(&self) -> Vec { + self.inner.info.read().frame_metadata_features.clone() } } diff --git a/livekit/tests/packet_trailer_test.rs b/livekit/tests/packet_trailer_test.rs index b89108d73..cb1b05c8c 100644 --- a/livekit/tests/packet_trailer_test.rs +++ b/livekit/tests/packet_trailer_test.rs @@ -39,7 +39,7 @@ use livekit::{ key_provider::{KeyProvider, KeyProviderOptions}, EncryptionType, }, - options::{PacketTrailerFeatures, TrackPublishOptions, VideoCodec}, + options::{FrameMetadataFeatures, TrackPublishOptions, VideoCodec}, prelude::*, webrtc::video_frame::FrameMetadata, E2eeOptions, RoomOptions, @@ -139,9 +139,9 @@ async fn run_packet_trailer_test(params: PacketTrailerTestParams) -> Result<()> let pub_room = Arc::new(pub_room); - let mut packet_trailer_features = PacketTrailerFeatures::default(); - packet_trailer_features.user_timestamp = params.attach_timestamp; - packet_trailer_features.frame_id = params.attach_frame_id; + let mut frame_metadata_features = FrameMetadataFeatures::default(); + frame_metadata_features.user_timestamp = params.attach_timestamp; + frame_metadata_features.frame_id = params.attach_frame_id; let rtc_source = NativeVideoSource::new(VideoResolution { width: TEST_WIDTH, height: TEST_HEIGHT }, false); @@ -157,7 +157,7 @@ async fn run_packet_trailer_test(params: PacketTrailerTestParams) -> Result<()> TrackPublishOptions { video_codec: params.codec, simulcast: false, - packet_trailer_features, + frame_metadata_features, ..Default::default() }, ) From 723046a8861495912fc70c1891d024dfcb483e0a Mon Sep 17 00:00:00 2001 From: David Chen Date: Fri, 19 Jun 2026 15:11:34 -0700 Subject: [PATCH 2/3] add changeset --- .changeset/frame-metadata-user-data.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/frame-metadata-user-data.md diff --git a/.changeset/frame-metadata-user-data.md b/.changeset/frame-metadata-user-data.md new file mode 100644 index 000000000..ea5741186 --- /dev/null +++ b/.changeset/frame-metadata-user-data.md @@ -0,0 +1,7 @@ +--- +livekit: patch +livekit-ffi: patch +livekit-protocol: patch +--- + +Rename user facing APIs for Packet Trailer to Frame Metadata. From 2015ac7ef2a2f8e3af8a264f04847fdad18c6007 Mon Sep 17 00:00:00 2001 From: David Chen Date: Sat, 20 Jun 2026 13:17:25 -0700 Subject: [PATCH 3/3] changeset should be minor rev --- .changeset/frame-metadata-user-data.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/frame-metadata-user-data.md b/.changeset/frame-metadata-user-data.md index ea5741186..814f21686 100644 --- a/.changeset/frame-metadata-user-data.md +++ b/.changeset/frame-metadata-user-data.md @@ -1,7 +1,7 @@ --- -livekit: patch -livekit-ffi: patch -livekit-protocol: patch +livekit: minor +livekit-ffi: minor +livekit-protocol: minor --- Rename user facing APIs for Packet Trailer to Frame Metadata.