onPublisherStreamEvent property

(void Function(ZegoStreamEvent eventID, String streamID, String extraInfo)?) onPublisherStreamEvent
read / write

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

static void Function(
        ZegoStreamEvent eventID, String streamID, String extraInfo)?
    onPublisherStreamEvent;