downloadOptionsWithOtp method

dynamic downloadOptionsWithOtp(
  1. String otp,
  2. String playbackInfo,
  3. String? customPlayerId,
  4. dynamic onOptionsReceived(
    1. DownloadOptions
    ),
  5. dynamic onOptionsNotReceived(
    1. VdoError
    )?,
)

Request download options with otp, playbackInfo and custom player id.

Implementation

downloadOptionsWithOtp(
    String otp,
    String playbackInfo,
    String? customPlayerId,
    Function(DownloadOptions) onOptionsReceived,
    Function(VdoError)? onOptionsNotReceived) {
  this.onOptionsReceived = onOptionsReceived;
  this.onOptionsNotReceived = onOptionsNotReceived;
  _otp = otp;
  _playbackInfo = playbackInfo;
  _customPlayerId = customPlayerId;
  methodChannel.invokeMethod("downloadOptionsWithOtp", {
    'otp': otp,
    'playbackInfo': playbackInfo,
    'customPlayerId': customPlayerId,
    'videoId': _getVideoId(playbackInfo)
  });
}