java.lang.Object | ||
↳ | GLSurfaceView | |
↳ | com.akamai.media.VideoPlayerViewSoftware |
Video player user control that uses software decoding
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor
| |||||||||||
Constructor
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get the about text.
| |||||||||||
Capture the current frame during the playback
| |||||||||||
Clears the screen render buffer.
| |||||||||||
For the current playback, get the average FPS (Frames per Second)
| |||||||||||
Return the bitrate (bps) for the variant indicated in the index parameter
| |||||||||||
Get the number of available bitrate indexes 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
| |||||||||||
Get the lenght, in seconds, of the DVR
| |||||||||||
Get the duration of the video.
| |||||||||||
Get the encoded frames per second for the loaded stream
| |||||||||||
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 (bps)
| |||||||||||
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.
| |||||||||||
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)
| |||||||||||
Enable/disable auto resume feature.
| |||||||||||
When multibitrate, deactivate/activate the use of audio only streams
| |||||||||||
This method is deprecated.
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.
This method doesn't make sense for software decoding.
| |||||||||||
This method is deprecated.
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 higher than the device screen resolution.
This method doesn't make sense for software decoding.
| |||||||||||
In manual switching mode, set the maximum bitrate to be used during the playback.
| |||||||||||
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
| |||||||||||
Set default audio configuration parameters.
| |||||||||||
Disable dynamic audio feature in stream (bitrates with different audio settings: channels, sample rate).
| |||||||||||
Configure the player to drop frames when needed for improving audio/video sync.
| |||||||||||
Set how to manage packets that don't include timestamp
For not well encoded streams is possible that timestamp values are not correctly set.
| |||||||||||
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.
| |||||||||||
Set the starting algorithm used for playing HLS streams
| |||||||||||
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
| |||||||||||
Sets the manual switching mode
| |||||||||||
Limit the maximum bitrate that can be played
| |||||||||||
Set 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
| |||||||||||
Set the rebuffering mode.
| |||||||||||
Set the rebuffering buffer size
| |||||||||||
Set index of the bitrate to be used when playback start
| |||||||||||
Enable/Disable the use of an initial buffer used for starting playback
If enabled, playback won't start until the initial buffer is full.
| |||||||||||
Enable/disable the use of multi threading decoding
| |||||||||||
Set the video quality.
| |||||||||||
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 |
Get the about text. You have to include this text in the About option of your application
Capture the current frame during the playback
iInCaptureWidth | Width to use for the captured bitmap |
---|---|
iInCaptureHeight | Height to use for the captured bitmap |
Clears the screen render buffer. Only compatible with software decoding
For the current playback, get the average FPS (Frames per Second)
Return the bitrate (bps) for the variant indicated in the index parameter
index | of the bitrate |
---|
Get the number of available bitrate indexes 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
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.
Get the encoded frames per second for the loaded stream
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 (bps)
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. Onlu valid for live streams
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. |
---|
When multibitrate, deactivate/activate the use of audio only streams
bInValue | If true, audio only streams will not be used for mbr streams |
---|
This method is deprecated.
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.
This method doesn't make sense for software decoding.
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. |
---|
This method is deprecated.
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 higher than the device screen resolution.
This method doesn't make sense for software decoding.
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 higher than the device screen resolution.
bInValue | If true, enable protection that avoids selection of bitrates whose profile is higher than the device screen reslution. |
---|
In manual switching mode, set the maximum bitrate to be used during the playback. The bitrate to be played will be the one inmediately below or equal than the indicated in the parameter bitrate
bitrate | bitrate to play |
---|
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 |
---|
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
sample_rate | Audio stream sample rate |
---|---|
channels | Number of channels of the audio stream |
Disable dynamic audio feature in stream (bitrates with different audio settings: channels, sample rate). Having different audio settings per bitrate is not recommended!
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
value | When true, player will drop frames to sync audio/video |
---|
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
oInPlayer | The callback that will be run |
---|
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
bInFullScreen | If true, switch the player to fullsreen mode. Otherwise, set non-fullscreen mode |
---|
Set fullscreen mode.
mode | Fullscreen mode |
---|
Set the starting algorithm used for playing HLS streams
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. |
---|
Sets the manual switching mode
bInValue | if true, the control switch to manual mode and the bitrate selection algorithm is not used |
---|
Limit the maximum bitrate that can be played
bitrate | Max bitrate to play |
---|
Set 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
key | Key of the data to set |
---|---|
value | Value of the data to set |
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 |
---|
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. |
---|
Set the rebuffering buffer size
iInRebufferSize | Buffer size in bytes. |
---|
Set index of the bitrate to be used when playback start
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
value | If true, log initial buffering is enabled. |
---|
Enable/disable the use of multi threading decoding
Set the video quality. By default its value is "Low"
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 |
---|