public class

VideoPlayerContainer

extends FrameLayout
java.lang.Object
   ↳ FrameLayout
     ↳ com.akamai.media.VideoPlayerContainer

Class Overview

VideoPlayerView container. User control to be added to the Android layout. Depending on the decoding method selected by the application, this control will instantiate one user control or other.

Summary

Constants
int MODE_AUTOMATIC Automatic mode: - For Android 4.0 and above devices: Hardware Advanced - For Android 3.x and below: If device CPU is multicore: Software mode If device CPU is singlecore: Hardware mode
int MODE_HARDWARE Hardware decoding mode.
int MODE_HARDWARE_ADVANCED Hardware Advanced decoding mode.
int MODE_NATIVE_BASIC Native basic decoding mode.
int MODE_NONE Internal only
int MODE_SOFTWARE Software decoding mode.
Public Constructors
VideoPlayerContainer(Context context)
Constructor of the class
VideoPlayerContainer(Context context, AttributeSet attrs)
Constructor of the class
Public Methods
VideoPlayerView getAudioPlayer()
Gets a reference to the VideoPlayerView object used for playing an audio-only stream
int getMode()
Returns the current decoding mode.
VideoPlayerView getVideoPlayer()
Gets a reference to the VideoPlayerView object used for playing the video
void loadConfig(AMPConfig config)
void setMode(int mode)
Sets the decoding method.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int MODE_AUTOMATIC

Automatic mode: - For Android 4.0 and above devices: Hardware Advanced - For Android 3.x and below: If device CPU is multicore: Software mode If device CPU is singlecore: Hardware mode

Constant Value: 10 (0x0000000a)

public static final int MODE_HARDWARE

Hardware decoding mode. Compatible with Android 1.6 and above.

Constant Value: 2 (0x00000002)

public static final int MODE_HARDWARE_ADVANCED

Hardware Advanced decoding mode. Compatible and recommeded for Android 4.0 and above.

Constant Value: 3 (0x00000003)

public static final int MODE_NATIVE_BASIC

Native basic decoding mode. Media is managed by the native player of the device.

Constant Value: 4 (0x00000004)

public static final int MODE_NONE

Internal only

Constant Value: 0 (0x00000000)

public static final int MODE_SOFTWARE

Software decoding mode. Compatible with Android 1.6 and above.

Constant Value: 1 (0x00000001)

Public Constructors

public VideoPlayerContainer (Context context)

Constructor of the class

Parameters
context Context of the application

public VideoPlayerContainer (Context context, AttributeSet attrs)

Constructor of the class

Parameters
context Context of the application
attrs Attributes

Public Methods

public VideoPlayerView getAudioPlayer ()

Gets a reference to the VideoPlayerView object used for playing an audio-only stream

Returns
  • VideoPlayerView object instantiate inside this container

public int getMode ()

Returns the current decoding mode.

Returns
  • Current decoding mode.

public VideoPlayerView getVideoPlayer ()

Gets a reference to the VideoPlayerView object used for playing the video

Returns
  • VideoPlayerView object instantiate inside this container

public void loadConfig (AMPConfig config)

public void setMode (int mode)

Sets the decoding method. Possible options are: - MODE_SOFTWARE. The control will use software based codecs for decoding the video/audio. - MODE_HARDWARE. The control will use H.264/AAC decoding hardware that is present in the Android device. - MODE_HARDWARE_ADVANCED. Better performance hardware decoding mode for Android devices 4.0 and above. - MODE_NATIVE_BASIC. This mode uses the internal media player of the Android device. - MODE_AUTOMATIC. The control will choose the decoding mode based on: - For Android 4.0 and above devices: Hardware Advanced - For Android 3.x and below: If device CPU is multicore: Software mode If device CPU is singlecore: Hardware mode