loadResourceWithPosition abstract method

Future<ZegoMediaPlayerLoadResourceResult> loadResourceWithPosition(
  1. String path,
  2. int startPosition
)

Load local or network media resource and specify the start position.

Available: since 2.14.0 Description: Load media resources, and specify the progress, in milliseconds, at which playback begins. Use case: Developers can load the absolute path to the local resource or the URL of the network resource incoming. 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 loadResourceFromMediaData function. Caution: When startPosition exceeds the total playing time, it will start playing from the beginning.

  • path The absolute resource path or the URL of the network resource and cannot be null or "". Android can set this path string with Uri.
  • startPosition The progress at which the playback started.
  • Returns Callback result of loading media resource.

Implementation

Future<ZegoMediaPlayerLoadResourceResult> loadResourceWithPosition(
    String path, int startPosition);