Interface InstreamAudioAdPlayer


  • public interface InstreamAudioAdPlayer
    This interface must be implemented in advertisement Audioplayer.
    • Method Detail

      • 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