Fix RTVI events not delivered over WebSocket transports
The base serializer filters out RTVI protocol messages by default (ignore_rtvi_messages=True) to prevent them from being sent over telephony media streams. ProtobufFrameSerializer is used by WebSocket transports, which are the delivery channel for these messages, so disable the filter there.
This commit is contained in:
1
changelog/4176.fixed.md
Normal file
1
changelog/4176.fixed.md
Normal file
@@ -0,0 +1 @@
|
||||
- Fixed RTVI events not being delivered to clients when using WebSocket transports. `ProtobufFrameSerializer` now sets `ignore_rtvi_messages=False` by default.
|
||||
@@ -68,6 +68,11 @@ class ProtobufFrameSerializer(FrameSerializer):
|
||||
params: Configuration parameters.
|
||||
"""
|
||||
super().__init__(params)
|
||||
# The base serializer defaults to filtering out RTVI protocol messages
|
||||
# to avoid sending them over telephony media streams. ProtobufFrameSerializer
|
||||
# is used by WebSocket transports, which are the delivery channel for
|
||||
# these messages, so we disable the filter.
|
||||
self._params.ignore_rtvi_messages = False
|
||||
|
||||
async def serialize(self, frame: Frame) -> str | bytes | None:
|
||||
"""Serialize a frame to Protocol Buffer binary format.
|
||||
|
||||
Reference in New Issue
Block a user