Links

Video Event Listener

You can implement the interface VideoEventListener to receive events related to video playback.
Kotlin
Java
FwSDK.addVideoEventListener(object: FwSDK.VideoEventListener {
override fun event(eventName: String, jsonObject: JSONObject) {
}
})
/Adding Video Event Listener
FwSDK.INSTANCE.addVideoEventListener(new FwSDK.VideoEventListener() {
@Override
public void event(@NonNull String eventName, @NonNull JSONObject jsonObject) {
Log.v("FwDemo", eventName);
}
});
Event
Description
video-impression
Fired when the video is shown to the user
video-start
Fired when the video has played 1 second
video-first-quartile
Fired when 25% of the video is played.
video-midpoint
Fired when 50% of the video is played.
video-third-quartile
Fired when 75% of the video is played.
video-complete
Fired when 100% of the video is played.
video-session-end
Fired when the video is no more on the screen, it is possible for a video to loop after 100% playback is complete, in which case, video exit and video completion will occur at different times.
video-ad-start
Fired when ad video has played 1 second
video-ad-end
Fired when ad video finishes playing
video-click-cta
Fired when the user has clicked on the CTA ( not all videos will have CTA )
videoShare
Fired when the user has clicked on the share button
videoStartError
Fired when video playback encountered an error
videoAdStartError
Fired when ad video playback encountered an error
Along with each event, you will also get the relevant data in the form of JSONObject. The data includes
Field
Type
Description
autoplay
Boolean
describes if the video playack is autoplay
badge
String
badge will have value "ad" , if the playing video is ad video
caption
String
title of the video playing
duration
Long
total duration of the video in miliseconds
hashtags
StringArray
hashtags associated with the video
has_cta
Boolean
does video have CTA ?
height
Int
height of the video player
width
Int
width of the video player
video_id
String
encodedId of the video with which it is uniquely identified "progress" : progress of video playback in miliseconds when the event occured
progress
Int
progress of video playback in miliseconds when the event occured
playlistId
String
encodedId of the playlist with which it is uniquely identified
channelId
String
encodedId of the channel with which it is uniquely identified
feedType
String
type of feed:- playlist or channel, discover