java.lang.Object | ||
↳ | SurfaceView | |
↳ | com.akamai.media.VideoPlayerViewHardware |
Video player user control that uses hardware decoding
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor
| |||||||||||
Constructor
| |||||||||||
Constructor
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get the about text.
| |||||||||||
This method is deprecated.
Clears the screen render buffer. Only compatible with software decoding
| |||||||||||
This method is deprecated.
For the current playback, get the average FPS (Frames per Second)
This method doesn't make sense in the hardware version of the SDK as the hardware
decoder doesn't provide this information
| |||||||||||
Return the bitrate for the variant indicated in the index parameter
| |||||||||||
Get the number of available bitrates for the loaded stream
| |||||||||||
For multibirate streams, get the number of times the control has switched down
| |||||||||||
For multibirate streams, get the number of times the control has switched up
| |||||||||||
Get the rebuffering percentage
| |||||||||||
For the current playback, get the number of bytes loaded
| |||||||||||
Get the current bitrate of the video
| |||||||||||
Return the current segment url
| |||||||||||
Get the lenght, in seconds, of the DVR
| |||||||||||
Get the duration of the video.
| |||||||||||
This method is deprecated.
Get the encoded frames per second for the loaded stream
This method doesn't make sense in the hardware version of the SDK as the hardware
decoder doesn't provide this information
| |||||||||||
This method is deprecated.
Get the current FPS (Frames per Second)
This method doesn't make sense in the hardware version of the SDK as the hardware
decoder doesn't provide this information
| |||||||||||
Returns the feed of the loaded stream (in case playback was launched providing a json feed)
| |||||||||||
Return the fullscreen mode
| |||||||||||
Return the index for the bitrate indicated in the bitrate parameter
| |||||||||||
Returns the last error code that happens during the playback
| |||||||||||
Get error code of the last http request
| |||||||||||
Returns the last measured bandwidth
| |||||||||||
Get the PTS of the last packet read by the decoder
| |||||||||||
Returns the expiration date of the set license
| |||||||||||
Returns the package name for which the set license is valid
| |||||||||||
Computes the coordinates of this view on the screen
| |||||||||||
Return the current playback position in the DVR
| |||||||||||
Gets the progress bar control that is shown whenever the player is doing a buffering/loading operation
| |||||||||||
Get the protocol of the current loaded stream
| |||||||||||
Get the total time the player has been rebuffering
| |||||||||||
Get the rebuffering times
| |||||||||||
Get the Server Ip of the current loaded stream
| |||||||||||
Get the Server port for the current loaded stream
| |||||||||||
Returns the url of the loaded stream
| |||||||||||
Return information about the streams
| |||||||||||
Return the current playback position
| |||||||||||
Return the current playback position
| |||||||||||
Return the current playback position in milliseconds
| |||||||||||
Get extended information about the SDK version
| |||||||||||
Get the height of the video
| |||||||||||
Get the width of the video
| |||||||||||
Return true if the current bitrate is an audio only stream
| |||||||||||
Method used for knowing if a specific bitrate of the stream that is being played is compatible
with the device.
| |||||||||||
Check whether there was an error
| |||||||||||
Check whether the current playback has finished
| |||||||||||
Return true if the player is in fullscreenmode
| |||||||||||
Get information about the status of the SDK license
| |||||||||||
Return true when playing a live stream
| |||||||||||
Check whether VideoPlayerView control is in pause
| |||||||||||
Return true if playback was interrupted by any of the Android SDK plugins
| |||||||||||
Check whether VideoPlayerView control is playing
| |||||||||||
Return true if playback is being automatically restarted after an activity resume.
| |||||||||||
Check whether VideoPlayerView control is doing a seeking operation
| |||||||||||
Pause playback
| |||||||||||
Play an audio only stream given the stream Url
| |||||||||||
Play an audio only stream given the stream URL, starting at the specified position in seconds
| |||||||||||
Play a stream given a JSON feed string.
| |||||||||||
Play a stream given a feed url.
| |||||||||||
Play a stream given the stream Url
| |||||||||||
Play a stream given the stream URL, starting at the specified position in seconds
| |||||||||||
Resume playback
| |||||||||||
Seek to the specified time position
| |||||||||||
Seek to the live position.
| |||||||||||
This method is deprecated.
Enable/disable the adjustment of timestamps in case of misalignment detected
This method doesn't make sense in the hardware version of the SDK. Hardware decoder needs the
timestamps to be fully aligned so this feature is always enabled
| |||||||||||
Combined with setHLSStartingAlgorithm(VideoPlayerView.HLS_STARTING_ALGORITHM_AKAMAI)
this methods allow setting a custom value for the maximum starting bitrate (default is 300000bps)
| |||||||||||
Enable/disable auto resume feature.
| |||||||||||
This method is deprecated.
When multibitrate, deactivate/activate the use of audio only streams
This method doesn't make sense in the hardware version of the SDK as the interpretation
of the protocol is done by the hardware decoder. We are not analyzing the stream before
passing it to the decoder so we can't know if the stream is an audio only stream.
| |||||||||||
Enable/disable protection mechanism that avoids the selection
of incompatible bitrates.
| |||||||||||
Enable/disable protection mechanism that avoids the selection
of incompatible bitrates.
| |||||||||||
Set the bitrate to be played
| |||||||||||
When debugging mode is active, each time the player finish playing a stream it
sends a report to the url defined using this method.
| |||||||||||
Activate/deactivate the debug mode
| |||||||||||
This method is deprecated.
Set default audio configuration parameters. Values provided will be used whenever
the audio decoder is not able to get the real parameters of a stream
Doesn't make sense for the hardware SDK
| |||||||||||
This method is deprecated.
Disable dynamic audio feature in stream (bitrates with different audio settings: channels, sample rate).
Having different audio settings per bitrate is not recommended!
This method doesn't make sense in the hardware version of the SDK as it is
not supporting multibitrate.
| |||||||||||
This method is deprecated.
Configure the player to drop frames when needed for improving audio/video sync.
When the cpu is extremely slow, the frame drop feature is automatically turned off
to avoid the player to show a constant black screen.
The default value for this property is false
This method doesn't make sense in the hardware version of the SDK dropping frames or not
is managed internally in the hardware decoder
| |||||||||||
This method is deprecated.
Set how to manage packets that don't include timestamp
For not well encoded streams is possible that timestamp values are not correctly set. Using
this method you can configure the SDK to drop packets with wrong timestamps
This method doesn't make sense in the hardware version of the SDK. Hardware decoder needs the
timestamps to be fully aligned so this feature is always enabled
| |||||||||||
Register a callback to be invoked when any player event happens
| |||||||||||
When set to true, the format change flag is set to true for the initial segment
after a seeking operation.
| |||||||||||
When set to true, the decoding engine will use the direct OMX approach instead of the
newest MediaCodec approach.
| |||||||||||
Set fullscreen mode.
| |||||||||||
Set fullscreen mode.
| |||||||||||
Sets the algorithm used for selecting the initial bitrate of the playback
| |||||||||||
When set to true, multiple seeks in a row are blocked by the SDK to protect
from a hardware interface crash failure occurring for specific streams
Default value: false
Note: only for Hardware Advanced decoding mode
| |||||||||||
Set the video starting position
| |||||||||||
Set the Android SDK license.
| |||||||||||
Enable/Disable log traces
| |||||||||||
This method is deprecated.
Sets the manual switching mode
| |||||||||||
Set the maximum bitrate to be played
| |||||||||||
Sets the Media Analytics config url
To use Media Analytics the application must enabled the following permissions
- android.permission.INTERNET
- android.permission.ACCESS_NETWORK_STATE
- android.permission.READ_PHONE_STATE
- android.permission.ACCESS_WIFI_STATE
| |||||||||||
Report Media Analytics custom dimension in the player
| |||||||||||
Set Media Analytics Diagnostics Viewer Id.
| |||||||||||
Set Media Analytics Viewer Id
| |||||||||||
Enable/Disable client side delivery
| |||||||||||
Sets the progress bar control that should be shown whenever the player is doing a buffering/loading operation
| |||||||||||
This method is deprecated.
Set the rebuffering mode. By default its value is manual. In automatic mode the buffer size is managed
by the player control trying to get the shortest startup time and minimizing the rebuffer times
| |||||||||||
This method is deprecated.
Set the rebuffering buffer size
| |||||||||||
Set index of the bitrate to be used when playback start
| |||||||||||
This method is deprecated.
Enable/Disable the use of an initial buffer used for starting playback
If enabled, playback won't start until the initial buffer is full. The size of the buffer can be defined
using the method setRebufferingSize.
This method doesn't make sense in the hardware version of the SDK as the buffer size is managed internally by
the Android hardware decoders
| |||||||||||
This method is deprecated.
Enable/disable the use of multi threading decoding
| |||||||||||
This method is deprecated.
Set the video quality. By default its value is "Low"
This method doesn't make sense in the hardware version of the SDK as hardware decoder
always works with the maximum quality, without possibility of configuration
| |||||||||||
Stop playback
| |||||||||||
Ask the player to switch to the lower bitrate
| |||||||||||
Ask the player to switch to the upper bitrate
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructor
context | Activity context |
---|
Constructor
context | Activity context |
---|---|
attrs | Attributes |
Constructor
context | Activity context |
---|---|
attrs | Attributes |
defStyle | Control Style |
Get the about text. You have to include this text in the About option of your application
This method is deprecated.
Clears the screen render buffer. Only compatible with software decoding
Clears the screen render buffer. Only compatible with software decoding.
This method is deprecated.
For the current playback, get the average FPS (Frames per Second)
This method doesn't make sense in the hardware version of the SDK as the hardware
decoder doesn't provide this information
For the current playback, get the average FPS (Frames per Second) This method doesn't make sense in the hardware version of the SDK as the hardware decoder doesn't provide this information
Return the bitrate for the variant indicated in the index parameter
index | of the bitrate |
---|
Get the number of available bitrates for the loaded stream
For multibirate streams, get the number of times the control has switched down
For multibirate streams, get the number of times the control has switched up
Get the rebuffering percentage
For the current playback, get the number of bytes loaded
Get the current bitrate of the video
Return the current segment url
Get the lenght, in seconds, of the DVR
Get the duration of the video. For a live stream the duration will be 0. This value can be assumed as valid once the player has received the event PLAYER_EVENT_TYPE_START_PLAYING.
This method is deprecated.
Get the encoded frames per second for the loaded stream
This method doesn't make sense in the hardware version of the SDK as the hardware
decoder doesn't provide this information
Get the encoded frames per second for the loaded stream This method is not supported on Hardware and Hardware Advanced decoding modes
This method is deprecated.
Get the current FPS (Frames per Second)
This method doesn't make sense in the hardware version of the SDK as the hardware
decoder doesn't provide this information
Get the current FPS (Frames per Second)
Returns the feed of the loaded stream (in case playback was launched providing a json feed)
Return the fullscreen mode
Return the index for the bitrate indicated in the bitrate parameter
Returns the last error code that happens during the playback
Get error code of the last http request
Returns the last measured bandwidth
Get the PTS of the last packet read by the decoder
Returns the expiration date of the set license
Returns the package name for which the set license is valid
Computes the coordinates of this view on the screen
Return the current playback position in the DVR
Gets the progress bar control that is shown whenever the player is doing a buffering/loading operation
Get the protocol of the current loaded stream
Get the total time the player has been rebuffering
Get the rebuffering times
Get the Server Ip of the current loaded stream
Get the Server port for the current loaded stream
Returns the url of the loaded stream
Return information about the streams
Return the current playback position
Return the current playback position
Return the current playback position in milliseconds
Get extended information about the SDK version
Get the height of the video
Get the width of the video
Return true if the current bitrate is an audio only stream
Method used for knowing if a specific bitrate of the stream that is being played is compatible with the device.
iBitrateIndex | Zero based index of the bitrate to check. |
---|
Check whether there was an error
Check whether the current playback has finished
Return true if the player is in fullscreenmode
Get information about the status of the SDK license
Return true when playing a live stream
Check whether VideoPlayerView control is in pause
Return true if playback was interrupted by any of the Android SDK plugins
Check whether VideoPlayerView control is playing
Return true if playback is being automatically restarted after an activity resume. This property is set to false once the event PLAYER_EVENT_TYPE_LOAD_REQUESTED is launched
Check whether VideoPlayerView control is doing a seeking operation
Pause playback
Play an audio only stream given the stream Url
sInUrl | Url of the stream to play |
---|
Play an audio only stream given the stream URL, starting at the specified position in seconds
sInUrl | Url of the stream to play |
---|---|
position | Start position in seconds |
Play a stream given a JSON feed string. Feed format supported is JSON type data with the format defined by Akamai Media Player. Example: http://projects.mediadev.edgesuite.net/customers/akamai/mdt-html5-core/premier/1.0.0008/resources/feeds/vod-feed.json
sJsonData | JSON string |
---|
Play a stream given a feed url. Feed format supported is JSON type data with the format defined by Akamai Media Player. Example: http://projects.mediadev.edgesuite.net/customers/akamai/mdt-html5-core/premier/1.0.0008/resources/feeds/vod-feed.json
sInUrl | URL of the feed to play |
---|
Play a stream given the stream Url
sInUrl | Url of the stream to play |
---|
Play a stream given the stream URL, starting at the specified position in seconds
sInUrl | URL of the stream to play |
---|---|
position | Start position in seconds |
Resume playback
Seek to the specified time position
iInNewPos | The offset in seconds from the start to seek to. It can be 0 to do a relative seek |
---|---|
iInRelPos | The offset in seconds from the current position to seek to. It can be 0 to do an absolute seek |
Seek to the live position. Only valid for live streams
This method is deprecated.
Enable/disable the adjustment of timestamps in case of misalignment detected
This method doesn't make sense in the hardware version of the SDK. Hardware decoder needs the
timestamps to be fully aligned so this feature is always enabled
Enable/disable the adjustment of timestamps in case of misalignment detected
Combined with setHLSStartingAlgorithm(VideoPlayerView.HLS_STARTING_ALGORITHM_AKAMAI) this methods allow setting a custom value for the maximum starting bitrate (default is 300000bps)
bitrate | in bps |
---|
Enable/disable auto resume feature. Auto resume is evaluated when playback was interrupted, in the loading phase, by a plugin. In case auto-resume is set to true, playbac will start automatically once the plugin that interrupted the loading has finishing its work.
enable | If true, auto-resume is enabled. |
---|
This method is deprecated.
When multibitrate, deactivate/activate the use of audio only streams
This method doesn't make sense in the hardware version of the SDK as the interpretation
of the protocol is done by the hardware decoder. We are not analyzing the stream before
passing it to the decoder so we can't know if the stream is an audio only stream.
When multibitrate, deactivate/activate the use of audio only streams This method doesn't make sense in the hardware version of the SDK as the interpretation of the protocol is done by the hardware decoder. We are not analyzing the stream before passing it to the decoder so we can't know if the stream is an audio only stream.
bInValue | If true, audio only streams will not be used for mbr streams |
---|
Enable/disable protection mechanism that avoids the selection of incompatible bitrates. When using hardware decoding method avoid the player to select any bitrate whose profile is not compatible with the H.264 hardware decoder.
bInValue | If true, enable protection that avoids selection of bitrates using H.264 profiles incompatible with the device. |
---|
Enable/disable protection mechanism that avoids the selection of incompatible bitrates. When using hardware decoding method avoid the player to select any bitrate whose video resolution is not compatible with the device screen resolution. Rule applied by the SDK is based on Android encoding recommendations. What Android SDK is doing is not allowing resolutions bigger than 800x600 when the screen of the device doesn't have high density.
bInValue | If true, enable protection that avoids selection of bitrates whose profile is higher than the device screen reslution. |
---|
Set the bitrate to be played
Exception |
---|
When debugging mode is active, each time the player finish playing a stream it sends a report to the url defined using this method. The url parameter allows three variables: %DEVICEID %TIME %ERRORCODE For example, url: http://debug.android.testing.com/postDebug.php?id=%DEVICEID&time=%TIME&error=%ERRORCODE
value | Url to send the debugging files |
---|
Activate/deactivate the debug mode
value | When true, the player sends debug files to a remote server after each playback |
---|
This method is deprecated.
Set default audio configuration parameters. Values provided will be used whenever
the audio decoder is not able to get the real parameters of a stream
Doesn't make sense for the hardware SDK
Set default audio configuration parameters. Values provided will be used whenever the audio decoder is not able to get the real parameters of a stream Doesn't make sense for the Android SDK hardware version
sample_rate | Audio stream sample rate |
---|---|
channels | Number of channels of the audio stream |
This method is deprecated.
Disable dynamic audio feature in stream (bitrates with different audio settings: channels, sample rate).
Having different audio settings per bitrate is not recommended!
This method doesn't make sense in the hardware version of the SDK as it is
not supporting multibitrate.
Disable dynamic audio feature in stream (bitrates with different audio settings: channels, sample rate). Having different audio settings per bitrate is not recommended.
This method is deprecated.
Configure the player to drop frames when needed for improving audio/video sync.
When the cpu is extremely slow, the frame drop feature is automatically turned off
to avoid the player to show a constant black screen.
The default value for this property is false
This method doesn't make sense in the hardware version of the SDK dropping frames or not
is managed internally in the hardware decoder
Configure the player to drop frames when needed for improving audio/video sync. When the CPU is extremely slow, the frame drop feature is automatically turned off to avoid the player to show a constant black screen. The default value for this property is false This method doesn't make sense in the hardware version of the SDK dropping frames or not is managed internally in the hardware decoder
value | When true, player will drop frames to sync audio/video |
---|
This method is deprecated.
Set how to manage packets that don't include timestamp
For not well encoded streams is possible that timestamp values are not correctly set. Using
this method you can configure the SDK to drop packets with wrong timestamps
This method doesn't make sense in the hardware version of the SDK. Hardware decoder needs the
timestamps to be fully aligned so this feature is always enabled
Set how to manage packets that don't include timestamp For not well encoded streams is possible that timestamp values are not correctly set. Using this method you can configure the SDK to drop packets with wrong timestamps
Register a callback to be invoked when any player event happens
When set to true, the format change flag is set to true for the initial segment after a seeking operation. This reduces the "ghosting" effect seen on different devices when the stream keyframe interval is not aligned with the size of the segments. NOTE: only Android devices from 4.0.0 to 4.0.4 are affected, except if setForceOMXdecoding() is set to true. Default value: false Note: only for Hardware Advanced decoding mode
value | True to force format change flag after every seeking operation |
---|
When set to true, the decoding engine will use the direct OMX approach instead of the newest MediaCodec approach. Useful for old Android 4.x devices not correctly supporting MediaCodec Default value: false Note: only for Hardware Advanced decoding mode Note: not compatible with audio-only streams (playAudioUrl)
value | True to force OMX approach |
---|
Set fullscreen mode. Fullscreen mode keeps the aspect ratio
Set fullscreen mode.
mode | Fullscreen mode |
---|
Sets the algorithm used for selecting the initial bitrate of the playback
When set to true, multiple seeks in a row are blocked by the SDK to protect from a hardware interface crash failure occurring for specific streams Default value: false Note: only for Hardware Advanced decoding mode
value | True to enable protection |
---|
Set the video starting position
iInNewPos | The offset in seconds from the start to seek to. It can be 0 to do a relative seek |
---|
Set the Android SDK license. Please, be sure you call this method before trying to play any video. Otherwise you will be using the Android SDK in trial mode (playback time limited).
Enable/Disable log traces
value | If true, log traces are enabled. |
---|
This method is deprecated.
Sets the manual switching mode
Sets the manual switching mode
bInValue | if true, the control switch to manual mode and the bitrate selection algorithm is not used |
---|
Set the maximum bitrate to be played
iMaxBitrate | Max bitrate to play |
---|
Sets the Media Analytics config url To use Media Analytics the application must enabled the following permissions - android.permission.INTERNET - android.permission.ACCESS_NETWORK_STATE - android.permission.READ_PHONE_STATE - android.permission.ACCESS_WIFI_STATE
Report Media Analytics custom dimension in the player
Set Media Analytics Diagnostics Viewer Id. Needed for Viewer diagnostics
Set Media Analytics Viewer Id
Enable/Disable client side delivery
mode | NetSession mode. |
---|
Sets the progress bar control that should be shown whenever the player is doing a buffering/loading operation
progressBar | Progress Bar control |
---|
This method is deprecated.
Set the rebuffering mode. By default its value is manual. In automatic mode the buffer size is managed
by the player control trying to get the shortest startup time and minimizing the rebuffer times
Set the rebuffering mode. By default its value is manual. In automatic mode the buffer size is managed by the player control trying to get the shortest startup time and minimizing the rebuffer times
iInMode | Rebuffering mode value. |
---|
This method is deprecated.
Set the rebuffering buffer size
Set the rebuffering buffer size
iInRebufferSize | Buffer size in bytes. |
---|
Set index of the bitrate to be used when playback start
This method is deprecated.
Enable/Disable the use of an initial buffer used for starting playback
If enabled, playback won't start until the initial buffer is full. The size of the buffer can be defined
using the method setRebufferingSize.
This method doesn't make sense in the hardware version of the SDK as the buffer size is managed internally by
the Android hardware decoders
Enable/Disable the use of an initial buffer used for starting playback If enabled, playback won't start until the initial buffer is full. The size of the buffer can be defined using the method setRebufferingSize. This method doesn't make sense in the hardware version of the SDK as the buffer size is managed internally by the Android hardware decoders
value | If true, log initial buffering is enabled. |
---|
This method is deprecated.
Enable/disable the use of multi threading decoding
Enable/disable the use of multi threading decoding
This method is deprecated.
Set the video quality. By default its value is "Low"
This method doesn't make sense in the hardware version of the SDK as hardware decoder
always works with the maximum quality, without possibility of configuration
Set the video quality. By default its value is "Low" This method doesn't make sense in the hardware version of the SDK as hardware decoder always works with the maximum quality, without possibility of configuration
iInQuality | Video quality |
---|
Stop playback
Ask the player to switch to the lower bitrate
Exception |
---|
Ask the player to switch to the upper bitrate
Exception |
---|