Package 

Class MediaManager

  • All Implemented Interfaces:
    com.glia.androidsdk.comms.Media

    
    public class MediaManager
     implements Media
                        
    • Method Detail

      • on

         <T> void on(Media.MediaEvent<T> event, Consumer<T> listener)

        Registers event listeners for Media.

        If a listener is added while the event is being processing,it is not triggered with the current event.

        If multiple identical listeners are registered on the same event typethe duplicate instances are discarded. They do not cause the listenerto be called twice and do not need to be removed with the off or off method.

        Parameters:
        event - One of Events
        listener - Event listener to register
      • off

         <T> void off(Media.MediaEvent<T> event, Consumer<T> listener)

        Removes event listeners from Media.

        If a listener is removed while the event is being processing,it is not triggered with the current event.

        Calling {@code off} with arguments which do not identify any currently registeredlistener has no effect.

        Parameters:
        event - One of Events
        listener - Event listener to remove
      • off

         <T> void off(Media.MediaEvent<T> event)

        Removes all event listeners from Media.

        Behaves the same way as off but removes all listeners of specified type

        Parameters:
        event - One of Events