createCustomerData method
Implementation
Map<String, dynamic> createCustomerData(
Map<String, String>? trackingData, Map<String, dynamic>? providedData) {
var videoData = VideoData();
videoData[VideoEventJSONKeys.cloudName.name] =
trackingData?[VideoEventJSONKeys.cloudName.name] ?? '';
videoData[VideoEventJSONKeys.publicId.name] =
trackingData?[VideoEventJSONKeys.publicId.name] ?? '';
var result = {VideoEventJSONKeys.videoData.name: videoData};
if (providedData != null && providedData.isNotEmpty) {
var providedDataObject = <String, dynamic>{};
providedData.forEach((key, value) {
providedDataObject[key] = value;
});
result[VideoEventJSONKeys.providedData.name] = providedDataObject;
}
return result;
}