The OoyalaPlayer is the heart of the playback system. More...

Inheritance diagram for com.ooyala.android.OoyalaPlayer:
com.ooyala.android.AuthHeartbeat.OnAuthHeartbeatErrorListener com.ooyala.android.AdPluginManagerInterface com.ooyala.android.analytics.AnalyticsPluginManagerInterface

Classes

enum  ActionAtEnd
 
enum  ContentOrAdType
 
enum  DesiredState
 
enum  InitPlayState
 
enum  IqTrackingState
 
enum  SeekStyle
 
enum  State
 

Public Member Functions

 OoyalaPlayer (String pcode, PlayerDomain domain)
 Initialize an OoyalaPlayer with the given parameters. More...
 
 OoyalaPlayer (String pcode, PlayerDomain domain, Options options)
 Initialize an OoyalaPlayer with the given parameters. More...
 
 OoyalaPlayer (String pcode, PlayerDomain domain, EmbedTokenGenerator generator, Options options)
 Initialize an OoyalaPlayer with the given parameters. More...
 
boolean setEmbedCode (String embedCode)
 Reinitializes the player with a new embed code. More...
 
boolean setEmbedCodes (List< String > embedCodes)
 Reinitializes the player with a new set of embed codes. More...
 
boolean setEmbedCodeWithAdSetCode (String embedCode, String adSetCode)
 Reinitializes the player with a new embed code. More...
 
boolean setEmbedCodesWithAdSetCode (List< String > embedCodes, final String adSetCode)
 Reinitializes the player with a new set of embed codes. More...
 
boolean setExternalId (String externalId)
 Reinitializes the player with a new external ID. More...
 
boolean setExternalIds (List< String > externalIds)
 Reinitializes the player with a new set of external IDs. More...
 
boolean setAsset (JSONObject asset) throws OoyalaException
 Provides possibility to set asset from json for current video. More...
 
boolean setUnbundledVideo (UnbundledVideo unbundledVideo)
 
boolean changeCurrentItem (String embedCode)
 Set the current video in a channel if the video is present. More...
 
boolean changeCurrentItem (Video video, String adSetCode)
 Set the current video in a channel if the video is present. More...
 
void reauthorizeCurrentItem (ServerTaskCallback callback)
 Reauthorize the currentItem, which would refresh the auth_token. More...
 
boolean hasVRContent ()
 
void setVRMode (VrMode mode)
 
VrMode getVRMode ()
 
void switchVRMode ()
 
void rotateVRContentHorizontally (int direction)
 
void rotateVRContentVertically (int direction)
 
void onAuthHeartbeatError (OoyalaException error)
 
void setCustomAnalyticsTags (List< String > tags)
 set the analytics tags More...
 
void release ()
 This will release all the resources held by player. More...
 
void destroy ()
 This will release all the resources held by player and destroy player itself. More...
 
void pause ()
 Pause the current video. More...
 
void play ()
 Start the current video. More...
 
void handlePlayPause ()
 
void handlePlayPause (boolean replayPressed)
 Handle play/pause event from Ooyala Skin. More...
 
void setPlayheadTime (int timeInMillis)
 Synonym for seek. More...
 
void setReplayPressed (boolean replayPressed)
 Handle replay from the native UI and replay event from Ooyala Skin. More...
 
void seek (int timeInMillis)
 Move the playhead to a new location in seconds with millisecond accuracy. More...
 
void seekToPercent (float percent)
 Seek to the given percentage. More...
 
void play (int initialTimeInMillis)
 Play the current video with an initialTime. More...
 
boolean isAudioOnly ()
 
void setBitrateEstimate (long bitrateEstimate)
 Ability to set the initial bitrate within an HLS and DASH manifest that will be used to start up the stream (instead of the first bitrate in the manifest). More...
 
long getBitrateEstimate ()
 Information about the initial bitrate estimate that is used to start up the stream (instead of the first bitrate in the manifest). More...
 
boolean isLiveClosedCaptionsAvailable ()
 Checks if the content player has observed any in-stream closed captions (for example, CEA-608/708). More...
 
boolean isMultiAudioAvailable ()
 Checks if the content player has observed several audio tracks. More...
 
double getBitrate ()
 
boolean isPlaying ()
 
boolean isAdPlaying ()
 
int getDuration ()
 Get the current item's duration. More...
 
int getContentDuration ()
 Get the movie content duration. More...
 
int getBufferPercentage ()
 Get the current item's buffer percentage. More...
 
int getPlayheadTime ()
 Find where the playhead is with millisecond accuracy. More...
 
int getPlayheadPercentage ()
 Get the current item's playhead time as a percentage. More...
 
void setClosedCaptionsLanguage (String language)
 Set the displayed closed captions language. More...
 
String getClosedCaptionsLanguage ()
 Get the currently enabled closed captions language. More...
 
void setAdsSeekable (boolean seekable)
 Set whether ads played by this OoyalaPlayer are seekable (default is false) More...
 
boolean seekable ()
 
void setSeekable (boolean seekable)
 Set whether videos played by this OoyalaPlayer are seekable (default is true) More...
 
float getVolume ()
 The volume of the OoyalaPlayer, relative to the device's volume setting. More...
 
void setVolume (float volume)
 The volume of the OoyalaPlayer, relative to the device's volume setting. More...
 
String getPlayerSessionId ()
 A Session ID that is created at the initialization of OoyalaPlayer. More...
 
String getContentSessionId ()
 A Session ID that is created on the set of a new piece of content (i.e setEmbedCode). More...
 
boolean isPlaybackCompleted ()
 
void passTouchEventToVRView (MotionEvent event, boolean isScroll)
 Pass touches through react-native to vr view. More...
 
void suspend ()
 Suspend the current video (can be resumed later by calling resume). More...
 
void suspend (boolean playInBackground)
 Suspend the current video (can be resumed later by calling resume). More...
 
void resume ()
 Resume the current video from a suspended state. More...
 
void configurationChanged (Configuration newConfig)
 This method is called when the device configuration changes while your component is running. More...
 
boolean previousVideo (int what)
 Change the current video to the previous video in the Channel or ChannelSet. More...
 
boolean nextVideo (int what)
 Change the current video to the next video in the Channel or ChannelSet. More...
 
void resetAds ()
 This will reset the state of all the ads to "unplayed" causing any ad that has already played to play again. More...
 
void skipAd ()
 Skip the currently playing ad. More...
 
void clickAd ()
 Skip the currently playing ad. More...
 
void onAdclickThrough ()
 Process the click through event from UI. More...
 
void onAdIconClicked (int index)
 This is called when an icon is clicked. More...
 
void onAdOverlayClicked (String clickUrl)
 For internal Ooyala use only. More...
 
boolean registerPlugin (final AdPluginInterface plugin)
 register a ad plugin More...
 
boolean deregisterPlugin (final AdPluginInterface plugin)
 deregister a ad plugin More...
 
void registerPlugin (SsaiPluginInterface ssaiPlugin)
 Register a SSAI plugin. More...
 
void deregisterPlugin (SsaiPluginInterface ssaiPlugin)
 Deregister a SSAI plugin. More...
 
boolean registerPlugin (AnalyticsPluginInterface plugin)
 
boolean deregisterPlugin (AnalyticsPluginInterface plugin)
 
OoyalaManagedAdsPlugin getManagedAdsPlugin ()
 Get the Ooyala Managed Ads Plugin, which maintains VAST and Ooyala Advertisements. More...
 
void insertAds (List< VASTAdSpot > ads)
 Insert VAST ads to the managed ad plugin. More...
 
void registerCastManager (CastManagerInterface castManagerInterface)
 Resgister a castManager. More...
 
boolean requestAdMode (AdPluginInterface plugin)
 called by a plugin when it request admode ooyalaplayer More...
 
boolean exitAdMode (final AdPluginInterface plugin)
 called by a plugin when it finishes ad play and return the control to ooyalaplayer More...
 
void switchToCastMode (String embedCode)
 
void exitCastMode (int exitPlayheadTime, boolean isPlaying, String ec)
 
boolean isInCastMode ()
 
void update (Observable observable, Object o)
 
StateNotifier createStateNotifier ()
 
ID3TagNotifier getID3TagNotifier ()
 
String getCustomDRMData ()
 Get the customDRMData for the current player. More...
 
void setCustomDRMData (String data)
 Set the customDRMData for the current player. More...
 
ActionAtEnd getActionAtEnd ()
 Get what the player will do at the end of playback. More...
 
void setActionAtEnd (ActionAtEnd actionAtEnd)
 Set what the player should do at the end of playback. More...
 
JSONObject getMetadata ()
 
Video getCurrentItem ()
 The current movie. More...
 
ContentItem getRootItem ()
 The embedded item (movie, channel, or channel set). More...
 
OoyalaException getError ()
 Get the current error code, if one exists. More...
 
String getEmbedCode ()
 Get the embedCode for the current player. More...
 
String getPcode ()
 Get the pcode for this OoyalaPlayer instance. More...
 
PlayerDomain getDomain ()
 Get the domain for this OoyalaPlayer instance. More...
 
PlayerInfo getPlayerInfo ()
 
MoviePlayerSelector getMoviePlayerSelector ()
 For internal use only. More...
 
Handler getHandler ()
 For internal use only. More...
 
ReadonlyOptionsInterface options ()
 Get the Options that were provided on creation of the OoyalaPlayer. More...
 
ReadonlyOptionsInterface getOptions ()
 
State getState ()
 Get current player state. More...
 
DesiredState getDesiredState ()
 
OoyalaAPIClient getOoyalaAPIClient ()
 
Set< String > getAvailableClosedCaptionsLanguages ()
 Get the available closed captions languages codes. More...
 
Set< String > getAvailableClosedCaptionsLanguagesNames ()
 Get the available closed captions languages names. More...
 
String getAuthToken ()
 Get the authToken for the current player. More...
 
boolean isAuthTokenExpired ()
 Checks the expiration of the authToken, and compares it to the current time. More...
 
void setAuthToken (String authToken)
 Set the AuthToken used to authorize video playback. More...
 
ContentOrAdType getPlayingType ()
 
Set< Integer > getCuePointsInMilliSeconds ()
 The miliseconds within the video where advertisement cue points exist. More...
 
Set< Integer > getCuePointsInPercentage ()
 Get the percentages within the video where cue points exist. More...
 
boolean isShowingAd ()
 
SeekStyle getSeekStyle ()
 get the seek style More...
 
boolean showingAdWithHiddenControlls ()
 
void setLayoutController (LayoutController layoutController)
 Set the layout controller from which the OoyalaPlayer should fetch the layout to display to. More...
 
int getTopBarOffset ()
 Get the absolute pixel of the top bar's distance from the top of the device. More...
 
void addVideoView (View videoView)
 For internal Ooyala use only. More...
 
void removeVideoView ()
 For internal Ooyala use only. More...
 
boolean isFullscreen ()
 Returns true if in fullscreen mode, false if not. More...
 
void setFullscreen (boolean fullscreen)
 Set fullscreen mode (will only work if fullscreenLayout is set) This will call the setFullscreen method on the associated LayoutController. More...
 
FrameLayout getLayout ()
 Get the current OoyalaPlayerLayout. More...
 
void setHook ()
 
int beginFetchingAdvertisingId (final Context context, final IAdvertisingIdListener listener)
 Start obtaining the Advertising Id, which internally is then used in e.g. More...
 
AnalyticsPluginManager getAnalyticPluginManager ()
 
void registerFactory (PlayerFactory factory)
 
void registerDataSourceFactory (DataSourceFactory factory)
 
DataSourceFactory getDataSourceFactory ()
 
void setAudioTrack (String track)
 Establish an audio track is obtained from Ooyala Skin. More...
 
void setAudioTrack (AudioTrack track)
 Set an audio track. More...
 
void setDefaultAudioTrack (AudioTrack track)
 Override the default audio track. More...
 
void setUserDefinedAudioTrack (String track)
 Set an audio track and override the default audio track that was received from Skin. More...
 
void setDefaultAudioLanguage (String language)
 Override the default audio track language. More...
 
void setConfigDefaultAudioLanguage (String language)
 Override the default audio track language that was received in skin.json. More...
 
List< AudioTrackgetAvailableAudioTracks ()
 
AudioTrack getCurrentAudioTrack ()
 
AudioTrack getDefaultAudioTrack ()
 
String getDefaultAudioLanguage ()
 
DefaultAudioParams getDefaultAudioParams ()
 
float getPlaybackSpeed ()
 
void setPlaybackSpeed (float speed)
 Set the playback speed. More...
 
void setSelectedPlaybackSpeed (float speed)
 Set the playback speed that was received from Skin. More...
 
void initPlaybackRateInteractions (PlaybackSpeedControl control)
 Initialize playback rate interactions. More...
 
void createBitmapScreenshot (final PlayerBitmapListener playerBitmapListener)
 Create the bitmap screenshot of the current video frame. More...
 
int contentPlayerCurrentTime ()
 Get the content player current time, even if it is not the active player. More...
 
int contentPlayerDuration ()
 Get the duration of the asset being played in the content player, even if it is not the active player. More...
 
State contentPlayerCurrentState ()
 Get the content player current state, even if it is not the active player. More...
 
void contentPlayerPlay ()
 Play the content player, even if it is not the active player. More...
 
void contentPlayerPause ()
 Pause the content player, even if it is not the active player. More...
 
void contentPlayerSuspend ()
 Suspend the content player, even if it is not the active player. More...
 
void contentPlayerResume ()
 Resume the content player, even if it is not the active player. More...
 
boolean requestAdMode (final AdPluginInterface plugin)
 called when plugin request ad mode More...
 
boolean registerPlugin (final AnalyticsPluginInterface plugin)
 Register an Analytics Plugin. More...
 
boolean deregisterPlugin (final AnalyticsPluginInterface plugin)
 Deregister an Analytics Plugin. More...
 

Static Public Member Functions

static void setIqTrackingState (IqTrackingState iqTrackingState)
 Use to set different states for Ooyala Analytics (IQ) tracking. More...
 
static IqTrackingState getIqTrackingState ()
 Returns state for Ooyala Analytics (IQ) tracking. More...
 
static void enableSSL (boolean sslEnabled)
 Enables ssl(https://) for player api requests. More...
 
static void setEnvironment (EnvironmentType env, String protocol)
 Set the environment to use when calling Ooyala APIs This is for OOYALA INTERNAL purpose only should not be used anyone. More...
 
static void setEnvironment (EnvironmentType env)
 Set the environment to use when calling Ooyala APIs This is for OOYALA INTERNAL purpose only should not be used anyone. More...
 
static String getVersion ()
 Get the SDK version and RC number of this Ooyala Player SDK. More...
 
static boolean isLiveClosedCaptionsLanguage (String cc)
 
static List< String > getOfflineAnalyticsFilenames (Context context)
 Retrieve a list with the name of all files with offline analytics. More...
 

Public Attributes

LayoutController _layoutController = null
 

Static Public Attributes

static final int DO_PLAY = 0
 Used by previousVideo and nextVideo. More...
 
static final int DO_PAUSE = 1
 Used by previousVideo and nextVideo. More...
 
static final String CONTENT_TREE_READY_NOTIFICATION_NAME = "contentTreeReady"
 OoyalaNotification name when content tree Player API has been completed. More...
 
static final String AUTHORIZATION_READY_NOTIFICATION_NAME = "authorizationReady"
 OoyalaNotification name when authorization Player API has been completed. More...
 
static final String METADATA_READY_NOTIFICATION_NAME = "metadataReady"
 OoyalaNotification name when metadata Player API has been completed. More...
 
static final String CURRENT_ITEM_CHANGED_NOTIFICATION_NAME = "currentItemChanged"
 OoyalaNotification name when all Player API requests have been completed. More...
 
static final String TIME_CHANGED_NOTIFICATION_NAME = "timeChanged"
 OoyalaNotification name when the time has changed during video rendering. More...
 
static final String STATE_CHANGED_NOTIFICATION_NAME = "stateChanged"
 
static final String DESIRED_STATE_CHANGED_NOTIFICATION_NAME = "desiredStateChanged"
 
static final String BUFFER_CHANGED_NOTIFICATION_NAME = "bufferChanged"
 
static final String CLOSED_CAPTIONS_LANGUAGE_CHANGED_NAME = "closedCaptionsLanguageChanged"
 
static final String ERROR_NOTIFICATION_NAME = "error"
 
static final String PLAY_STARTED_NOTIFICATION_NAME = "playStarted"
 
static final String PLAY_COMPLETED_NOTIFICATION_NAME = "playCompleted"
 
static final String SEEK_COMPLETED_NOTIFICATION_NAME = "seekCompleted"
 OoyalaNotification name when a video seek has started. More...
 
static final String SEEK_STARTED_NOTIFICATION_NAME = "seekStarted"
 OoyalaNotification name when a video seek has started. More...
 
static final String CC_STYLING_CHANGED_NOTIFICATION_NAME = "ccStylingChanged"
 
static final String AD_OVERLAY_NOTIFICATION_NAME = "adOverlay"
 
static final String AD_STARTED_NOTIFICATION_NAME = "adStarted"
 
static final String AD_COMPLETED_NOTIFICATION_NAME = "adCompleted"
 
static final String AD_POD_STARTED_NOTIFICATION_NAME = "adPodStarted"
 
static final String AD_POD_COMPLETED_NOTIFICATION_NAME = "adPodCompleted"
 
static final String AD_SKIPPED_NOTIFICATION_NAME = "adSkipped"
 
static final String AD_ERROR_NOTIFICATION_NAME = "adError"
 
static final String BUFFERING_STARTED_NOTIFICATION_NAME = "bufferingStarted"
 OoyalaNotification name when the player begins downloading a video chunk. More...
 
static final String BUFFERING_COMPLETED_NOTIFICATION_NAME = "bufferingCompleted"
 OoyalaNotification name when the player completes downloading a video chunk. More...
 
static final String DRM_RIGHTS_ACQUISITION_STARTED_NOTIFICATION_NAME = "drmRightsAcquireStarted"
 
static final String DRM_RIGHTS_ACQUISITION_COMPLETED_NOTIFICATION_NAME = "drmRightsAcquireCompleted"
 
static final String LIVE_CC_AVAILABILITY_CHANGED_NOTIFICATION_NAME = "liveCCAvailabilityChanged"
 OoyalaNotification name when the player observes Live Closed Captions within the live stream. More...
 
static final String LIVE_CC_CHANGED_NOTIFICATION_NAME = "liveCCChanged"
 OoyalaNotification name when the live closed captions text has changed. More...
 
static final String MANIFEST_CC_CHANGED_NOTIFICATION_NAME = "manifestCCChanged"
 OoyalaNotification name when the manifest closed captions text has changed. More...
 
static final String CC_CHANGED_NOTIFICATION_NAME = "ccChanged"
 OoyalaNotification name when the VOD closed captions text has changed. More...
 
static final String EMBED_CODE_SET_NOTIFICATION_NAME = "embedCodeSet"
 OoyalaNotification name when the embed code/content ID has changed. More...
 
static final String BITRATE_CHANGED_NOTIFICATION_NAME = "bitrateChanged"
 OoyalaNotification name when the observed Bitrate is changing. More...
 
static final String VR_MODE_CHANGED_NOTIFICATION_NAME = "vrModeChanged"
 OoyalaNotification name when the VR mode has changed. More...
 
static final String GVR_VIEW_ROTATED_NOTIFICATION_NAME = "gvrViewRotated"
 OoyalaNotification name when the gvr view has been rotated in VR mono mode. More...
 
static final String MULTI_AUDIO_ENABLED_NOTIFICATION_NAME = "multiAudioEnabled"
 OoyalaNotification name when a current asset contains several audio tracks. More...
 
static final String AUDIO_TRACK_SELECTED_NOTIFICATION_NAME = "audioTrackChanged"
 OoyalaNotification name when an audio track was selected The "data" is a title of selected audio track. More...
 
static final String STREAM_PARAMS_UPDATED_NOTIFICATION_NAME = "streamParamsUpdated"
 OoyalaNotification name when audio and video tracks were selected No "data" is passed in the OoyalaNotification. More...
 
static final String PLAYBACK_SPEED_ENABLED = "playbackSpeedEnabled"
 OoyalaNotification name when playback speed was enabled The "data" is an instance of com.ooyala.android.playback.PlaybackNotificationInfo. More...
 
static final String PLAYBACK_SPEED_RATE_CHANGED = "playbackSpeedRateChanged"
 OoyalaNotification name when playback speed was changed The "data" is a new value of playback speed. More...
 
static final String NOTIFICATION_NAME = "name"
 
static final String CLOSED_CAPTION_TEXT = "caption"
 
static final String LIVE_CLOSED_CAPIONS_LANGUAGE = "Closed Captions"
 
static boolean enableHLS = false
 If set to true, this will allow HLS streams regardless of the Android version. More...
 
static boolean enableHighResHLS = false
 If set to true, this will allow Higher Resolution HLS streams regardless of the Android version. More...
 
static boolean enableCustomHLSPlayer = false
 
static boolean enableCustomPlayreadyPlayer = false
 
static boolean enableDebugDRMPlayback = false
 

Protected Member Functions

void finalize () throws Throwable
 

Protected Attributes

MoviePlayerSelector _playerSelector
 

Detailed Description

The OoyalaPlayer is the heart of the playback system.

Use it to configure and control asset playback, and to be aware of playback state changes.

Constructor & Destructor Documentation

com.ooyala.android.OoyalaPlayer.OoyalaPlayer ( String  pcode,
PlayerDomain  domain 
)

Initialize an OoyalaPlayer with the given parameters.

Parameters
pcodeYour Provider Code
domainYour Embed Domain
com.ooyala.android.OoyalaPlayer.OoyalaPlayer ( String  pcode,
PlayerDomain  domain,
Options  options 
)

Initialize an OoyalaPlayer with the given parameters.

Parameters
pcodeYour Provider Code
domainYour Embed Domain
optionsExtra settings
com.ooyala.android.OoyalaPlayer.OoyalaPlayer ( String  pcode,
PlayerDomain  domain,
EmbedTokenGenerator  generator,
Options  options 
)

Initialize an OoyalaPlayer with the given parameters.

Parameters
pcodeYour Provider Code, must be non-null.
domainYour Embed Domain, must be non-null.
generatorAn embedTokenGenerator used to sign SAS requests, can be null.
optionsExtra settings, can be null in which case default values are used.

Member Function Documentation

void com.ooyala.android.OoyalaPlayer.addVideoView ( View  videoView)

For internal Ooyala use only.

Parameters
videoView
int com.ooyala.android.OoyalaPlayer.beginFetchingAdvertisingId ( final Context  context,
final IAdvertisingIdListener  listener 
)

Start obtaining the Advertising Id, which internally is then used in e.g.

VAST Ad URL 'device id' macro expansion. This method will: 1st check that the Google Play Services are available, which may fail and return a non-SUCCESS code. If they are available (code SUCCESS) then: 2nd an attempt will be made to load the Advertising Id from those Google Play Services. If the 2nd step fails an OoyalaException will be thrown, wrapping the original exception. Callers of this method should: 1) update AndroidManifest.xml to include meta-data tag per Google Play Services docs. 2) obtain and pass in a valid Android Context; 3) check the return code and decide if the App should prompt the user to install Google Play Services. 4) handle subsequent asynchronous onAdvertisingIdSuccess() and onAdvertisingIdError() callbacks: due to the asynchronous nature of the Google Play Services call used, there can be a long delay either before the Advertising Id is successfully obtained, or a long delay before a failure happens. An invocation of onAdvertisingIdSuccess() means the Ooyala SDK now has an advertising id for using with e.g. 'device id' macros. Nothing further must be done by the App. An invocation of onAdvertisingIdError() means the App might try this whole process again since fetching failed. These callbacks will be invoked on the main thread.

Parameters
contextmust be non-null.
listenermust be non-null.
See also
http://developer.android.com/google/play-services/setup.html
http://developer.android.com/reference/com/google/android/gms/common/GooglePlayServicesUtil.html#isGooglePlayServicesAvailable(android.content.Context)
com.ooyala.android.OoyalaException::getCode()
Returns
status code, can be one of following in ConnectionResult: SUCCESS, SERVICE_MISSING, SERVICE_VERSION_UPDATE_REQUIRED, SERVICE_DISABLED, SERVICE_INVALID, DATE_INVALID.
boolean com.ooyala.android.OoyalaPlayer.changeCurrentItem ( String  embedCode)

Set the current video in a channel if the video is present.

Parameters
embedCode
Returns
true if the change was successful, false if not
boolean com.ooyala.android.OoyalaPlayer.changeCurrentItem ( Video  video,
String  adSetCode 
)

Set the current video in a channel if the video is present.

Parameters
videoshould not be null.
adSetCodecan be null.
Returns
true if the change was successful, false if not
void com.ooyala.android.OoyalaPlayer.clickAd ( )

Skip the currently playing ad.

Do nothing if no ad is playing

void com.ooyala.android.OoyalaPlayer.configurationChanged ( Configuration  newConfig)

This method is called when the device configuration changes while your component is running.

Parameters
newConfigThe new device configuration.
State com.ooyala.android.OoyalaPlayer.contentPlayerCurrentState ( )

Get the content player current state, even if it is not the active player.

Returns
the content player current state
int com.ooyala.android.OoyalaPlayer.contentPlayerCurrentTime ( )

Get the content player current time, even if it is not the active player.

Returns
the content player current time
int com.ooyala.android.OoyalaPlayer.contentPlayerDuration ( )

Get the duration of the asset being played in the content player, even if it is not the active player.

Returns
the duration of the asset being played in the content player
void com.ooyala.android.OoyalaPlayer.contentPlayerPause ( )

Pause the content player, even if it is not the active player.

void com.ooyala.android.OoyalaPlayer.contentPlayerPlay ( )

Play the content player, even if it is not the active player.

void com.ooyala.android.OoyalaPlayer.contentPlayerResume ( )

Resume the content player, even if it is not the active player.

void com.ooyala.android.OoyalaPlayer.contentPlayerSuspend ( )

Suspend the content player, even if it is not the active player.

void com.ooyala.android.OoyalaPlayer.createBitmapScreenshot ( final PlayerBitmapListener  playerBitmapListener)

Create the bitmap screenshot of the current video frame.

Parameters
playerBitmapListenerthe interface that must be implemented in order to receive bitmap screenshot from Ooyala ExoPlayer
StateNotifier com.ooyala.android.OoyalaPlayer.createStateNotifier ( )
boolean com.ooyala.android.analytics.AnalyticsPluginManagerInterface.deregisterPlugin ( final AnalyticsPluginInterface  plugin)
inherited

Deregister an Analytics Plugin.

Parameters
pluginthe plugin to be deregistered
Returns
true on success, false otherwise

Implemented in com.ooyala.android.analytics.AnalyticsPluginManager.

boolean com.ooyala.android.OoyalaPlayer.deregisterPlugin ( final AdPluginInterface  plugin)

deregister a ad plugin

Parameters
pluginthe plugin to be deregistered
Returns
true if deregistration succeeded, false otherwise

Implements com.ooyala.android.AdPluginManagerInterface.

void com.ooyala.android.OoyalaPlayer.deregisterPlugin ( SsaiPluginInterface  ssaiPlugin)

Deregister a SSAI plugin.

Parameters
ssaiPluginthe plugin to be registered
boolean com.ooyala.android.OoyalaPlayer.deregisterPlugin ( AnalyticsPluginInterface  plugin)
void com.ooyala.android.OoyalaPlayer.destroy ( )

This will release all the resources held by player and destroy player itself.

It gives more control to developers for cleaning up when they want. Recommendation: make "player = null" after you call destroy

static void com.ooyala.android.OoyalaPlayer.enableSSL ( boolean  sslEnabled)
static

Enables ssl(https://) for player api requests.

Parameters
sslEnabledtrue or false. True if you want SSL Default is false
boolean com.ooyala.android.OoyalaPlayer.exitAdMode ( final AdPluginInterface  plugin)

called by a plugin when it finishes ad play and return the control to ooyalaplayer

Parameters
pluginthe caller plugin
Returns
true if exit succeeded, false otherwise

Implements com.ooyala.android.AdPluginManagerInterface.

void com.ooyala.android.OoyalaPlayer.exitCastMode ( int  exitPlayheadTime,
boolean  isPlaying,
String  ec 
)
void com.ooyala.android.OoyalaPlayer.finalize ( ) throws Throwable
protected
ActionAtEnd com.ooyala.android.OoyalaPlayer.getActionAtEnd ( )

Get what the player will do at the end of playback.

Returns
the OoyalaPlayer.OoyalaPlayerActionAtEnd to use
AnalyticsPluginManager com.ooyala.android.OoyalaPlayer.getAnalyticPluginManager ( )
String com.ooyala.android.OoyalaPlayer.getAuthToken ( )

Get the authToken for the current player.

Returns
authToken The authorization token that represents this device's streaming session
List<AudioTrack> com.ooyala.android.OoyalaPlayer.getAvailableAudioTracks ( )
Returns
the list of available audio tracks for the current asset
Set<String> com.ooyala.android.OoyalaPlayer.getAvailableClosedCaptionsLanguages ( )

Get the available closed captions languages codes.

Returns
a Set of Strings containing the available closed captions languages codes
Set<String> com.ooyala.android.OoyalaPlayer.getAvailableClosedCaptionsLanguagesNames ( )

Get the available closed captions languages names.

Returns
a Set of Strings containing the available closed captions languages names
double com.ooyala.android.OoyalaPlayer.getBitrate ( )
Deprecated:
For MP4 videos only - Return the bitrate that is most likely playing This API is no longer supported.

to get Bitrate information in Exoplayer, see BITRATE_CHANGED_NOTIFICATION_NAME

Returns
get the bitrate of the current item
long com.ooyala.android.OoyalaPlayer.getBitrateEstimate ( )

Information about the initial bitrate estimate that is used to start up the stream (instead of the first bitrate in the manifest).

Returns
initial bitrate value or -1 (in case it is not set, equals 0 or is negative)
int com.ooyala.android.OoyalaPlayer.getBufferPercentage ( )

Get the current item's buffer percentage.

Returns
the buffer percentage (between 0 and 100 inclusive)
String com.ooyala.android.OoyalaPlayer.getClosedCaptionsLanguage ( )

Get the currently enabled closed captions language.

Returns
2 letter country code of the language to display or nil to hide closed captions
int com.ooyala.android.OoyalaPlayer.getContentDuration ( )

Get the movie content duration.

Returns
the content duration in milliseconds
String com.ooyala.android.OoyalaPlayer.getContentSessionId ( )

A Session ID that is created on the set of a new piece of content (i.e setEmbedCode).

Persists until a new piece of content is set. Can be null if no video was set

Returns
A session ID that corresponds to the current content context.
Set<Integer> com.ooyala.android.OoyalaPlayer.getCuePointsInMilliSeconds ( )

The miliseconds within the video where advertisement cue points exist.

Returns

Implements com.ooyala.android.AdPluginManagerInterface.

Set<Integer> com.ooyala.android.OoyalaPlayer.getCuePointsInPercentage ( )

Get the percentages within the video where cue points exist.

Returns
a set of integers between 0 and 100 for where cue points exist
AudioTrack com.ooyala.android.OoyalaPlayer.getCurrentAudioTrack ( )
Returns
the current audio track for the current asset
Video com.ooyala.android.OoyalaPlayer.getCurrentItem ( )

The current movie.

Returns
movie
String com.ooyala.android.OoyalaPlayer.getCustomDRMData ( )

Get the customDRMData for the current player.

Returns
_customDRMData
DataSourceFactory com.ooyala.android.OoyalaPlayer.getDataSourceFactory ( )
String com.ooyala.android.OoyalaPlayer.getDefaultAudioLanguage ( )
Returns
the default audio language provided it set
DefaultAudioParams com.ooyala.android.OoyalaPlayer.getDefaultAudioParams ( )
Returns
The default audio params regarding the list of available audio tracks
AudioTrack com.ooyala.android.OoyalaPlayer.getDefaultAudioTrack ( )
Returns
the default audio track provided it set
DesiredState com.ooyala.android.OoyalaPlayer.getDesiredState ( )
PlayerDomain com.ooyala.android.OoyalaPlayer.getDomain ( )

Get the domain for this OoyalaPlayer instance.

Returns
domain
int com.ooyala.android.OoyalaPlayer.getDuration ( )

Get the current item's duration.

Returns
the duration in milliseconds
String com.ooyala.android.OoyalaPlayer.getEmbedCode ( )

Get the embedCode for the current player.

Returns
embedCode
OoyalaException com.ooyala.android.OoyalaPlayer.getError ( )

Get the current error code, if one exists.

Returns
error code
Handler com.ooyala.android.OoyalaPlayer.getHandler ( )

For internal use only.

Returns
the handler to schedule running on UI thread
ID3TagNotifier com.ooyala.android.OoyalaPlayer.getID3TagNotifier ( )
static IqTrackingState com.ooyala.android.OoyalaPlayer.getIqTrackingState ( )
static

Returns state for Ooyala Analytics (IQ) tracking.

DEFAULT : Analytics is enabled and sends data to analytics servers Device guid will stay same until app is present on phone. Device guid will be stored in local storage DISABLED: Analytics will be completely disabled and no data will be send to analytics servers ANONYMOUS: Analytics data will be send to analytics servers Each time video plays new device guid will be generated Device guid will NOT be stored on device.

FrameLayout com.ooyala.android.OoyalaPlayer.getLayout ( )

Get the current OoyalaPlayerLayout.

Returns
the current OoyalaPlayerLayout
OoyalaManagedAdsPlugin com.ooyala.android.OoyalaPlayer.getManagedAdsPlugin ( )

Get the Ooyala Managed Ads Plugin, which maintains VAST and Ooyala Advertisements.

Returns
the ManagedAdsPlugin
JSONObject com.ooyala.android.OoyalaPlayer.getMetadata ( )
Deprecated:
returns metadata for current video Currently does not return anything.

Instead, use getCurrentItem().getMetadata();

MoviePlayerSelector com.ooyala.android.OoyalaPlayer.getMoviePlayerSelector ( )

For internal use only.

Returns
the movie selector
static List<String> com.ooyala.android.OoyalaPlayer.getOfflineAnalyticsFilenames ( Context  context)
static

Retrieve a list with the name of all files with offline analytics.

Returns
a list with the name of all files with offline analytics
OoyalaAPIClient com.ooyala.android.OoyalaPlayer.getOoyalaAPIClient ( )
Returns
the OoyalaAPIClient used by this player
ReadonlyOptionsInterface com.ooyala.android.OoyalaPlayer.getOptions ( )
Returns
non-null, immutable Options.
String com.ooyala.android.OoyalaPlayer.getPcode ( )

Get the pcode for this OoyalaPlayer instance.

Returns
pcode
float com.ooyala.android.OoyalaPlayer.getPlaybackSpeed ( )
Returns
the factor by which playback will be sped up
PlayerInfo com.ooyala.android.OoyalaPlayer.getPlayerInfo ( )
Returns
The player info.
String com.ooyala.android.OoyalaPlayer.getPlayerSessionId ( )

A Session ID that is created at the initialization of OoyalaPlayer.

Persists for the life of the OoyalaPlayer

Returns
A session ID that corresponds to this player instance
int com.ooyala.android.OoyalaPlayer.getPlayheadPercentage ( )

Get the current item's playhead time as a percentage.

Returns
the playhead time percentage (between 0 and 100 inclusive)
int com.ooyala.android.OoyalaPlayer.getPlayheadTime ( )

Find where the playhead is with millisecond accuracy.

Returns
time in milliseconds
ContentOrAdType com.ooyala.android.OoyalaPlayer.getPlayingType ( )
Returns
the kind of content that is on the video display right now.
ContentItem com.ooyala.android.OoyalaPlayer.getRootItem ( )

The embedded item (movie, channel, or channel set).

Returns
movie
SeekStyle com.ooyala.android.OoyalaPlayer.getSeekStyle ( )

get the seek style

Returns
the seek style of current player
State com.ooyala.android.OoyalaPlayer.getState ( )

Get current player state.

One of playing, paused, buffering, channel, or error

Returns
state
int com.ooyala.android.OoyalaPlayer.getTopBarOffset ( )

Get the absolute pixel of the top bar's distance from the top of the device.

Returns
pixels to shift the Learn More button down
static String com.ooyala.android.OoyalaPlayer.getVersion ( )
static

Get the SDK version and RC number of this Ooyala Player SDK.

Returns
the SDK version as a string
float com.ooyala.android.OoyalaPlayer.getVolume ( )

The volume of the OoyalaPlayer, relative to the device's volume setting.

set with setVolume

Returns
the volume of the OoyalaPlayer, from 1.0f (default, max), to 0.0f (muted)
VrMode com.ooyala.android.OoyalaPlayer.getVRMode ( )
void com.ooyala.android.OoyalaPlayer.handlePlayPause ( )
Deprecated:
This API is no longer supported.

Instead, use handlePlayPause(boolean replayPressed) ;

void com.ooyala.android.OoyalaPlayer.handlePlayPause ( boolean  replayPressed)

Handle play/pause event from Ooyala Skin.

Parameters
replayPressedif replay is pressed
boolean com.ooyala.android.OoyalaPlayer.hasVRContent ( )
void com.ooyala.android.OoyalaPlayer.initPlaybackRateInteractions ( PlaybackSpeedControl  control)

Initialize playback rate interactions.

Parameters
controlThe interface that must be implemented in order to manage a playback rate
void com.ooyala.android.OoyalaPlayer.insertAds ( List< VASTAdSpot ads)

Insert VAST ads to the managed ad plugin.

Parameters
adsthe ads to be inserted.
boolean com.ooyala.android.OoyalaPlayer.isAdPlaying ( )
Returns
true if currently playing ad, false otherwise
boolean com.ooyala.android.OoyalaPlayer.isAudioOnly ( )
boolean com.ooyala.android.OoyalaPlayer.isAuthTokenExpired ( )

Checks the expiration of the authToken, and compares it to the current time.

Returns
true if token is expired, false otherwise
boolean com.ooyala.android.OoyalaPlayer.isFullscreen ( )

Returns true if in fullscreen mode, false if not.

Fullscreen currently does not work due to limitations in Android.

Returns
fullscreen mode
boolean com.ooyala.android.OoyalaPlayer.isInCastMode ( )
boolean com.ooyala.android.OoyalaPlayer.isLiveClosedCaptionsAvailable ( )

Checks if the content player has observed any in-stream closed captions (for example, CEA-608/708).

For some live streams, the player may only observe the captions are available much later after video starts playing back

Returns
true if in-stream closed captions were observed, false otherwise.
static boolean com.ooyala.android.OoyalaPlayer.isLiveClosedCaptionsLanguage ( String  cc)
static
boolean com.ooyala.android.OoyalaPlayer.isMultiAudioAvailable ( )

Checks if the content player has observed several audio tracks.

For some assets, there is only one audio track that will be set as a default. In this case the method returns false

Returns
true if more than one audio streams were observed, false otherwise.
boolean com.ooyala.android.OoyalaPlayer.isPlaybackCompleted ( )
Returns
true if playback is fully completed, false if not
boolean com.ooyala.android.OoyalaPlayer.isPlaying ( )
Returns
true if the current state is State.Playing, false otherwise
boolean com.ooyala.android.OoyalaPlayer.isShowingAd ( )
Returns
true if the OoyalaPlayer is currently showing an ad (in any state). false if not.
boolean com.ooyala.android.OoyalaPlayer.nextVideo ( int  what)

Change the current video to the next video in the Channel or ChannelSet.

If there is no next video, nothing will happen. Note that this will trigger a fetch of additional children if the Channel or ChannelSet is paginated. If so, it may take some time before the video is actually set.

Parameters
whatOoyalaPlayerControl.DO_PLAY or OoyalaPlayerControl.DO_PAUSE depending on what to do after the video is set.
Returns
true if there was a next video, false if not.
void com.ooyala.android.OoyalaPlayer.onAdclickThrough ( )

Process the click through event from UI.

void com.ooyala.android.OoyalaPlayer.onAdIconClicked ( int  index)

This is called when an icon is clicked.

Parameters
indexthe index of the icon
void com.ooyala.android.OoyalaPlayer.onAdOverlayClicked ( String  clickUrl)

For internal Ooyala use only.

Handle ad overlay click event during content playback. This will open the url in device's default browser.

Parameters
clickUrlthe click url of the overlay ad.
void com.ooyala.android.OoyalaPlayer.onAuthHeartbeatError ( OoyalaException  error)
ReadonlyOptionsInterface com.ooyala.android.OoyalaPlayer.options ( )

Get the Options that were provided on creation of the OoyalaPlayer.

Returns
void com.ooyala.android.OoyalaPlayer.passTouchEventToVRView ( MotionEvent  event,
boolean  isScroll 
)

Pass touches through react-native to vr view.

void com.ooyala.android.OoyalaPlayer.pause ( )

Pause the current video.

void com.ooyala.android.OoyalaPlayer.play ( )

Start the current video.

void com.ooyala.android.OoyalaPlayer.play ( int  initialTimeInMillis)

Play the current video with an initialTime.

Parameters
initialTimeInMillisthe time to start the video.
boolean com.ooyala.android.OoyalaPlayer.previousVideo ( int  what)

Change the current video to the previous video in the Channel or ChannelSet.

If there is no previous video, this will seek to the beginning of the video.

Parameters
whatOoyalaPlayerControl.DO_PLAY or OoyalaPlayerControl.DO_PAUSE depending on what to do after the video is set.
Returns
true if there was a previous video, false if not.
void com.ooyala.android.OoyalaPlayer.reauthorizeCurrentItem ( ServerTaskCallback  callback)

Reauthorize the currentItem, which would refresh the auth_token.

void com.ooyala.android.OoyalaPlayer.registerCastManager ( CastManagerInterface  castManagerInterface)

Resgister a castManager.

Parameters
castManagerInterface
void com.ooyala.android.OoyalaPlayer.registerDataSourceFactory ( DataSourceFactory  factory)
void com.ooyala.android.OoyalaPlayer.registerFactory ( PlayerFactory  factory)
boolean com.ooyala.android.analytics.AnalyticsPluginManagerInterface.registerPlugin ( final AnalyticsPluginInterface  plugin)
inherited

Register an Analytics Plugin.

Parameters
pluginthe plugin to be registered
Returns
true on success, false otherwise

Implemented in com.ooyala.android.analytics.AnalyticsPluginManager.

boolean com.ooyala.android.OoyalaPlayer.registerPlugin ( final AdPluginInterface  plugin)

register a ad plugin

Parameters
pluginthe plugin to be registered
Returns
true if registration succeeded, false otherwise

Implements com.ooyala.android.AdPluginManagerInterface.

void com.ooyala.android.OoyalaPlayer.registerPlugin ( SsaiPluginInterface  ssaiPlugin)

Register a SSAI plugin.

Parameters
ssaiPluginthe plugin to be registered
boolean com.ooyala.android.OoyalaPlayer.registerPlugin ( AnalyticsPluginInterface  plugin)
void com.ooyala.android.OoyalaPlayer.release ( )

This will release all the resources held by player.

It gives more control to developers for cleaning up when they want. Recommendation: make "player = null" after you call release

void com.ooyala.android.OoyalaPlayer.removeVideoView ( )

For internal Ooyala use only.

boolean com.ooyala.android.AdPluginManagerInterface.requestAdMode ( final AdPluginInterface  plugin)
inherited

called when plugin request ad mode

Parameters
pluginthe plugin that request ad mode
Returns
true on success, false otherwise
boolean com.ooyala.android.OoyalaPlayer.requestAdMode ( AdPluginInterface  plugin)

called by a plugin when it request admode ooyalaplayer

Parameters
pluginthe caller plugin
Returns
true if exit succeeded, false otherwise
void com.ooyala.android.OoyalaPlayer.resetAds ( )

This will reset the state of all the ads to "unplayed" causing any ad that has already played to play again.

void com.ooyala.android.OoyalaPlayer.resume ( )

Resume the current video from a suspended state.

void com.ooyala.android.OoyalaPlayer.rotateVRContentHorizontally ( int  direction)
void com.ooyala.android.OoyalaPlayer.rotateVRContentVertically ( int  direction)
void com.ooyala.android.OoyalaPlayer.seek ( int  timeInMillis)

Move the playhead to a new location in seconds with millisecond accuracy.

Parameters
timeInMillisin milliseconds
boolean com.ooyala.android.OoyalaPlayer.seekable ( )
Returns
true if the current player is seekable, false if there is no current player or it is not seekable
void com.ooyala.android.OoyalaPlayer.seekToPercent ( float  percent)

Seek to the given percentage.

Parameters
percentpercent (between 0.0 and 100.0) to seek to
void com.ooyala.android.OoyalaPlayer.setActionAtEnd ( ActionAtEnd  actionAtEnd)

Set what the player should do at the end of playback.

Parameters
actionAtEnd
void com.ooyala.android.OoyalaPlayer.setAdsSeekable ( boolean  seekable)

Set whether ads played by this OoyalaPlayer are seekable (default is false)

Parameters
seekabletrue if seekable, false if not.
boolean com.ooyala.android.OoyalaPlayer.setAsset ( JSONObject  asset) throws OoyalaException

Provides possibility to set asset from json for current video.

void com.ooyala.android.OoyalaPlayer.setAudioTrack ( String  track)

Establish an audio track is obtained from Ooyala Skin.

Parameters
trackthe title of the audio track that selected by the end user
void com.ooyala.android.OoyalaPlayer.setAudioTrack ( AudioTrack  track)

Set an audio track.

Parameters
trackthe audio track that will be set as a current
void com.ooyala.android.OoyalaPlayer.setAuthToken ( String  authToken)

Set the AuthToken used to authorize video playback.

Changing this manually without an existing auth token can cause an inflated number of concurrent streams for a user

Parameters
authTokenThe authorization token that represents this device's streaming session
void com.ooyala.android.OoyalaPlayer.setBitrateEstimate ( long  bitrateEstimate)

Ability to set the initial bitrate within an HLS and DASH manifest that will be used to start up the stream (instead of the first bitrate in the manifest).

Upon startup, the stream will play the set bitrate until adaptive bitrate logic of ExoPlayer changes the bitrate per the network speed. If bitrateEstimate is less than the minimal bitrate of the video, initial bitrate is minimum available, if it's more than maximum, initial bitrate is the max bitrate available. Otherwise it looks for closest bitrate value and than chooses N-1 bitrate in the the bitrate ladder (where N = the closes bitrate value in the manifest that does not exceed the input value).

Parameters
bitrateEstimateinitial bitrate estimate to start up the stream. Has to be positive value, negative values and zero will be ignored.
void com.ooyala.android.OoyalaPlayer.setClosedCaptionsLanguage ( String  language)

Set the displayed closed captions language.

Parameters
language2 letter country code of the language to display or nil to hide closed captions
void com.ooyala.android.OoyalaPlayer.setConfigDefaultAudioLanguage ( String  language)

Override the default audio track language that was received in skin.json.

Parameters
languagethe language of the audio track that will be set as a default
void com.ooyala.android.OoyalaPlayer.setCustomAnalyticsTags ( List< String >  tags)

set the analytics tags

Parameters
tagsthe list of tags to set
void com.ooyala.android.OoyalaPlayer.setCustomDRMData ( String  data)

Set the customDRMData for the current player.

void com.ooyala.android.OoyalaPlayer.setDefaultAudioLanguage ( String  language)

Override the default audio track language.

Parameters
languagethe language of the audio track that will be set as a default
void com.ooyala.android.OoyalaPlayer.setDefaultAudioTrack ( AudioTrack  track)

Override the default audio track.

Parameters
trackthe audio track that will be set as a default
boolean com.ooyala.android.OoyalaPlayer.setEmbedCode ( String  embedCode)

Reinitializes the player with a new embed code.

If embedCode is null, this method has no effect and just returns false.

Parameters
embedCode
Returns
true if the embed code was successfully set, false if not.
boolean com.ooyala.android.OoyalaPlayer.setEmbedCodes ( List< String >  embedCodes)

Reinitializes the player with a new set of embed codes.

If embedCodes is null, this method has no effect and just returns false.

Parameters
embedCodes
Returns
true if the embed codes were successfully set, false if not.
boolean com.ooyala.android.OoyalaPlayer.setEmbedCodesWithAdSetCode ( List< String >  embedCodes,
final String  adSetCode 
)

Reinitializes the player with a new set of embed codes.

If embedCodes is null, this method has no effect and just returns false. An ad set can be dynamically associated using the adSetCode param.

Parameters
embedCodesshould not be null.
adSetCodecan be null.
Returns
true if the embed codes were successfully set, false if not.
boolean com.ooyala.android.OoyalaPlayer.setEmbedCodeWithAdSetCode ( String  embedCode,
String  adSetCode 
)

Reinitializes the player with a new embed code.

If embedCode is null, this method has no effect and just returns false. An ad set can be dynamically associated using the adSetCode param.

Parameters
embedCodeshould not be null.
adSetCodecan be null.
Returns
true if the embed code was successfully set, false if not.
static void com.ooyala.android.OoyalaPlayer.setEnvironment ( EnvironmentType  env,
String  protocol 
)
static

Set the environment to use when calling Ooyala APIs This is for OOYALA INTERNAL purpose only should not be used anyone.

Parameters
envEnvironmentType can be staging, next-staging, production or local
protocolit should be http:// OR https://
static void com.ooyala.android.OoyalaPlayer.setEnvironment ( EnvironmentType  env)
static

Set the environment to use when calling Ooyala APIs This is for OOYALA INTERNAL purpose only should not be used anyone.

This method will always use HTTP. If you want to use HTTPS, use setEnvironment(EnvironmentType, String) method.

Parameters
envEnvironmentType can be staging, next-staging, production or local
boolean com.ooyala.android.OoyalaPlayer.setExternalId ( String  externalId)

Reinitializes the player with a new external ID.

If externalId is null, this method has no effect and just returns false.

Parameters
externalId
Returns
true if the external ID was successfully set, false if not.
boolean com.ooyala.android.OoyalaPlayer.setExternalIds ( List< String >  externalIds)

Reinitializes the player with a new set of external IDs.

If externalIds is null, this method has no effect and just returns false.

Parameters
externalIds
Returns
true if the external IDs were successfully set, false if not.
void com.ooyala.android.OoyalaPlayer.setFullscreen ( boolean  fullscreen)

Set fullscreen mode (will only work if fullscreenLayout is set) This will call the setFullscreen method on the associated LayoutController.

If you are implementing your own LayoutController here are some things to keep in mind:

Parameters
fullscreentrue to switch to fullscreen, false to switch out of fullscreen
void com.ooyala.android.OoyalaPlayer.setHook ( )
static void com.ooyala.android.OoyalaPlayer.setIqTrackingState ( IqTrackingState  iqTrackingState)
static

Use to set different states for Ooyala Analytics (IQ) tracking.

DEFAULT : Analytics is enabled and sends data to analytics servers Device guid will stay same until app is present on phone. Device guid will be stored in local storage DISABLED: Analytics will be completely disabled and no data will be send to analytics servers ANONYMOUS: Analytics data will be send to analytics servers Each time video plays new device guid will be generated Device guid will NOT be stored on device.

void com.ooyala.android.OoyalaPlayer.setLayoutController ( LayoutController  layoutController)

Set the layout controller from which the OoyalaPlayer should fetch the layout to display to.

Parameters
layoutControllerthe layoutController to use.
void com.ooyala.android.OoyalaPlayer.setPlaybackSpeed ( float  speed)

Set the playback speed.

Ads will always be played at 1x, while the main content can be changed. Playback speed does not work with Ads, Live or VR360 video and the setting will be ignored but it will set the playback speed for the next videos if the speed is a valid speed.

Parameters
speedThe desired playback speed. Must be more than
MIN_PLAYBACK_SPEED
and less than
MAX_PLAYBACK_SPEED
(see com.ooyala.android.playback.PlaybackConstants)
void com.ooyala.android.OoyalaPlayer.setPlayheadTime ( int  timeInMillis)

Synonym for seek.

Parameters
timeInMillisin milliseconds
void com.ooyala.android.OoyalaPlayer.setReplayPressed ( boolean  replayPressed)

Handle replay from the native UI and replay event from Ooyala Skin.

Parameters
replayPressedif replay is pressed
void com.ooyala.android.OoyalaPlayer.setSeekable ( boolean  seekable)

Set whether videos played by this OoyalaPlayer are seekable (default is true)

Parameters
seekabletrue if seekable, false if not.
void com.ooyala.android.OoyalaPlayer.setSelectedPlaybackSpeed ( float  speed)

Set the playback speed that was received from Skin.

Parameters
speedThe desired playback speed
boolean com.ooyala.android.OoyalaPlayer.setUnbundledVideo ( UnbundledVideo  unbundledVideo)
void com.ooyala.android.OoyalaPlayer.setUserDefinedAudioTrack ( String  track)

Set an audio track and override the default audio track that was received from Skin.

Parameters
trackthe audio track that will be set as a default
void com.ooyala.android.OoyalaPlayer.setVolume ( float  volume)

The volume of the OoyalaPlayer, relative to the device's volume setting.

For example, if volume is 1.0 (default), the playback volume would be as loud as the device's Media volume. The volume set here will affect Content, Ooyala, Pulse, and VAST ad playback. It will not affect other ad managers. This property can be changed at any point after the OoyalaPlayer is initialized.

Parameters
volumeThe volume of the player, from 1.0f (default, max), to 0.0f (muted)
void com.ooyala.android.OoyalaPlayer.setVRMode ( VrMode  mode)
boolean com.ooyala.android.OoyalaPlayer.showingAdWithHiddenControlls ( )
void com.ooyala.android.OoyalaPlayer.skipAd ( )

Skip the currently playing ad.

Do nothing if no ad is playing

void com.ooyala.android.OoyalaPlayer.suspend ( )

Suspend the current video (can be resumed later by calling resume).

This differs from pause in that it completely deconstructs the view so the layout can be changed.

void com.ooyala.android.OoyalaPlayer.suspend ( boolean  playInBackground)

Suspend the current video (can be resumed later by calling resume).

This differs from pause in that it removes the video view but the player will keep playing in the background. To get the video view back call the resume() method.

Parameters
playInBackgroundTrue if you want suspend and keep playing in the background.
void com.ooyala.android.OoyalaPlayer.switchToCastMode ( String  embedCode)
void com.ooyala.android.OoyalaPlayer.switchVRMode ( )
void com.ooyala.android.OoyalaPlayer.update ( Observable  observable,
Object  o 
)

Member Data Documentation

LayoutController com.ooyala.android.OoyalaPlayer._layoutController = null
MoviePlayerSelector com.ooyala.android.OoyalaPlayer._playerSelector
protected
final String com.ooyala.android.OoyalaPlayer.AD_COMPLETED_NOTIFICATION_NAME = "adCompleted"
static
final String com.ooyala.android.OoyalaPlayer.AD_ERROR_NOTIFICATION_NAME = "adError"
static
final String com.ooyala.android.OoyalaPlayer.AD_OVERLAY_NOTIFICATION_NAME = "adOverlay"
static
final String com.ooyala.android.OoyalaPlayer.AD_POD_COMPLETED_NOTIFICATION_NAME = "adPodCompleted"
static
final String com.ooyala.android.OoyalaPlayer.AD_POD_STARTED_NOTIFICATION_NAME = "adPodStarted"
static
final String com.ooyala.android.OoyalaPlayer.AD_SKIPPED_NOTIFICATION_NAME = "adSkipped"
static
final String com.ooyala.android.OoyalaPlayer.AD_STARTED_NOTIFICATION_NAME = "adStarted"
static
final String com.ooyala.android.OoyalaPlayer.AUDIO_TRACK_SELECTED_NOTIFICATION_NAME = "audioTrackChanged"
static

OoyalaNotification name when an audio track was selected The "data" is a title of selected audio track.

final String com.ooyala.android.OoyalaPlayer.AUTHORIZATION_READY_NOTIFICATION_NAME = "authorizationReady"
static

OoyalaNotification name when authorization Player API has been completed.

No "data" is passed in the OoyalaNotification. This notification is still usable, but it is preferred to simply listen to OoyalaPlayer.CURRENT_ITEM_CHANGED_NOTIFICATION_NAME.

final String com.ooyala.android.OoyalaPlayer.BITRATE_CHANGED_NOTIFICATION_NAME = "bitrateChanged"
static

OoyalaNotification name when the observed Bitrate is changing.

The "data" in the OoyalaNotification will be a BitrateChangedNotificationInfo object. This notification is only supported with our ExoPlayer integration.

final String com.ooyala.android.OoyalaPlayer.BUFFER_CHANGED_NOTIFICATION_NAME = "bufferChanged"
static
final String com.ooyala.android.OoyalaPlayer.BUFFERING_COMPLETED_NOTIFICATION_NAME = "bufferingCompleted"
static

OoyalaNotification name when the player completes downloading a video chunk.

No "data" is passed in the OoyalaNotification. This notification is only supported with our ExoPlayer integration.

final String com.ooyala.android.OoyalaPlayer.BUFFERING_STARTED_NOTIFICATION_NAME = "bufferingStarted"
static

OoyalaNotification name when the player begins downloading a video chunk.

No "data" is passed in the OoyalaNotification. This notification is only supported with our ExoPlayer integration.

final String com.ooyala.android.OoyalaPlayer.CC_CHANGED_NOTIFICATION_NAME = "ccChanged"
static

OoyalaNotification name when the VOD closed captions text has changed.

The "data" is a Captions object which contains text and other information.

final String com.ooyala.android.OoyalaPlayer.CC_STYLING_CHANGED_NOTIFICATION_NAME = "ccStylingChanged"
static
final String com.ooyala.android.OoyalaPlayer.CLOSED_CAPTION_TEXT = "caption"
static
final String com.ooyala.android.OoyalaPlayer.CLOSED_CAPTIONS_LANGUAGE_CHANGED_NAME = "closedCaptionsLanguageChanged"
static
final String com.ooyala.android.OoyalaPlayer.CONTENT_TREE_READY_NOTIFICATION_NAME = "contentTreeReady"
static

OoyalaNotification name when content tree Player API has been completed.

No "data" is passed in the OoyalaNotification. This notification is still usable, but it is preferred to simply listen to OoyalaPlayer.CURRENT_ITEM_CHANGED_NOTIFICATION_NAME.

final String com.ooyala.android.OoyalaPlayer.CURRENT_ITEM_CHANGED_NOTIFICATION_NAME = "currentItemChanged"
static

OoyalaNotification name when all Player API requests have been completed.

No "data" is passed in the OoyalaNotification. At this point, you can call OoyalaPlayer.getCurrentItem() to see all up-to-date information. about the item video will be played

final String com.ooyala.android.OoyalaPlayer.DESIRED_STATE_CHANGED_NOTIFICATION_NAME = "desiredStateChanged"
static
final int com.ooyala.android.OoyalaPlayer.DO_PAUSE = 1
static

Used by previousVideo and nextVideo.

When passed to them, it will cause the video to be paused after it is set.

final int com.ooyala.android.OoyalaPlayer.DO_PLAY = 0
static

Used by previousVideo and nextVideo.

When passed to them, it will cause the video to be played after it is set.

final String com.ooyala.android.OoyalaPlayer.DRM_RIGHTS_ACQUISITION_COMPLETED_NOTIFICATION_NAME = "drmRightsAcquireCompleted"
static
Deprecated:
OoyalaNotification name when the player completes Playready DRM Rights Acquisition.

No "data" is passed in the OoyalaNotification. This notification is only supported with our deprecated VisualOn/SecurePlayer integration.

final String com.ooyala.android.OoyalaPlayer.DRM_RIGHTS_ACQUISITION_STARTED_NOTIFICATION_NAME = "drmRightsAcquireStarted"
static
Deprecated:
OoyalaNotification name when the player begins Playready DRM Rights Acquisition.

No "data" is passed in the OoyalaNotification. This notification is only supported with our deprecated VisualOn/SecurePlayer integration.

final String com.ooyala.android.OoyalaPlayer.EMBED_CODE_SET_NOTIFICATION_NAME = "embedCodeSet"
static

OoyalaNotification name when the embed code/content ID has changed.

No "data" is passed in the OoyalaNotification.

boolean com.ooyala.android.OoyalaPlayer.enableCustomHLSPlayer = false
static
Deprecated:
If set to true, HLS content will be played using our custom HLS implementation rather than native the Android one.

To achieve HLS playback on Android versions before 4, set this to true and also set the enableHLS flag to true. This will have no affect unless the custom playback engine is linked and loaded in addition to the standard Ooyala Android SDK. This was only used for VisualOn integrations

boolean com.ooyala.android.OoyalaPlayer.enableCustomPlayreadyPlayer = false
static
Deprecated:
If set to true, Smooth and HLS content (both Clear and Playready-encrypted) will be allowed using our custom Playready implementation rather than native the Android one.

This will have no affect unless the custom playback engine is linked and loaded in addition to the standard Ooyala Android SDK. This was only used for VisualOn integrations

boolean com.ooyala.android.OoyalaPlayer.enableDebugDRMPlayback = false
static
Deprecated:
If set to true, DRM enabled players will perform DRM requests in a debug environment if available.

This was used for the VisualOn integration

boolean com.ooyala.android.OoyalaPlayer.enableHighResHLS = false
static

If set to true, this will allow Higher Resolution HLS streams regardless of the Android version.

WARNING: Ooyala's internal testing has shown that Android 3.x HLS support is unstable. Android 2.x does not support HLS at all. If set to false, HLS streams will only be allowed on Android 4.x and above. Also this will internally make Ooyala's APIs think that the device is iPad and may have undesired results.

boolean com.ooyala.android.OoyalaPlayer.enableHLS = false
static

If set to true, this will allow HLS streams regardless of the Android version.

WARNING: Ooyala's internal testing has shown that Android 3.x HLS support is unstable. Android 2.x does not support HLS at all. If set to false, HLS streams will only be allowed on Android 4.x and above

final String com.ooyala.android.OoyalaPlayer.ERROR_NOTIFICATION_NAME = "error"
static
final String com.ooyala.android.OoyalaPlayer.GVR_VIEW_ROTATED_NOTIFICATION_NAME = "gvrViewRotated"
static

OoyalaNotification name when the gvr view has been rotated in VR mono mode.

No "data" is passed in the OoyalaNotification.

final String com.ooyala.android.OoyalaPlayer.LIVE_CC_AVAILABILITY_CHANGED_NOTIFICATION_NAME = "liveCCAvailabilityChanged"
static

OoyalaNotification name when the player observes Live Closed Captions within the live stream.

No "data" is passed in the OoyalaNotification. This notification is only supported with our ExoPlayer integration.

final String com.ooyala.android.OoyalaPlayer.LIVE_CC_CHANGED_NOTIFICATION_NAME = "liveCCChanged"
static

OoyalaNotification name when the live closed captions text has changed.

The "data" in the OoyalaNotification will be a HashMap, which has a key of OoyalaPlayer.CLOSED_CAPTION_TEXT, and a value of the text that needs to be displayed.

final String com.ooyala.android.OoyalaPlayer.LIVE_CLOSED_CAPIONS_LANGUAGE = "Closed Captions"
static
final String com.ooyala.android.OoyalaPlayer.MANIFEST_CC_CHANGED_NOTIFICATION_NAME = "manifestCCChanged"
static

OoyalaNotification name when the manifest closed captions text has changed.

The "data" in the OoyalaNotification will be a HashMap, which has a key of OoyalaPlayer.CLOSED_CAPTION_TEXT, and a value of the text that needs to be displayed.

final String com.ooyala.android.OoyalaPlayer.METADATA_READY_NOTIFICATION_NAME = "metadataReady"
static

OoyalaNotification name when metadata Player API has been completed.

No "data" is passed in the OoyalaNotification. This notification is still usable, but it is preferred to simply listen to OoyalaPlayer.CURRENT_ITEM_CHANGED_NOTIFICATION_NAME.

final String com.ooyala.android.OoyalaPlayer.MULTI_AUDIO_ENABLED_NOTIFICATION_NAME = "multiAudioEnabled"
static

OoyalaNotification name when a current asset contains several audio tracks.

The "data" is a list of audio tracks titles

final String com.ooyala.android.OoyalaPlayer.NOTIFICATION_NAME = "name"
static
final String com.ooyala.android.OoyalaPlayer.PLAY_COMPLETED_NOTIFICATION_NAME = "playCompleted"
static
final String com.ooyala.android.OoyalaPlayer.PLAY_STARTED_NOTIFICATION_NAME = "playStarted"
static
final String com.ooyala.android.OoyalaPlayer.PLAYBACK_SPEED_ENABLED = "playbackSpeedEnabled"
static

OoyalaNotification name when playback speed was enabled The "data" is an instance of com.ooyala.android.playback.PlaybackNotificationInfo.

final String com.ooyala.android.OoyalaPlayer.PLAYBACK_SPEED_RATE_CHANGED = "playbackSpeedRateChanged"
static

OoyalaNotification name when playback speed was changed The "data" is a new value of playback speed.

final String com.ooyala.android.OoyalaPlayer.SEEK_COMPLETED_NOTIFICATION_NAME = "seekCompleted"
static

OoyalaNotification name when a video seek has started.

The "data" in the OoyalaNotification will be a SeekInfo object, which contains the time a seek starts and completes. For this notification the SeekInfo.getSeekStart() will always return 0.

final String com.ooyala.android.OoyalaPlayer.SEEK_STARTED_NOTIFICATION_NAME = "seekStarted"
static

OoyalaNotification name when a video seek has started.

The "data" in the OoyalaNotification will be a SeekInfo object, which contains the time a seek starts and completes. For this notification the SeekInfo.getSeekStart() will always return 0.

final String com.ooyala.android.OoyalaPlayer.STATE_CHANGED_NOTIFICATION_NAME = "stateChanged"
static
final String com.ooyala.android.OoyalaPlayer.STREAM_PARAMS_UPDATED_NOTIFICATION_NAME = "streamParamsUpdated"
static

OoyalaNotification name when audio and video tracks were selected No "data" is passed in the OoyalaNotification.

final String com.ooyala.android.OoyalaPlayer.TIME_CHANGED_NOTIFICATION_NAME = "timeChanged"
static

OoyalaNotification name when the time has changed during video rendering.

No "data" is passed in the OoyalaNotification.

final String com.ooyala.android.OoyalaPlayer.VR_MODE_CHANGED_NOTIFICATION_NAME = "vrModeChanged"
static

OoyalaNotification name when the VR mode has changed.

No "data" is passed in the OoyalaNotification.