Package com.my.target.instreamads
Interface InstreamAudioAdPlayer
-
- All Implemented Interfaces:
public interface InstreamAudioAdPlayerThis interface must be implemented in advertisement Audioplayer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceInstreamAudioAdPlayer.AdPlayerListenerCalls from this listener must be implemented in audioplayer for calculating audio ad statistics
-
Method Summary
Modifier and Type Method Description abstract voiddestroy()Shutdown all connections and release all resources abstract floatgetAdAudioDuration()Retrieving duration of current playing advertising Audio abstract floatgetAdAudioPosition()Retrieving play time left of current playing advertising Audio abstract InstreamAudioAdPlayer.AdPlayerListenergetAdPlayerListener()abstract ContextgetCurrentContext()abstract voidpauseAdAudio()Call player to pause current playing ad abstract voidplayAdAudio(@NonNull() Uri uri)Call player to play Audiofile or stream with predefined dimensions. abstract voidplayAdAudio(@NonNull() Uri uri, @NonNull() InstreamAudioAd.InstreamAudioAdBanner instreamAudioAdBanner)Call player to play Audiofile or stream with predefined dimensions abstract voidresumeAdAudio()Call player to resume current playing ad abstract voidsetAdPlayerListener(@Nullable() InstreamAudioAdPlayer.AdPlayerListener listener)Sets listener for ad playing events abstract voidsetVolume(float volume)Setting the volume abstract voidstopAdAudio()Call player to stop current audio ad. -
-
Method Detail
-
destroy
abstract void destroy()
Shutdown all connections and release all resources
-
getAdAudioDuration
abstract float getAdAudioDuration()
Retrieving duration of current playing advertising Audio
-
getAdAudioPosition
abstract float getAdAudioPosition()
Retrieving play time left of current playing advertising Audio
-
getAdPlayerListener
@Nullable() abstract InstreamAudioAdPlayer.AdPlayerListener getAdPlayerListener()
-
getCurrentContext
@NonNull() abstract Context getCurrentContext()
- Returns:
current context
-
pauseAdAudio
abstract void pauseAdAudio()
Call player to pause current playing ad
-
playAdAudio
@Deprecated() abstract void playAdAudio(@NonNull() Uri uri)
Call player to play Audiofile or stream with predefined dimensions.
- Parameters:
uri- URI of audio of stream
-
playAdAudio
abstract void playAdAudio(@NonNull() Uri uri, @NonNull() InstreamAudioAd.InstreamAudioAdBanner instreamAudioAdBanner)
Call player to play Audiofile or stream with predefined dimensions
- Parameters:
uri- URI of audio of stream, may point to HTTPS or local file (cached) resourceinstreamAudioAdBanner- audio banner to be played
-
resumeAdAudio
abstract void resumeAdAudio()
Call player to resume current playing ad
-
setAdPlayerListener
abstract void setAdPlayerListener(@Nullable() InstreamAudioAdPlayer.AdPlayerListener listener)
Sets listener for ad playing events
- Parameters:
listener- listener should be set
-
setVolume
abstract void setVolume(float volume)
Setting the volume
- Parameters:
volume- volume
-
stopAdAudio
abstract void stopAdAudio()
Call player to stop current audio ad. This call means we don't plan start same audio ad in this player
-
-
-
-