Skip to content

extract_webcast_push_frame

Extract a WebcastPushFrame from a raw byte payload. This method will parse the payload and return a WebcastPushFrame object. This method is useful for extracting push frames from a WebSocket connection.

Extract a WebcastPushFrame from a raw byte payload. This method will parse the payload and return a WebcastPushFrame object. This method is useful for extracting push frames from a WebSocket connection.

def extract_webcast_push_frame(
data: bytes,
logger: logging.Logger = TikTokLiveLogHandler.get_logger(),
) -> WebcastPushFrame
  • data (bytes) — Raw byte payload to extract from
  • logger (logging.Logger, default TikTokLiveLogHandler.get_logger()) — Logger to use for logging

WebcastPushFrame — WebcastPushFrame The extracted push frame

from TikTokLive.client.ws.ws_utils import extract_webcast_push_frame

TikTokLive/client/ws/ws_utils.py:60