public class VideoPlayerViewHardware extends SurfaceView implements VideoPlayerView, AMPFeedLoader.AMPFeedLoaderListener
DROP_WRONG_TIMESTAMP_PACKETS_ALWAYS, DROP_WRONG_TIMESTAMP_PACKETS_NEVER, DROP_WRONG_TIMESTAMP_PACKETS_ONLY_VOD, ERROR_FORMAT_UNKNOWN, ERROR_NETWORK_RESOURCE_DONT_EXIST, ERROR_NETWORK_SECURITY_ISSUE, ERROR_NETWORK_UNAVAILABLE, ERROR_RESOURCES_ISSUE, ERROR_SUCCESS, ERROR_TS_SEGMENT_INVALID, FULLSCREEN_MODE_KEEP_ASPECT_RATIO, FULLSCREEN_MODE_NONE, FULLSCREEN_MODE_TOTAL, HLS_STARTING_ALGORITHM_AKAMAI, HLS_STARTING_ALGORITHM_APPLE, MEDIA_REBUFFERING_MODE_AUTOMATIC, MEDIA_REBUFFERING_MODE_MANUAL, MEDIA_VIDEO_QUALITY_AUTO, MEDIA_VIDEO_QUALITY_HIGH, MEDIA_VIDEO_QUALITY_LOW, MEDIA_VIDEO_QUALITY_MEDIUM, NETSESSION_MODE_ALLOWED, NETSESSION_MODE_DISABLED, NETSESSION_MODE_REQUIRED, VERSION
Constructor and Description |
---|
VideoPlayerViewHardware(Context context)
Constructor
|
VideoPlayerViewHardware(Context context,
AttributeSet attrs)
Constructor
|
VideoPlayerViewHardware(Context context,
AttributeSet attrs,
int defStyle)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
about()
Get the about text.
|
void |
clearRenderBuffer()
Deprecated.
Clears the screen render buffer. Only compatible with software decoding
|
void |
feedLoaded(AMPFeed feed) |
long |
getAvgFPS()
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
|
int |
getBitrateByIndex(int index)
Return the bitrate for the variant indicated in the index parameter
|
int |
getBitratesCount()
Get the number of available bitrates for the loaded stream
|
int |
getBitratesSwitchesDown()
For multibirate streams, get the number of times the control has switched down
|
int |
getBitratesSwitchesUp()
For multibirate streams, get the number of times the control has switched up
|
int |
getBufferingPercentage()
Get the rebuffering percentage
|
long |
getBytesLoaded()
For the current playback, get the number of bytes loaded
|
long |
getCurrentBitrate()
Get the current bitrate of the video
|
java.lang.String |
getCurrentSegmentUrl()
Return the current segment url
|
int |
getDuration()
Get the duration of the video.
|
long |
getDVRLength()
Get the lenght, in seconds, of the DVR
|
double |
getEncodedFPS()
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
|
AMPFeed |
getFeed()
Returns the feed of the loaded stream (in case playback was launched providing a json feed)
|
long |
getFPS()
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
|
int |
getFullScreenMode()
Return the fullscreen mode
|
int |
getIndexByBitrate(int bitrate)
Return the index for the bitrate indicated in the bitrate parameter
|
int |
getLastErrorCode()
Returns the last error code that happens during the playback
|
int |
getLastHttpErrorCode()
Get error code of the last http request
|
int |
getLastMeasuredBandwidth()
Returns the last measured bandwidth
|
long |
getLastPTS()
Get the PTS of the last packet read by the decoder
|
java.util.Date |
getLicenseExpirationDate()
Returns the expiration date of the set license
|
java.lang.String |
getLicensePackageName()
Returns the package name for which the set license is valid
|
int[] |
getLocationOnScreen()
Computes the coordinates of this view on the screen
|
int |
getPositionInDVR()
Return the current playback position in the DVR
|
View |
getProgressBarControl()
Gets the progress bar control that is shown whenever the player is doing a buffering/loading operation
|
java.lang.String |
getProtocol()
Get the protocol of the current loaded stream
|
double |
getRebufferingTime()
Get the total time the player has been rebuffering
|
int |
getRebuffers()
Get the rebuffering times
|
java.lang.String |
getServerIp()
Get the Server Ip of the current loaded stream
|
int |
getServerPort()
Get the Server port for the current loaded stream
|
java.lang.String |
getStreamsInfo()
Return information about the streams
|
java.lang.String |
getStreamUrl()
Returns the url of the loaded stream
|
int |
getTimePosition()
Return the current playback position
|
java.util.Date |
getTimePositionAsDate()
Return the current playback position
|
long |
getTimePositionMS()
Return the current playback position in milliseconds
|
java.lang.String |
getVersionDescription()
Get extended information about the SDK version
|
int |
getVideoHeight()
Get the height of the video
|
int |
getVideoWidth()
Get the width of the video
|
boolean |
isAudioOnly()
Return true if the current bitrate is an audio only stream
|
java.lang.Boolean |
isBitrateSupported(int iBitrateIndex)
Method used for knowing if a specific bitrate of the stream that is being played is compatible
with the device.
|
boolean |
isError()
Check whether there was an error
|
boolean |
isFinished()
Check whether the current playback has finished
|
boolean |
isFullScreen()
Return true if the player is in fullscreenmode
|
boolean |
isLicenseExpired()
Get information about the status of the SDK license
|
boolean |
isLive()
Return true when playing a live stream
|
boolean |
isPaused()
Check whether VideoPlayerView control is in pause
|
boolean |
isPlaybackProcessInterrupted()
Return true if playback was interrupted by any of the Android SDK plugins
|
boolean |
isPlaying()
Check whether VideoPlayerView control is playing
|
boolean |
isResumingAfterActivityResume()
Return true if playback is being automatically restarted after an activity resume.
|
boolean |
isSeeking()
Check whether VideoPlayerView control is doing a seeking operation
|
void |
onBufferingUpdate(MediaPlayer mp,
int percent) |
void |
onCompletion(MediaPlayer mp) |
void |
onDestroy() |
protected void |
onDetachedFromWindow() |
boolean |
onError(MediaPlayer mp,
int what,
int extra) |
boolean |
onInfo(MediaPlayer mp,
int what,
int extra) |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
void |
onPause() |
void |
onPrepared(MediaPlayer arg0) |
void |
onResume() |
void |
onSegmentProgress(java.lang.String segmentUrl,
int segmentOffset) |
boolean |
onTouchEvent(MotionEvent ev) |
void |
onVideoSizeChanged(MediaPlayer mp,
int width,
int height) |
void |
pause()
Pause playback
|
void |
playAudioUrl(java.lang.String sInUrl)
Play an audio only stream given the stream Url
|
void |
playAudioUrl(java.lang.String sInUrl,
int position)
Play an audio only stream given the stream URL, starting at the specified position in seconds
|
void |
playFeedFromJson(java.lang.String sJsonData)
Play a stream given a JSON feed string.
|
void |
playFeedFromUrl(java.lang.String sInUrl)
Play a stream given a feed url.
|
void |
playUrl(java.lang.String sInUrl)
Play a stream given the stream Url
|
void |
playUrl(java.lang.String sInUrl,
int position)
Play a stream given the stream URL, starting at the specified position in seconds
|
void |
requestPositionFromService() |
void |
resume()
Resume playback
|
void |
seek(int iInNewPos,
int iInRelPos)
Seek to the specified time position
|
void |
seekToLive()
Seek to the live position.
|
void |
setAdjustTimestamps(boolean adjust)
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
|
void |
setAkamaiAlgorithmValue(int bitrate)
Combined with setHLSStartingAlgorithm(VideoPlayerView.HLS_STARTING_ALGORITHM_AKAMAI)
this methods allow setting a custom value for the maximum starting bitrate (default is 300000bps)
|
void |
setAutoResume(boolean enable)
Enable/disable auto resume feature.
|
void |
setAvoidAudioOnlyStreams(boolean bInValue)
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.
|
void |
setAvoidIncompatibleVideoProfiles(boolean bInValue)
Enable/disable protection mechanism that avoids the selection
of incompatible bitrates.
|
void |
setAvoidIncompatibleVideoResolutions(boolean bInValue)
Enable/disable protection mechanism that avoids the selection
of incompatible bitrates.
|
void |
setBackgroundColor(int color)
Sets the background color for the player itself
|
void |
setBitrateToPlay(int bitrateIndex)
Set the bitrate to be played
|
void |
setDebugingActive(java.lang.Boolean value)
Activate/deactivate the debug mode
|
void |
setDebugUrl(java.lang.String value)
When debugging mode is active, each time the player finish playing a stream it
sends a report to the url defined using this method.
|
void |
setDefaultAudioConfig(int sample_rate,
int channels)
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
|
void |
setDisableDynamicAudioFeature(boolean disable)
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.
|
void |
setDropFrames(boolean value)
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
|
void |
setDropWrongTimestampPacketsMode(int mode)
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
|
void |
setEventsListener(IPlayerEventsListener player)
Register a callback to be invoked when any player event happens
|
void |
setForceFormatChange(boolean value)
When set to true, the format change flag is set to true for the initial segment
after a seeking operation.
|
void |
setForceOMXdecoding(boolean value)
When set to true, the decoding engine will use the direct OMX approach instead of the
newest MediaCodec approach.
|
void |
setFullScreen(boolean fullscreen)
Set fullscreen mode.
|
void |
setFullScreenMode(int mode)
Set fullscreen mode.
|
void |
setHardwareSeekingProtection(boolean value)
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
|
void |
setHLSStartingAlgorithm(int mode)
Sets the algorithm used for selecting the initial bitrate of the playback
|
void |
setInitialSeekingPosition(int iInNewPos)
Set the video starting position
|
void |
setLicense(java.lang.String license)
Set the Android SDK license.
|
void |
setLogEnabled(boolean value)
Enable/Disable log traces
|
void |
setManualSwitching(boolean bInValue)
Deprecated.
Sets the manual switching mode
|
void |
setMaxBitrate(int iMaxBitrate)
Set the maximum bitrate to be played
|
void |
setMediaAnalyticsConfigUrl(java.lang.String configUrl)
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
|
void |
setMediaAnalyticsData(java.lang.String key,
java.lang.String value)
Report Media Analytics custom dimension in the player
|
void |
setMediaAnalyticsViewerDiagnosticsId(java.lang.String viewerId)
Set Media Analytics Diagnostics Viewer Id.
|
void |
setMediaAnalyticsViewerId(java.lang.String viewerId)
Set Media Analytics Viewer Id
|
void |
setNetSessionMode(int mode)
Enable/Disable client side delivery
|
void |
setProgressBarControl(View progressBar)
Sets the progress bar control that should be shown whenever the player is doing a buffering/loading operation
|
void |
setRebufferingMode(int iInMode)
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
|
void |
setRebufferingSize(int iInRebufferSize)
Deprecated.
Set the rebuffering buffer size
|
void |
setSegmentInfoListener(ISegmentInfoListener segInfoListener) |
void |
setStartingBitrateIndex(int iIndex)
Set index of the bitrate to be used when playback start
|
void |
setUseBufferingWhenStarting(boolean value)
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
|
void |
setUseMultiThread(boolean value)
Deprecated.
Enable/disable the use of multi threading decoding
|
void |
setVideoQuality(int iInQuality)
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
|
void |
stop()
Stop playback
|
void |
surfaceChanged(SurfaceHolder holder,
int format,
int width,
int height) |
void |
surfaceCreated(SurfaceHolder holder) |
void |
surfaceDestroyed(SurfaceHolder holder) |
void |
switchBitrateDown()
Ask the player to switch to the lower bitrate
|
void |
switchBitrateUp()
Ask the player to switch to the upper bitrate
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHeight, getWidth
public VideoPlayerViewHardware(Context context, AttributeSet attrs)
context
- Activity contextattrs
- Attributespublic VideoPlayerViewHardware(Context context)
context
- Activity contextpublic VideoPlayerViewHardware(Context context, AttributeSet attrs, int defStyle)
context
- Activity contextattrs
- AttributesdefStyle
- Control Stylepublic void playUrl(java.lang.String sInUrl)
playUrl
in interface VideoPlayerView
sInUrl
- Url of the stream to playpublic void playUrl(java.lang.String sInUrl, int position)
playUrl
in interface VideoPlayerView
sInUrl
- URL of the stream to playposition
- Start position in secondspublic void playAudioUrl(java.lang.String sInUrl)
playAudioUrl
in interface VideoPlayerView
sInUrl
- Url of the stream to playpublic void playAudioUrl(java.lang.String sInUrl, int position)
playAudioUrl
in interface VideoPlayerView
sInUrl
- Url of the stream to playposition
- Start position in secondspublic void playFeedFromUrl(java.lang.String sInUrl)
playFeedFromUrl
in interface VideoPlayerView
sInUrl
- URL of the feed to playpublic void feedLoaded(AMPFeed feed)
feedLoaded
in interface AMPFeedLoader.AMPFeedLoaderListener
public void playFeedFromJson(java.lang.String sJsonData)
playFeedFromJson
in interface VideoPlayerView
sJsonData
- JSON stringpublic void stop()
stop
in interface VideoPlayerView
public void pause()
pause
in interface VideoPlayerView
public boolean isPlaybackProcessInterrupted()
VideoPlayerView
isPlaybackProcessInterrupted
in interface VideoPlayerView
public void resume()
resume
in interface VideoPlayerView
public void seek(int iInNewPos, int iInRelPos)
seek
in interface VideoPlayerView
iInNewPos
- The offset in seconds from the start to seek to. It can be 0 to do a relative seekiInRelPos
- The offset in seconds from the current position to seek to. It can be 0 to do an absolute seekpublic void seekToLive()
seekToLive
in interface VideoPlayerView
public void switchBitrateUp() throws java.lang.Exception
switchBitrateUp
in interface VideoPlayerView
java.lang.Exception
public void switchBitrateDown() throws java.lang.Exception
switchBitrateDown
in interface VideoPlayerView
java.lang.Exception
public void setMaxBitrate(int iMaxBitrate)
setMaxBitrate
in interface VideoPlayerView
iMaxBitrate
- Max bitrate to playpublic void setBitrateToPlay(int bitrateIndex) throws java.lang.Exception
setBitrateToPlay
in interface VideoPlayerView
Bitrate
- to playjava.lang.Exception
public void setStartingBitrateIndex(int iIndex)
setStartingBitrateIndex
in interface VideoPlayerView
index
- of the bitrate to be used when playback startpublic int getBitratesCount()
getBitratesCount
in interface VideoPlayerView
public int getBitrateByIndex(int index)
getBitrateByIndex
in interface VideoPlayerView
index
- of the bitratepublic int getIndexByBitrate(int bitrate)
getIndexByBitrate
in interface VideoPlayerView
bitrate
- public boolean isPlaying()
isPlaying
in interface VideoPlayerView
public boolean isPaused()
isPaused
in interface VideoPlayerView
public boolean isError()
isError
in interface VideoPlayerView
public boolean isFinished()
isFinished
in interface VideoPlayerView
public boolean isSeeking()
isSeeking
in interface VideoPlayerView
public boolean isAudioOnly()
isAudioOnly
in interface VideoPlayerView
public boolean isFullScreen()
isFullScreen
in interface VideoPlayerView
public boolean isLive()
isLive
in interface VideoPlayerView
public boolean isResumingAfterActivityResume()
isResumingAfterActivityResume
in interface VideoPlayerView
public int getTimePosition()
getTimePosition
in interface VideoPlayerView
public long getTimePositionMS()
getTimePositionMS
in interface VideoPlayerView
public java.util.Date getTimePositionAsDate()
getTimePositionAsDate
in interface VideoPlayerView
public int getPositionInDVR()
getPositionInDVR
in interface VideoPlayerView
public java.lang.String getCurrentSegmentUrl()
getCurrentSegmentUrl
in interface VideoPlayerView
public void requestPositionFromService()
public long getDVRLength()
getDVRLength
in interface VideoPlayerView
public void setAdjustTimestamps(boolean adjust)
VideoPlayerView
setAdjustTimestamps
in interface VideoPlayerView
adjust.
- True, to enable adjustment of timestampspublic void setDisableDynamicAudioFeature(boolean disable)
VideoPlayerView
setDisableDynamicAudioFeature
in interface VideoPlayerView
disable.
- True, to disable dynamic audio featurepublic void setDropWrongTimestampPacketsMode(int mode)
VideoPlayerView
setDropWrongTimestampPacketsMode
in interface VideoPlayerView
mode.
- public void setAutoResume(boolean enable)
VideoPlayerView
setAutoResume
in interface VideoPlayerView
enable
- If true, auto-resume is enabled.public void setProgressBarControl(View progressBar)
VideoPlayerView
setProgressBarControl
in interface VideoPlayerView
progressBar
- Progress Bar controlpublic View getProgressBarControl()
VideoPlayerView
getProgressBarControl
in interface VideoPlayerView
public void onResume()
onResume
in interface VideoPlayerView
public void onPause()
onPause
in interface VideoPlayerView
public void onDestroy()
onDestroy
in interface VideoPlayerView
public java.lang.String getStreamsInfo()
getStreamsInfo
in interface VideoPlayerView
public int getVideoWidth()
getVideoWidth
in interface VideoPlayerView
public int getVideoHeight()
getVideoHeight
in interface VideoPlayerView
public int getDuration()
getDuration
in interface VideoPlayerView
public long getCurrentBitrate()
getCurrentBitrate
in interface VideoPlayerView
public void setFullScreenMode(int mode)
setFullScreenMode
in interface VideoPlayerView
mode
- Fullscreen modepublic void setFullScreen(boolean fullscreen)
setFullScreen
in interface VideoPlayerView
fullScreen
- If true, switch the player to fullsreen mode. Otherwise, set non-fullscreen modepublic int getFullScreenMode()
getFullScreenMode
in interface VideoPlayerView
mode
- Current fullscreen modepublic int getBufferingPercentage()
getBufferingPercentage
in interface VideoPlayerView
public void setRebufferingMode(int iInMode)
VideoPlayerView
setRebufferingMode
in interface VideoPlayerView
iInMode
- Rebuffering mode value.public void setRebufferingSize(int iInRebufferSize)
VideoPlayerView
setRebufferingSize
in interface VideoPlayerView
iInRebufferSize
- Buffer size in bytes.public void setEventsListener(IPlayerEventsListener player)
setEventsListener
in interface VideoPlayerView
oInPlayer
- The callback that will be runpublic void setSegmentInfoListener(ISegmentInfoListener segInfoListener)
setSegmentInfoListener
in interface VideoPlayerView
public int getBitratesSwitchesUp()
getBitratesSwitchesUp
in interface VideoPlayerView
public int getBitratesSwitchesDown()
getBitratesSwitchesDown
in interface VideoPlayerView
public int getRebuffers()
getRebuffers
in interface VideoPlayerView
public double getRebufferingTime()
getRebufferingTime
in interface VideoPlayerView
public long getFPS()
VideoPlayerView
getFPS
in interface VideoPlayerView
public long getAvgFPS()
VideoPlayerView
getAvgFPS
in interface VideoPlayerView
public double getEncodedFPS()
VideoPlayerView
getEncodedFPS
in interface VideoPlayerView
public java.lang.String getProtocol()
getProtocol
in interface VideoPlayerView
public java.lang.String getServerIp()
getServerIp
in interface VideoPlayerView
public int getServerPort()
getServerPort
in interface VideoPlayerView
public int getLastHttpErrorCode()
getLastHttpErrorCode
in interface VideoPlayerView
public int getLastMeasuredBandwidth()
getLastMeasuredBandwidth
in interface VideoPlayerView
public void setDropFrames(boolean value)
VideoPlayerView
setDropFrames
in interface VideoPlayerView
value
- When true, player will drop frames to sync audio/videopublic void setVideoQuality(int iInQuality)
VideoPlayerView
setVideoQuality
in interface VideoPlayerView
iInQuality
- Video qualitypublic void setAvoidAudioOnlyStreams(boolean bInValue)
VideoPlayerView
setAvoidAudioOnlyStreams
in interface VideoPlayerView
bInValue
- If true, audio only streams will not be used for mbr streamspublic void setUseBufferingWhenStarting(boolean value)
VideoPlayerView
setUseBufferingWhenStarting
in interface VideoPlayerView
value
- If true, log initial buffering is enabled.public void setHLSStartingAlgorithm(int mode)
setHLSStartingAlgorithm
in interface VideoPlayerView
mode
- public void setNetSessionMode(int mode)
setNetSessionMode
in interface VideoPlayerView
mode
- NetSession mode.public void setLogEnabled(boolean value)
setLogEnabled
in interface VideoPlayerView
value
- If true, log traces are enabled.public void setUseMultiThread(boolean value)
VideoPlayerView
setUseMultiThread
in interface VideoPlayerView
if
- true, multithread decoding enabledpublic void setManualSwitching(boolean bInValue)
VideoPlayerView
setManualSwitching
in interface VideoPlayerView
bInValue
- if true, the control switch to manual mode and the bitrate selection algorithm is not usedpublic void setAvoidIncompatibleVideoProfiles(boolean bInValue)
setAvoidIncompatibleVideoProfiles
in interface VideoPlayerView
bInValue
- If true, enable protection that avoids selection of bitrates using H.264 profiles incompatible with the device.public void setAvoidIncompatibleVideoResolutions(boolean bInValue)
setAvoidIncompatibleVideoResolutions
in interface VideoPlayerView
bInValue
- If true, enable protection that avoids selection of bitrates whose profile is higher than the device screen reslution.public long getBytesLoaded()
getBytesLoaded
in interface VideoPlayerView
public java.lang.String about()
about
in interface VideoPlayerView
public void setDebugUrl(java.lang.String value)
setDebugUrl
in interface VideoPlayerView
value
- Url to send the debugging filespublic void setDebugingActive(java.lang.Boolean value)
setDebugingActive
in interface VideoPlayerView
value
- When true, the player sends debug files to a
remote server after each playbackpublic void setLicense(java.lang.String license)
setLicense
in interface VideoPlayerView
license.
- License should be provided by Akamai.public java.lang.String getLicensePackageName()
getLicensePackageName
in interface VideoPlayerView
public java.util.Date getLicenseExpirationDate()
getLicenseExpirationDate
in interface VideoPlayerView
public boolean isLicenseExpired()
isLicenseExpired
in interface VideoPlayerView
public java.lang.String getVersionDescription()
getVersionDescription
in interface VideoPlayerView
protected void onDetachedFromWindow()
public boolean onTouchEvent(MotionEvent ev)
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height)
public void surfaceCreated(SurfaceHolder holder)
public void surfaceDestroyed(SurfaceHolder holder)
public void onVideoSizeChanged(MediaPlayer mp, int width, int height)
public void onPrepared(MediaPlayer arg0)
public boolean onError(MediaPlayer mp, int what, int extra)
public boolean onInfo(MediaPlayer mp, int what, int extra)
public void onCompletion(MediaPlayer mp)
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
public void onBufferingUpdate(MediaPlayer mp, int percent)
public void setMediaAnalyticsConfigUrl(java.lang.String configUrl)
setMediaAnalyticsConfigUrl
in interface VideoPlayerView
Media
- Analytics config urlpublic void setMediaAnalyticsData(java.lang.String key, java.lang.String value)
setMediaAnalyticsData
in interface VideoPlayerView
key
- value
- public void setMediaAnalyticsViewerDiagnosticsId(java.lang.String viewerId)
setMediaAnalyticsViewerDiagnosticsId
in interface VideoPlayerView
public void setMediaAnalyticsViewerId(java.lang.String viewerId)
setMediaAnalyticsViewerId
in interface VideoPlayerView
public void setDefaultAudioConfig(int sample_rate, int channels)
VideoPlayerView
setDefaultAudioConfig
in interface VideoPlayerView
sample_rate
- Audio stream sample ratechannels
- Number of channels of the audio streampublic java.lang.String getStreamUrl()
getStreamUrl
in interface VideoPlayerView
public AMPFeed getFeed()
getFeed
in interface VideoPlayerView
public int getLastErrorCode()
getLastErrorCode
in interface VideoPlayerView
public java.lang.Boolean isBitrateSupported(int iBitrateIndex)
isBitrateSupported
in interface VideoPlayerView
iBitrateIndex
- Zero based index of the bitrate to check.public void clearRenderBuffer()
VideoPlayerView
clearRenderBuffer
in interface VideoPlayerView
public int[] getLocationOnScreen()
getLocationOnScreen
in interface VideoPlayerView
public void setInitialSeekingPosition(int iInNewPos)
VideoPlayerView
setInitialSeekingPosition
in interface VideoPlayerView
iInNewPos
- The offset in seconds from the start to seek to. It can be 0 to do a relative seekpublic long getLastPTS()
VideoPlayerView
getLastPTS
in interface VideoPlayerView
public void setForceFormatChange(boolean value)
VideoPlayerView
setForceFormatChange
in interface VideoPlayerView
value
- True to force format change flag after every seeking operationpublic void onSegmentProgress(java.lang.String segmentUrl, int segmentOffset)
onSegmentProgress
in interface VideoPlayerView
public void setHardwareSeekingProtection(boolean value)
VideoPlayerView
setHardwareSeekingProtection
in interface VideoPlayerView
value
- True to enable protectionpublic void setAkamaiAlgorithmValue(int bitrate)
VideoPlayerView
setAkamaiAlgorithmValue
in interface VideoPlayerView
bitrate
- in bpspublic void setForceOMXdecoding(boolean value)
VideoPlayerView
setForceOMXdecoding
in interface VideoPlayerView
value
- True to force OMX approachpublic void setBackgroundColor(int color)
VideoPlayerView
setBackgroundColor
in interface VideoPlayerView
color
- Color to set