playMedia method
Start playing.
Implementation
Future<ZegoUIKitMediaPlayResult> playMedia({
required String filePathOrURL,
bool enableRepeat = false,
bool autoStart = true,
}) async {
final playResult = await ZegoUIKitCore.shared.playMedia(
filePathOrURL: filePathOrURL,
enableRepeat: enableRepeat,
autoStart: autoStart,
);
if (ZegoUIKitErrorCode.success != playResult.errorCode) {
ZegoUIKitCore.shared.error.errorStreamCtrl?.add(ZegoUIKitError(
code: ZegoUIKitErrorCode.mediaPlayError,
message: playResult.message,
method: 'playMedia',
));
}
return playResult;
}