registerVideoProgressEvent method
Future<Map<String, dynamic> ?>
registerVideoProgressEvent({
- required String cliUbid,
- required String uclid,
- required double videoViewSec,
- required double videoDurationSec,
- TrackingParams? trackingParams,
override
Register an Video Progress Event This method sends data about the progress of a video being viewed.
Parameters:
cliUbid: The unique client ID for the user.uclid: A unique client identifier.videoViewSec: The progress of the video viewed.videoDurationSec: The total duration of the video in seconds.trackingParams: Optional additional parameters.
Returns: A Future that resolves to a Map<String, dynamic>?, indicating the result of registering the "video progress" event.
Example:
var response = await RegisterEvent.registerVideoProgressEvent(
cliUbid:
"c27b9ad197765dc9ba51e5b7fb9d5c43eb8f1f7b199367af54c74705424558dd",
uclid: "2",
videoViewSec: 10,
videoDurationSec: 10,
trackingParams: {},
);
Implementation
@override
Future<Map<String, dynamic>?> registerVideoProgressEvent({
required String cliUbid,
required String uclid,
required double videoViewSec,
required double videoDurationSec,
TrackingParams? trackingParams,
}) async {
final result = await MethodHandler.invokeNativeMethod(
'registerVideoProgressEvent',
arguments: {
'cliUbid': cliUbid,
'uclid': uclid,
'videoViewSec': videoViewSec,
'videoDurationSec': videoDurationSec,
'trackingParams': convertTrackingParamsToMap(trackingParams) ?? {},
},
);
return Map<String, dynamic>.from(result ?? {});
}