logo
On this page

ZegoMediaDataPublisherEventHandler

ZegoMediaDataPublisherEventHandler

Declared in ZegoExpressEventHandler.h

Methods

mediaDataPublisher:fileOpen

mediaDataPublisher:fileOpen
- (void)mediaDataPublisher:(ZegoMediaDataPublisher *)publisher fileOpen:(NSString *)path;
The event callback of the media data publisher opening a media file.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
publisherZegoMediaDataPublisher *Callback publisher object
pathNSString *Path of currently open file

Details

The event callback of the media data publisher opening a media file.

  • Trigger: The callback triggered when the media data publisher start loading a media file.
  • Available since: 2.17.0
  • Restrictions: None.

mediaDataPublisher:fileClose:errorCode

mediaDataPublisher:fileClose:errorCode
- (void)mediaDataPublisher:(ZegoMediaDataPublisher *)publisher fileClose:(NSString *)path errorCode:(int)errorCode;
The event callback of the media data publisher closing a media file.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
publisherZegoMediaDataPublisher *Callback publisher object
errorCodeinterror code. 0 means closing the file normally. -1 is a file error. -2 is a path exception. -3 is a decoding exception. -4 is an incorrect timestamp. -5 Unable to fix audio/video synchronization. -6 Unsupported audio sample rate. Contact technical support for details.
pathNSString *Path of currently open file

Details

The event callback of the media data publisher closing a media file.

  • Trigger: The callback triggered when the media data publisher start unloading a media file.
  • Available since: 2.17.0
  • Restrictions: None.

mediaDataPublisher:fileDataBegin

mediaDataPublisher:fileDataBegin
- (void)mediaDataPublisher:(ZegoMediaDataPublisher *)publisher fileDataBegin:(NSString *)path;
The event callback that the media data publisher has read data from the media file.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
publisherZegoMediaDataPublisher *Callback publisher object
pathNSString *Path of currently open file

Details

The event callback that the media data publisher has read data from the media file.

  • Trigger: The callback triggered when the media data publisher begin to read media data from a media file.
  • Available since: 2.17.0
  • Restrictions: None.

mediaDataPublisher:fileDataEnd

mediaDataPublisher:fileDataEnd
- (void)mediaDataPublisher:(ZegoMediaDataPublisher *)publisher fileDataEnd:(NSString *)path;
The event callback that the media data publisher has completed a file stream publishing.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
publisherZegoMediaDataPublisher *Callback publisher object.
pathNSString *The path of the file that has completed stream publishing.

Details

The media data publisher has finished a file stream publishing.

  • Trigger: The callback triggered when the media data publisher has completed a file stream publishing.
  • Available since: 3.14.0
  • Restrictions: None.

Previous

zegomediadatapublisherconfig

Next

zegomediaplayer

On this page

Back to top