public interface

OperatorMediaState

implements MediaState
com.glia.androidsdk.comms.OperatorMediaState

Class Overview

Object that represents Operator media state. It is used as part of Media.Events.

Usage example:

 
 engagement.getMedia().on(Media.Events.OPERATOR_STATE_UPDATE, (operatorState) -> {
     runOnUiThread(() -> {
         if (operatorState.getAudio() != null) {
             // Operator is sharing audio
         } else {
             // Operator is not sharing audio
         }

         if (operatorState.getVideo() != null) {
             // Operator is sharing video
         } else {
             // Operator is not sharing video
         }
     });
 });
 
 

Summary

Public Methods
abstract Audio getAudio()
Can be used to play a streaming audio in the app.
abstract Video getVideo()
Can be used to display a streaming video in the app.
[Expand]
Inherited Methods
From interface com.glia.androidsdk.comms.MediaState

Public Methods

public abstract Audio getAudio ()

Can be used to play a streaming audio in the app. Is an instance of Audio when Operator audio is started, otherwise is null.

public abstract Video getVideo ()

Can be used to display a streaming video in the app. Is an instance of Video when Operator video is started, otherwise is null.