Skip to content

Commit fc490b2

Browse files
committed
session_stats->rtc_stats
1 parent 5f31ead commit fc490b2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

livekit-rtc/livekit/rtc/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
RoomOptions,
5858
RtcConfiguration,
5959
SipDTMF,
60-
SessionStats,
60+
RtcStats,
6161
)
6262
from .track import (
6363
AudioTrack,
@@ -131,7 +131,7 @@
131131
"RoomOptions",
132132
"RtcConfiguration",
133133
"SipDTMF",
134-
"SessionStats",
134+
"RtcStats",
135135
"DataPacket",
136136
"LocalAudioTrack",
137137
"LocalVideoTrack",

livekit-rtc/livekit/rtc/room.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class SipDTMF:
122122

123123

124124
@dataclass
125-
class SessionStats:
125+
class RtcStats:
126126
publisher_stats: list[proto_stats.RtcStats]
127127
subscriber_stats: list[proto_stats.RtcStats]
128128

@@ -415,7 +415,7 @@ def on_participant_connected(participant):
415415
# start listening to room events
416416
self._task = self._loop.create_task(self._listen_task())
417417

418-
async def get_session_stats(self) -> SessionStats:
418+
async def get_rtc_stats(self) -> RtcStats:
419419
if not self.isconnected():
420420
raise RuntimeError("the room isn't connected")
421421

@@ -436,7 +436,8 @@ async def get_session_stats(self) -> SessionStats:
436436

437437
publisher_stats = list(cb.get_session_stats.result.publisher_stats)
438438
subscriber_stats = list(cb.get_session_stats.result.subscriber_stats)
439-
return SessionStats(publisher_stats=publisher_stats, subscriber_stats=subscriber_stats)
439+
440+
return RtcStats(publisher_stats=publisher_stats, subscriber_stats=subscriber_stats)
440441

441442
def register_byte_stream_handler(self, topic: str, handler: ByteStreamHandler):
442443
existing_handler = self._byte_stream_handlers.get(topic)

0 commit comments

Comments
 (0)