generateAndroidParams method

dynamic generateAndroidParams(
  1. Datum content,
  2. PackageModel packageModel, {
  3. bool isLive = false,
})

Implementation

generateAndroidParams(Datum content, PackageModel packageModel,
    {bool isLive = false}) async {
  SharedPreferences sharedPreferences = await DeviceStorage().getInstance();
  String sessionToken =
      sharedPreferences.getString(DeviceStorage.sessionToken) ?? "";

  var contentData = content.toMap();
  contentData['contentStream'] = packageModel.toMap();

  String shareURL = "";
  if (!isLive) {
    // shareURL = RouteGenerator.generateContentShare(content: content);
    shareURL = "";
  }

  Map<String, String> playerParams = {
    "content": jsonEncode(contentData),
    "licenseServer": "https://vdrm.mobiotics.com/prod/proxy/v1/license",
    "packageid": packageModel.packageid ?? "",
    "sessionToken": sessionToken,
    "PlayerSecurity": await getPlaySecurityText(),
    "shareURL": shareURL,
  };
  return playerParams;
}