AMP Android SDK: Retrieving playback information

Document created by Herberth Alvarado Champion on Aug 11, 2016Last modified by Herberth Alvarado Champion on Apr 9, 2017
Version 5Show Document
  • View in full screen mode

Maintainer: Orlando Sanchez Martinez

This document is part of AMP Android SDK 

 

Android SDK has the following methods for retrieving information about the current playback.

They all belong to the com.akamai.media.VideoPlayerView class.

 

Methods

getBufferingPercentage() [int]: Whenever a rebuffering event is happening, this method returns the percentage of the buffer that is currently filled. Its value goes from 0 to 100.

 

getBytesLoaded() [int]: Returns the total number of bytes downloaded by the Android SDK to play the current stream. Its value is reset to 0 each time a call to play() is done.

 

getLastHttpErrorCode() [int]: Returns last error code (200, 403, 404, etc) returned by the HTTP engine responsible of downloading the content of the stream (both playlists and segments). For example, when playing a geoblocked stream, this method will return the value 403, to let the application know the user doesn’t have the rights to watch the content.

 

getRebuffers() [int]: Number of rebuffer events that occurred along the playback. Its value is reset to 0 each time a call to play() is done.

 

getRebufferingTime() [double]: Number of seconds the player has been paused filling the playback buffer.

 

getVideoWidth() [int]: Returns the width, in pixels, of the stream loaded.

 

getVideoHeight() [int]: Returns the height, in pixels, of the stream loaded. 

 

 

 

This document is part of AMP Android SDK 

Attachments

    Outcomes