Package com.my.target.instreamads
Interface InstreamAudioAdPlayer
-
public interface InstreamAudioAdPlayerThis interface must be implemented in advertisement Audioplayer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceInstreamAudioAdPlayer.AdPlayerListenerCalls from this listener must be implemented in audioplayer for calculating audio ad statistics
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddestroy()Shutdown all connections and release all resourcesfloatgetAdAudioDuration()Retrieving duration of current playing advertising AudiofloatgetAdAudioPosition()Retrieving play time left of current playing advertising AudioInstreamAudioAdPlayer.AdPlayerListenergetAdPlayerListener()android.content.ContextgetCurrentContext()voidpauseAdAudio()Call player to pause current playing advoidplayAdAudio(android.net.Uri uri)Call player to play Audiofile or stream with predefined dimensionsvoidresumeAdAudio()Call player to resume current playing advoidsetAdPlayerListener(InstreamAudioAdPlayer.AdPlayerListener listener)Sets listener for ad playing eventsvoidsetVolume(float volume)Setting the volumevoidstopAdAudio()Call player to stop current audio ad.
-
-
-
Method Detail
-
getAdPlayerListener
@Nullable InstreamAudioAdPlayer.AdPlayerListener getAdPlayerListener()
-
getAdAudioDuration
float getAdAudioDuration()
Retrieving duration of current playing advertising Audio
-
getAdAudioPosition
float getAdAudioPosition()
Retrieving play time left of current playing advertising Audio
-
getCurrentContext
@NonNull android.content.Context getCurrentContext()
- Returns:
- current context
-
setAdPlayerListener
void setAdPlayerListener(@Nullable InstreamAudioAdPlayer.AdPlayerListener listener)Sets listener for ad playing events- Parameters:
listener- listener should be set
-
playAdAudio
void playAdAudio(@NonNull android.net.Uri uri)Call player to play Audiofile or stream with predefined dimensions- Parameters:
uri- URI of audio of stream
-
pauseAdAudio
void pauseAdAudio()
Call player to pause current playing ad
-
resumeAdAudio
void resumeAdAudio()
Call player to resume current playing ad
-
stopAdAudio
void stopAdAudio()
Call player to stop current audio ad. This call means we don't plan start same audio ad in this player
-
destroy
void destroy()
Shutdown all connections and release all resources
-
setVolume
void setVolume(float volume)
Setting the volume- Parameters:
volume- volume
-
-