public interface

Media

com.glia.androidsdk.comms.Media

Class Overview

Interface for managing different media during Engagement.

To get instance of this class use getMedia()

Summary

Nested Classes
class Media.Events Defines media event types. 
interface Media.MediaEvent<T>  
enum Media.Status Defines possible media statuses. 
Public Methods
abstract <T> void off(MediaEvent<T> event, Consumer<T> listener)
Removes event listeners from Media.
abstract <T> void off(MediaEvent<T> event)
Removes all event listeners from Media.
abstract <T> void on(MediaEvent<T> event, Consumer<T> listener)
Registers event listeners for Media.

Public Methods

public abstract void off (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 off with arguments which do not identify any currently registered listener has no effect.

Parameters
event One of Media.Events
listener Event listener to remove

public abstract void off (MediaEvent<T> event)

Removes all event listeners from Media.

Behaves the same way as off(MediaEvent, Consumer) but removes all listeners of specified type

Parameters
event One of Media.Events

public abstract void on (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 type the duplicate instances are discarded. They do not cause the listener to be called twice and do not need to be removed with the off(MediaEvent) or off(MediaEvent, Consumer) method.

Parameters
event One of Media.Events
listener Event listener to register