loadResourceFromMediaData abstract method

Future<ZegoMediaPlayerLoadResourceResult> loadResourceFromMediaData(
  1. Uint8List mediaData,
  2. int startPosition
)

Load binary audio resource.

Available: since 2.10.0 Description: Load binary audio data. Use case: Developers do not want to cache the audio data locally, and directly transfer the audio binary data to the media player, directly load and play the audio. When to call: It can be called after the engine by createEngine has been initialized and the media player has been created by createMediaPlayer. Related APIs: Resources can be loaded through the loadResource or loadResourceWithPosition function. Caution: When startPosition exceeds the total playing time, it will start playing from the beginning.

  • mediaData Binary audio data.
  • startPosition Position of starting playback, in milliseconds.
  • Returns Callback result of loading media resource.

Implementation

Future<ZegoMediaPlayerLoadResourceResult> loadResourceFromMediaData(
    Uint8List mediaData, int startPosition);