Class: PlayRecorder
PlayRecorder API is a part of the Player SDK used for recording how long certain asset was shown.
Use global enplug.playRecorder
object to access these methods.
This API can be used to record how long a particular screen was shown on a display. An example would be recording how long an advertisement was displayed on screen to properly pay the screen provider.
#
Methods#
report▸ report<T
>(assetId
, referenceId
, playDuration
, additionalInfo?
): Promise
<T
>
This function can be used to record the time that an item was displayed.
#
Type parametersName |
---|
T |
#
ParametersName | Type | Default value | Description |
---|---|---|---|
assetId | string | undefined | - |
referenceId | any | undefined | Unique identifier to track which asset we are recording a play time for. |
playDuration | number | undefined | Time in seconds that represents how long this item was displayed. |
additionalInfo | string | '' | Optional string of extra information to be saved with the recorded value. |
#
ReturnsPromise
<T
>
Resolves after successfully informing the Player about the report.