onMediaPlayerNetworkEvent method

void onMediaPlayerNetworkEvent(
  1. ZegoMediaPlayer mediaPlayer,
  2. ZegoMediaPlayerNetworkEvent networkEvent
)

The callback triggered when the network status of the media player changes.

Description: The callback triggered when the network status of the media player changes. Trigger: When the media player is playing network resources, this callback will be triggered when the status change of the cached data. Restrictions: The callback will only be triggered when the network resource is played. Related APIs: setNetWorkBufferThreshold.

  • mediaPlayer Callback player object.
  • networkEvent Network status event.

Implementation

void onMediaPlayerNetworkEvent(
  ZegoMediaPlayer mediaPlayer,
  ZegoMediaPlayerNetworkEvent networkEvent,
) {}