onPublisherStreamEvent method

void onPublisherStreamEvent(
  1. ZegoStreamEvent eventID,
  2. String streamID,
  3. String extraInfo
)

The callback triggered when publishing stream.

Available since: 2.18.0 Description: After start publishing stream, this callback will return the current stream address, resource type and protocol-related information. When to trigger: Publish and retry publish events. Caution: None.

  • eventID Publish stream event ID
  • streamID Stream ID.
  • extraInfo extra info. it is in JSON format. Included information includes "url" for address, "streamProtocol" for stream protocol, including rtmp, flv, avertp, hls, webrtc, etc. "netProtocol" for network protocol, including tcp, udp, quic, "resourceType" for resource type , including cdn, rtc, l3.

Implementation

void onPublisherStreamEvent(
  ZegoStreamEvent eventID,
  String streamID,
  String extraInfo,
) {}