createMediaDataPublisher method

Future<ZegoMediaDataPublisher?> createMediaDataPublisher(
  1. ZegoMediaDataPublisherConfig config
)

Creates a media data publisher instance.

Available since: 3.4.0 Description: Developers can use this interface to create ZegoMediaDataPublisher objects to push local media resource files to implement server-side streaming scenarios, such as AI classrooms. Use cases: Often used in server-side publishing stream scenarios, such as AI classrooms. When to call: After calling the createEngine function to create an engine. Caution: It returns the instance object of the specified publish channel. It will return the instance object if it already exists. Note: This function is only available in ZegoExpressVideo SDK!

  • config Config the media data publisher.
  • Returns Media data publisher instance.

Implementation

Future<ZegoMediaDataPublisher?> createMediaDataPublisher(
    ZegoMediaDataPublisherConfig config) async {
  return await ZegoExpressImpl.instance.createMediaDataPublisher(config);
}