Android Programming Press on the image to return to the main documentation page.

ExoPlayer

List of types:

SimpleExoPlayer
SimpleExoPlayerView

SimpleExoPlayer

An advanced audio and video player. It supports more formats than MediaPlayer.
Can be used together with SimpleExoPlayerView.
Should be a process global variable.

Permissions:

android.permission.INTERNET

Events:

Complete
Error (Message As String)
Ready
TrackChanged

Members:


  CreateDashSource (Uri As String) As Object

  CreateFileSource (Dir As String, FileName As String) As Object

  CreateHLSSource (Uri As String) As Object

  CreateListSource (Sources As List) As Object

  CreateLoopSource (Source As Object, Count As Int) As Object

  CreateSmoothStreamingSource (Uri As String) As Object

  CreateUriSource (Uri As String) As Object

  CurrentWindowIndex As Int [read only]

  Duration As Long [read only]

  Initialize (EventName As String)

  Pause

  Play

  Position As Long

  Prepare (Source As Object)

  Release

  Volume As Float

Members description:

CreateDashSource (Uri As String) As Object
Creates a Dash (Dynamic Adaptive Streaming over Http) source.
CreateFileSource (Dir As String, FileName As String) As Object
Creates a local file source.
CreateHLSSource (Uri As String) As Object
Creates a HLS (Http live streaming) source.
CreateListSource (Sources As List) As Object
Concatenates multiple sources.
CreateLoopSource (Source As Object, Count As Int) As Object
Creates a loop source. The child source will be played multiple times.
Pass -1 to play it indefinitely.
CreateSmoothStreamingSource (Uri As String) As Object
Creates a Smooth Streaming source.
CreateUriSource (Uri As String) As Object
Creates a Uri source for non-streaming media resources.
CurrentWindowIndex As Int [read only]
Returns the index of the window currently played.
Duration As Long [read only]
Returns the resource duration (in milliseconds).
Initialize (EventName As String)
Initializes the player.
Pause
Pauses the playback.
Play
Starts or resumes playback. If the source is currently loading then it will starting playing when ready.
Position As Long
Gets or sets the current position (in milliseconds). Note that the Ready event will be raised after this call.
Prepare (Source As Object)
Prepares the media source. The Ready event will be raised when the playback is ready. You can call play immediately after calling this method.
Release
Releases the player resources. The player needs to be initialized again before it can be used.
Volume As Float
Gets or sets the volume (0 - 1).

SimpleExoPlayerView

A player interface. Should be added as a custom view with the designer.
The Player property must be set.

Events:

None

Members:


  Background As android.graphics.drawable.Drawable

  BringToFront

  Color As Int [write only]

  ControllerTimeout As Int

  DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)

  Enabled As Boolean

  Height As Int

  Initialize (arg1 As String)

  Invalidate

  Invalidate2 (arg0 As android.graphics.Rect)

  Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)

  IsInitialized As Boolean

  Left As Int

  Padding() As Int

  Parent As Object [read only]

  Player As SimpleExoPlayer [write only]

  RemoveView

  RequestFocus As Boolean

  ResizeMode As String [write only]

  SendToBack

  SetBackgroundImage (arg0 As android.graphics.Bitmap) As BitmapDrawable

  SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)

  SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)

  SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)

  SetVisibleAnimated (arg0 As Int, arg1 As Boolean)

  Tag As Object

  Top As Int

  UseController As Boolean

  Visible As Boolean

  Width As Int

Members description:

Background As android.graphics.drawable.Drawable
BringToFront
Color As Int [write only]
ControllerTimeout As Int
Gets or sets the controller timeout (measured in milliseconds). The control will disappear after the set period.
Pass -1 to show it indefintely.
DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
Enabled As Boolean
Height As Int
Initialize (arg1 As String)
Invalidate
Invalidate2 (arg0 As android.graphics.Rect)
Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
IsInitialized As Boolean
Left As Int
Padding() As Int
Parent As Object [read only]
Player As SimpleExoPlayer [write only]
Sets the player engine.
RemoveView
RequestFocus As Boolean
ResizeMode As String [write only]
Sets the resize mode. Possible values: FIT, FIXED_HEIGHT or FIXED_WIDTH
SendToBack
SetBackgroundImage (arg0 As android.graphics.Bitmap) As BitmapDrawable
SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
Tag As Object
Top As Int
UseController As Boolean
Enables or disables the controller.
Visible As Boolean
Width As Int

Top