Skip to content

Commit e8e2370

Browse files
committed
feat: add backwards compatibility aliases for packet_trailer_features
1 parent 6a97e02 commit e8e2370

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

livekit-rtc/livekit/rtc/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
TrackSource,
4444
ParticipantTrackPermission,
4545
)
46+
47+
# Backwards-compatible alias for the enum renamed to FrameMetadataFeature in the
48+
# FFI protocol (note: member names changed from PTF_* to FMF_*).
49+
PacketTrailerFeature = FrameMetadataFeature
4650
from ._proto.video_frame_pb2 import FrameMetadata, VideoBufferType, VideoCodec, VideoRotation
4751
from ._proto.track_publication_pb2 import VideoQuality
4852
from .audio_frame import AudioFrame

livekit-rtc/livekit/rtc/track_publication.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ def audio_features(self) -> List[proto_track.AudioTrackFeature.ValueType]:
8383
def frame_metadata_features(self) -> List[proto_track.FrameMetadataFeature.ValueType]:
8484
return list(self._info.frame_metadata_features)
8585

86+
@property
87+
def packet_trailer_features(self) -> List[proto_track.FrameMetadataFeature.ValueType]:
88+
"""Deprecated alias for :meth:`frame_metadata_features`."""
89+
return self.frame_metadata_features
90+
8691

8792
class LocalTrackPublication(TrackPublication):
8893
def __init__(self, owned_info: proto_track.OwnedTrackPublication):

0 commit comments

Comments
 (0)