open abstract method

Future<void> open({
  1. required String url,
  2. required int startPos,
})

Opens a media resource.

This method is asynchronous.

  • url Sets the path of the media file. Supports both local and online files.
  • startPos Sets the start playback position in milliseconds. Default is 0.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.

Implementation

Future<void> open({required String url, required int startPos});