AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.util.FullScreenVideoUtil Class Reference
Inheritance diagram for com.google.appinventor.components.runtime.util.FullScreenVideoUtil:

Public Member Functions

 FullScreenVideoUtil (Form form, Handler handler)
 
synchronized Bundle performAction (int action, VideoPlayer source, Object data)
 
Dialog createFullScreenVideoDialog ()
 
void prepareFullScreenVideoDialog (Dialog dia)
 
boolean dialogInitialized ()
 
boolean showing ()
 
boolean setSource (String source, boolean clearSeek)
 
void onCompletion (MediaPlayer arg0)
 
void onPrepared (MediaPlayer arg0)
 
void startDialog ()
 

Static Public Attributes

static final int FULLSCREEN_VIDEO_DIALOG_FLAG = 189
 
static final int FULLSCREEN_VIDEO_ACTION_SEEK = 190
 
static final int FULLSCREEN_VIDEO_ACTION_PLAY = 191
 
static final int FULLSCREEN_VIDEO_ACTION_PAUSE = 192
 
static final int FULLSCREEN_VIDEO_ACTION_STOP = 193
 
static final int FULLSCREEN_VIDEO_ACTION_SOURCE = 194
 
static final int FULLSCREEN_VIDEO_ACTION_FULLSCREEN = 195
 
static final int FULLSCREEN_VIDEO_ACTION_DURATION = 196
 
static final String VIDEOPLAYER_FULLSCREEN = "FullScreenKey"
 
static final String VIDEOPLAYER_PLAYING = "PlayingKey"
 
static final String VIDEOPLAYER_POSITION = "PositionKey"
 
static final String VIDEOPLAYER_SOURCE = "SourceKey"
 
static final String ACTION_SUCESS = "ActionSuccess"
 
static final String ACTION_DATA = "ActionData"
 

Detailed Description

Used by the com.google.appinventor.components.runtime.Form class to display videos in fullscreen.

Author
Vance Turnewitsch

Definition at line 39 of file FullScreenVideoUtil.java.

Constructor & Destructor Documentation

◆ FullScreenVideoUtil()

com.google.appinventor.components.runtime.util.FullScreenVideoUtil.FullScreenVideoUtil ( Form  form,
Handler  handler 
)
Parameters
formThe com.google.appinventor.components.runtime.Form that this FullScreenVideoUtil will use.
handlerA android.os.Handler created on the UI thread. Used for displaying a preview of a paused video.

Definition at line 101 of file FullScreenVideoUtil.java.

Member Function Documentation

◆ createFullScreenVideoDialog()

Dialog com.google.appinventor.components.runtime.util.FullScreenVideoUtil.createFullScreenVideoDialog ( )

Creates the dialog for displaying a fullscreen VideoView.

Returns
The created Dialog

Definition at line 283 of file FullScreenVideoUtil.java.

◆ dialogInitialized()

boolean com.google.appinventor.components.runtime.util.FullScreenVideoUtil.dialogInitialized ( )
Returns
True if the internal Dialog has been created. False otherwise.

Definition at line 349 of file FullScreenVideoUtil.java.

◆ onCompletion()

void com.google.appinventor.components.runtime.util.FullScreenVideoUtil.onCompletion ( MediaPlayer  arg0)

Called when the video has finished playing.

Definition at line 402 of file FullScreenVideoUtil.java.

◆ onPrepared()

void com.google.appinventor.components.runtime.util.FullScreenVideoUtil.onPrepared ( MediaPlayer  arg0)

Called when the video has been loaded.

Definition at line 412 of file FullScreenVideoUtil.java.

◆ performAction()

synchronized Bundle com.google.appinventor.components.runtime.util.FullScreenVideoUtil.performAction ( int  action,
VideoPlayer  source,
Object  data 
)

◆ prepareFullScreenVideoDialog()

void com.google.appinventor.components.runtime.util.FullScreenVideoUtil.prepareFullScreenVideoDialog ( Dialog  dia)

Call just before displaying a fullscreen video Dialog. This method sets up some listeners.

Parameters
diaThe dialog that will display the video.

Definition at line 341 of file FullScreenVideoUtil.java.

◆ setSource()

boolean com.google.appinventor.components.runtime.util.FullScreenVideoUtil.setSource ( String  source,
boolean  clearSeek 
)

Sets the source to be used by the fullscreen video Dialog. This method also attempts to load the internal VideoView with the source.

Parameters
sourceThe source path to use. The MediaUtil is used to load the source.
clearSeekIf True, the video will start playing at position zero. If False, the video will start playing from the com.google.appinventor.components.runtime.util.FullScreenVideoUtil#VIDEOPLAYER_POSITION value of the Bundle passed in the FullScreenVideoUtil#performAction(int, VideoPlayer, Object) or FullScreenVideoUtil#createFullScreenVideoDialog()
Returns
True if the video was successfully loaded. False otherwise.

Definition at line 377 of file FullScreenVideoUtil.java.

◆ showing()

boolean com.google.appinventor.components.runtime.util.FullScreenVideoUtil.showing ( )
Returns
True if FullScreenVideoUtil#dialogInitialized() is true and the Dialog is showing. False otherwise.

Definition at line 357 of file FullScreenVideoUtil.java.

◆ startDialog()

void com.google.appinventor.components.runtime.util.FullScreenVideoUtil.startDialog ( )

Called when the Dialog is about to be shown.

Definition at line 438 of file FullScreenVideoUtil.java.

Member Data Documentation

◆ ACTION_DATA

final String com.google.appinventor.components.runtime.util.FullScreenVideoUtil.ACTION_DATA = "ActionData"
static

Definition at line 69 of file FullScreenVideoUtil.java.

◆ ACTION_SUCESS

final String com.google.appinventor.components.runtime.util.FullScreenVideoUtil.ACTION_SUCESS = "ActionSuccess"
static

Definition at line 67 of file FullScreenVideoUtil.java.

◆ FULLSCREEN_VIDEO_ACTION_DURATION

final int com.google.appinventor.components.runtime.util.FullScreenVideoUtil.FULLSCREEN_VIDEO_ACTION_DURATION = 196
static

Definition at line 57 of file FullScreenVideoUtil.java.

◆ FULLSCREEN_VIDEO_ACTION_FULLSCREEN

final int com.google.appinventor.components.runtime.util.FullScreenVideoUtil.FULLSCREEN_VIDEO_ACTION_FULLSCREEN = 195
static

Definition at line 55 of file FullScreenVideoUtil.java.

◆ FULLSCREEN_VIDEO_ACTION_PAUSE

final int com.google.appinventor.components.runtime.util.FullScreenVideoUtil.FULLSCREEN_VIDEO_ACTION_PAUSE = 192
static

Definition at line 49 of file FullScreenVideoUtil.java.

◆ FULLSCREEN_VIDEO_ACTION_PLAY

final int com.google.appinventor.components.runtime.util.FullScreenVideoUtil.FULLSCREEN_VIDEO_ACTION_PLAY = 191
static

Definition at line 47 of file FullScreenVideoUtil.java.

◆ FULLSCREEN_VIDEO_ACTION_SEEK

final int com.google.appinventor.components.runtime.util.FullScreenVideoUtil.FULLSCREEN_VIDEO_ACTION_SEEK = 190
static

Definition at line 45 of file FullScreenVideoUtil.java.

◆ FULLSCREEN_VIDEO_ACTION_SOURCE

final int com.google.appinventor.components.runtime.util.FullScreenVideoUtil.FULLSCREEN_VIDEO_ACTION_SOURCE = 194
static

Definition at line 53 of file FullScreenVideoUtil.java.

◆ FULLSCREEN_VIDEO_ACTION_STOP

final int com.google.appinventor.components.runtime.util.FullScreenVideoUtil.FULLSCREEN_VIDEO_ACTION_STOP = 193
static

Definition at line 51 of file FullScreenVideoUtil.java.

◆ FULLSCREEN_VIDEO_DIALOG_FLAG

final int com.google.appinventor.components.runtime.util.FullScreenVideoUtil.FULLSCREEN_VIDEO_DIALOG_FLAG = 189
static

Definition at line 43 of file FullScreenVideoUtil.java.

◆ VIDEOPLAYER_FULLSCREEN

final String com.google.appinventor.components.runtime.util.FullScreenVideoUtil.VIDEOPLAYER_FULLSCREEN = "FullScreenKey"
static

Definition at line 59 of file FullScreenVideoUtil.java.

◆ VIDEOPLAYER_PLAYING

final String com.google.appinventor.components.runtime.util.FullScreenVideoUtil.VIDEOPLAYER_PLAYING = "PlayingKey"
static

Definition at line 61 of file FullScreenVideoUtil.java.

◆ VIDEOPLAYER_POSITION

final String com.google.appinventor.components.runtime.util.FullScreenVideoUtil.VIDEOPLAYER_POSITION = "PositionKey"
static

Definition at line 63 of file FullScreenVideoUtil.java.

◆ VIDEOPLAYER_SOURCE

final String com.google.appinventor.components.runtime.util.FullScreenVideoUtil.VIDEOPLAYER_SOURCE = "SourceKey"
static

Definition at line 65 of file FullScreenVideoUtil.java.


The documentation for this class was generated from the following file: