Video Callbacks - Fullscreen

Adding Listening for Video

Use the following code example below for receiving video callbacks.

Listening for Video Example

InneractiveFullscreenVideoContentController videoContentController = new InneractiveFullscreenVideoContentController();
 
// full screen video ad callbacks
VideoContentListener spotVideoListener = new VideoContentListener() {
             
            @Override
            public void onProgress(int totalDurationInMsec, int positionInMsec) {
                Log.i(TAG, "onProgress: total time = " + totalDurationInMsec + " position = " + positionInMsec);
            }
            @Override
            public void onCompleted() {
                Log.i(TAG, "onCompleted");
            }
            @Override
            public void onPlayerError() {
               /**
                * Please note that onPlayerError callback method is deprecated starting from VAMP v7.3.0,
                * and won't be trigged when an error is occurred. 
                * Note: The SDK handles such errors internally and no further action is required.
                */
                Log.i(TAG, "onPlayerError");
            }
};
 
videoContentController.setEventsListener(spotVideoListener)
 
// Now add the content controller to the unit controller
InneractiveFullscreenUnitController fullscreenUnitController = (InneractiveFullscreenUnitController)mSpot.getSelectedUnitController();
fullscreenUnitController.addContentController(videoContentController);
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request