|
| | TritonPlayer (Context context, Bundle settings) |
| | Constructor. More...
|
| |
|
String | getAlternateMount () |
| | Returns the alternate mount used if the station is using content blocking.
|
| |
|
String | getCastStreamingUrl () |
| | Returns the Stream URL to cast to Google Cast devices.
|
| |
|
String | getSideBandMetadataUrl () |
| | Returns the Side Band MetaData Url.
|
| |
| void | setMediaRoute (MediaRouter.RouteInfo routeInfo) |
| | Sets the media route to use for the current player instance. More...
|
| |
| | MediaPlayer (Context context, Bundle settings) |
| | Constructor. More...
|
| |
| abstract int | getDuration () |
| | Returns the duration of the current media in milliseconds. More...
|
| |
| int | getErrorCode () |
| |
|
Bundle | getLastCuePoint () |
| | Returns the last received cue point.
|
| |
|
int | getLastErrorCode () |
| | Returns the last error code.
|
| |
|
OnMetaDataReceivedListener | getMetadataListener () |
| | Returns the metadata listener.
|
| |
|
OnCuePointReceivedListener | getOnCuePointReceivedListener () |
| | Returns the cue point listener.
|
| |
|
OnInfoListener | getOnInfoListener () |
| | Returns the info listener.
|
| |
|
OnStateChangedListener | getOnStateChangedListener () |
| | Returns the state changed listener.
|
| |
|
abstract int | getPosition () |
| | Returns the current position playback position in milliseconds.
|
| |
|
Bundle | getSettings () |
| | Returns the settings of this player.
|
| |
|
int | getState () |
| | Returns the player's state.
|
| |
|
abstract float | getVolume () |
| | Returns the current volume (0.0f to 1.0f)
|
| |
|
boolean | isPausable () |
| | Returns true if the media can be paused at the current state.
|
| |
| boolean | isSeekable () |
| | Returns true if the media is seekable in the current state. More...
|
| |
|
abstract boolean | isTimeshiftStreaming () |
| | Returns if the player is in timeshift mode.
|
| |
| final void | pause () |
| | Pauses the playback so it can be resumed at the same position by calling play(). More...
|
| |
|
final void | play (boolean timeshiftStreaming) |
| | Starts the playback.
|
| |
| final void | release () |
| | Releases the player resources. More...
|
| |
|
void | seek (int delta) |
| | Seek to a time from the current position.
|
| |
| final void | seekTo (int position) |
| | Seek to the provided position. More...
|
| |
| final void | seekTo (int position, int original) |
| | Seek to the provided position. More...
|
| |
|
void | setOnAnalyticsReceivedListener (OnAnalyticsReceivedListener listener) |
| | Sets the analytics changed listener.
|
| |
|
void | setOnCloudStreamInfoReceivedListener (OnCloudStreamInfoReceivedListener listener) |
| | Sets the timeshift programs listener.
|
| |
|
void | setOnCuePointReceivedListener (OnCuePointReceivedListener listener) |
| | Sets the cue point event listener.
|
| |
|
void | setOnInfoListener (OnInfoListener listener) |
| | Sets the info listener.
|
| |
|
void | setOnMetaDataReceivedListener (OnMetaDataReceivedListener listener) |
| | Sets the cue point event listener.
|
| |
|
void | setOnStateChangedListener (OnStateChangedListener listener) |
| | Sets the state changed listener.
|
| |
| abstract void | setVolume (float volume) |
| | Sets the volume on this player. More...
|
| |
|
final void | stop () |
| | Stops the playback.
|
| |
|
|
static final String | MIME_TYPE_AAC = PlayerConsts.MIME_TYPE_AAC |
| | AAC MIME type.
|
| |
|
static final String | MIME_TYPE_MPEG = PlayerConsts.MIME_TYPE_MPEG |
| | MP3 MIME type.
|
| |
|
static final String | SETTINGS_DMP_SEGMENTS = PlayerConsts.DMP_SEGMENTS |
| | Use when adding DMP Segment Headers.
|
| |
|
static final String | SETTINGS_FORCE_DISABLE_EXOPLAYER = PlayerConsts.FORCE_DISABLE_EXOPLAYER |
| | Force the disabling of the ExoPlayer.
|
| |
|
static final String | SETTINGS_LOW_DELAY = PlayerConsts.LOW_DELAY |
| | Low Delay.
|
| |
|
static final String | SETTINGS_MEDIA_ITEM_METADATA = PlayerConsts.MEDIA_ITEM_METADATA |
| | Bundle - Metadata for Google Cast
|
| |
|
static final String | SETTINGS_PLAYER_SERVICES_REGION = PlayerConsts.PLAYER_SERVICES_REGION |
| | Prefix used in the playerServices Url to target a specific provisioning service.
|
| |
|
static final String | SETTINGS_STATION_BROADCASTER = PlayerConsts.STATION_BROADCASTER |
| | String - Broadcaster (e.g. "Triton Digital")
|
| |
|
static final String | SETTINGS_STATION_MOUNT = PlayerConsts.STATION_MOUNT |
| | String - Station mount (e.g. "MOBILEFMAAC")
|
| |
|
static final String | SETTINGS_STATION_NAME = PlayerConsts.STATION_NAME |
| | String - Station unique identifier (e.g. "MOBILEFM")
|
| |
| static final String | SETTINGS_STREAM_MIME_TYPE = PlayerConsts.MIME_TYPE |
| | String - MIME type More...
|
| |
|
static final String | SETTINGS_STREAM_URL = PlayerConsts.STREAM_URL |
| | String - Stream URL
|
| |
|
static final String | SETTINGS_TARGETING_LOCATION_TRACKING_ENABLED = PlayerConsts.TARGETING_LOCATION_TRACKING_ENABLED |
| | Boolean - Enable the location tracking (Default: false)
|
| |
| static final String | SETTINGS_TARGETING_PARAMS = PlayerConsts.TARGETING_PARAMS |
| | HashMap<String, String> - Advertising targeting parameters. More...
|
| |
|
static final String | SETTINGS_TRANSPORT = PlayerConsts.TRANSPORT |
| | String - Stream transport (TRANSPORT_FLV, TRANSPORT_HLS or TRANSPORT_SC)
|
| |
|
static final String | SETTINGS_TTAGS = PlayerConsts.TTAGS |
| | TTags.
|
| |
|
static final String | TRANSPORT_FLV = PlayerConsts.TRANSPORT_FLV |
| | FLV transport.
|
| |
|
static final String | TRANSPORT_HLS = PlayerConsts.TRANSPORT_HLS |
| | HLS transport.
|
| |
|
static final String | TRANSPORT_SC = PlayerConsts.TRANSPORT_SC |
| | SHOUTcast transport.
|
| |
|
static final int | DURATION_LIVE_STREAM = Integer.MAX_VALUE |
| | Live stream.
|
| |
|
static final int | DURATION_UNKNOWN = -1 |
| | Unknown duration.
|
| |
|
static final int | ERROR_CONNECTION_FAILED = 211 |
| | Error code indicating a connection problem to the server.
|
| |
|
static final int | ERROR_CONNECTION_TIMEOUT = 408 |
| | Error code indicating than the connection has timed out.
|
| |
| static final int | ERROR_END_OF_MEDIA = ERROR_UNEXPECTED_END_OF_MEDIA |
| |
|
static final int | ERROR_EXOPLAYER_BUFFER_RECONNECT = 212 |
| | Error code indicating that low delay increased 3 times an still did not fill the buffer.
|
| |
| static final int | ERROR_EXOPLAYER_BUFFER_TIMEOUT = 218 |
| | Error code indicating buffer timed out. More...
|
| |
| static final int | ERROR_EXOPLAYER_ON_ERROR = 219 |
| | Error code indicating buffer timed out. More...
|
| |
|
static final int | ERROR_GEOBLOCKED = 453 |
| | Error code indicating that the stream can't be used in the user location.
|
| |
|
static final int | ERROR_INVALID_URL = 216 |
| | Error code indicating that the URL isn't in a valid format.
|
| |
|
static final int | ERROR_LOW_LEVEL_PLAYER_ERROR = 210 |
| | Error code indicating an error in the OS player or Google Cast.
|
| |
|
static final int | ERROR_NO_NETWORK = 217 |
| | Error code indicating the lack of network connectivity.
|
| |
|
static final int | ERROR_NOT_FOUND = 404 |
| | Error code indicating that the input source couldn't be found.
|
| |
|
static final int | ERROR_SERVICE_UNAVAILABLE = 503 |
| | Error code indicating that no server is available.
|
| |
|
static final int | ERROR_UNEXPECTED_END_OF_MEDIA = 213 |
| | Error code indicating the end of a media which shouldn't occur on live streaming.
|
| |
|
static final int | ERROR_UNEXPECTED_END_OF_MEDIA_ANDROID_PLAYER = 214 |
| | Error code indicating the end of a media which shouldn't occur on live streaming.
|
| |
|
static final int | INFO_ALTERNATE_MOUNT = 270 |
| | A the player has connected to an alternate mount.
|
| |
|
static final int | INFO_BUFFERING_COMPLETED = 276 |
| | The playback is resumed after filling buffers.
|
| |
|
static final int | INFO_BUFFERING_START = 275 |
| | Temporarily pausing playback internally in order to buffer more data.
|
| |
|
static final int | INFO_DURATION_CHANGED = 272 |
| | Media duration changed (extra=duration)
|
| |
|
static final int | INFO_SEEK_COMPLETED = 271 |
| | A seek operation has completed.
|
| |
|
static final int | INFO_SEEK_STARTED = 274 |
| | A seek operation has begun.
|
| |
|
static final int | INFO_SEEKABLE_CHANGED = 273 |
| | Seekable state change (0=false / 1=true)
|
| |
|
static final int | POSITION_UNKNOWN = 0 |
| | Unknown position.
|
| |
|
static final int | STATE_COMPLETED = 200 |
| | The end of the media source has been reached (on-demand only)
|
| |
|
static final int | STATE_CONNECTING = 201 |
| | The player is connecting to the server or buffering.
|
| |
|
static final int | STATE_ERROR = 202 |
| | An error has occurred.
|
| |
|
static final int | STATE_PAUSED = 206 |
| | The playback is paused (on-demand only)
|
| |
|
static final int | STATE_PLAYING = 203 |
| | The playback is started.
|
| |
|
static final int | STATE_RELEASED = 204 |
| | The resources have been released and this player instance can no longer be used.
|
| |
|
static final int | STATE_STOPPED = 205 |
| | The playback is stopped.
|
| |
|
static final float | VOLUME_DUCK = 0.2f |
| | Ducked volume.
|
| |
|
static final float | VOLUME_MUTE = 0.0f |
| | Muted volume.
|
| |
|
static final float | VOLUME_NORMAL = 1.0f |
| | Normal volume.
|
| |
Plays a station provided by Triton Digital or an on-demand stream.
- Example - Play a Station
Bundle settings = new Bundle();
player.play();
Plays a station provided by Triton Digital or an on-demand stream.
Definition: TritonPlayer.java:161
static final String SETTINGS_STATION_BROADCASTER
String - Broadcaster (e.g. "Triton Digital")
Definition: TritonPlayer.java:168
TritonPlayer(Context context, Bundle settings)
Constructor.
Definition: TritonPlayer.java:247
static final String SETTINGS_STATION_MOUNT
String - Station mount (e.g. "MOBILEFMAAC")
Definition: TritonPlayer.java:174
static final String SETTINGS_STATION_NAME
String - Station unique identifier (e.g. "MOBILEFM")
Definition: TritonPlayer.java:171
- Example - Change the Station
if (player != null)
{
}
player.play();
- Example - Target Audio Ads
HashMap<String, String> targetingParams = new HashMap();
Bundle settings = new Bundle();
player.play();
Helps create station stream URLs.
Definition: StreamUrlBuilder.java:25
static final String POSTAL_CODE
String - Postal/ZIP code
Definition: StreamUrlBuilder.java:52
static final String YEAR_OF_BIRTH
int - Year of birth (1900 to 2005)
Definition: StreamUrlBuilder.java:87
static final String COUNTRY_CODE
String - Country code (ISO 3166-1 alpha-2)
Definition: StreamUrlBuilder.java:62
static final String GENDER
char - Gender ('m' or 'f')
Definition: StreamUrlBuilder.java:90
static final String SETTINGS_TARGETING_LOCATION_TRACKING_ENABLED
Boolean - Enable the location tracking (Default: false)
Definition: TritonPlayer.java:197
static final String SETTINGS_TARGETING_PARAMS
HashMap<String, String> - Advertising targeting parameters.
Definition: TritonPlayer.java:194
- Example - Token Authorization (self signed)
HashMap<String, String> targetingParams = new HashMap();
String token = AuthUtil.createJwtToken("MySecretKey", "MySecretKeyId", true, "foo@bar.com", targetingParams);
Bundle settings = new Bundle();
settings.putString(
TritonPlayer.SETTINGS_AUTH_TOKEN, token);
player.play();
- Example - Receive Cue Points
@Override
public void onCuePointReceived(
MediaPlayer player, Bundle cuePoint) {
}
};
player.setOnCuePointReceivedListener(listener);
player.play();
- Example - Display Sync Banners
private SyncBannerView mSyncBannerView;
@Override
protected void onPause() {
mSyncBannerView.onPause();
super.onPause();
}
@Override
protected void onResume() {
super.onResume();
mSyncBannerView.onResume();
}
@Override
protected void onDestroy() {
mSyncBannerView.release();
super.onDestroy();
}
@Override
public void onCuePointReceived(
MediaPlayer player, Bundle cuePoint) {
mSyncBannerView.loadCuePoint(cuePoint);
}
private void initBanner() {
mSyncBannerView = (SyncBannerView)findViewById(mySyncBannerId);
mSyncBannerView.setBannerSize(320, 50);
}
- Example - Play an On-Demand Stream
Bundle settings = new Bundle();
player.play();
static final String SETTINGS_STREAM_URL
String - Stream URL
Definition: TritonPlayer.java:177