Package com.my.target.instreamads
Interface InstreamAudioAdPlayer
public interface InstreamAudioAdPlayer
This interface must be implemented in advertisement Audioplayer.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceCalls from this listener must be implemented in audioplayer for calculating audio ad statistics -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Shutdown all connections and release all resourcesfloatRetrieving duration of current playing advertising AudiofloatRetrieving play time left of current playing advertising Audioandroid.content.ContextvoidCall player to pause current playing advoidplayAdAudio(android.net.Uri uri) Call player to play Audiofile or stream with predefined dimensionsvoidCall player to resume current playing advoidSets listener for ad playing eventsvoidsetVolume(float volume) Setting the volumevoidCall player to stop current audio ad.
-
Method Details
-
getAdPlayerListener
-
setAdPlayerListener
Sets listener for ad playing events- Parameters:
listener- listener should be set
-
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
-
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
-