downloadOptionsWithToken method

dynamic downloadOptionsWithToken(
  1. String token,
  2. String mediaId,
  3. String? customPlayerId,
  4. dynamic onOptionsReceived(
    1. DownloadOptions
    ),
  5. dynamic onOptionsNotReceived(
    1. VdoError
    )?,
)

Request download options with token, videoId and custom player id.

Implementation

downloadOptionsWithToken(
    String token,
    String mediaId,
    String? customPlayerId,
    Function(DownloadOptions) onOptionsReceived,
    Function(VdoError)? onOptionsNotReceived) {
  this.onOptionsReceived = onOptionsReceived;
  this.onOptionsNotReceived = onOptionsNotReceived;
  _token = token;
  _customPlayerId = customPlayerId;
  methodChannel.invokeMethod("downloadOptionsWithToken", {
    'token': token,
    'videoId': mediaId,
    'customPlayerId': customPlayerId,
  });
}