public interface

VisitorMediaState

implements MediaState
com.glia.androidsdk.comms.VisitorMediaState

Class Overview

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

Usage example:

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

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

Summary

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

Public Methods

public abstract Audio getAudio ()

Can be used to view streaming audio state. Is an instance of Audio when Visitor audio is started, otherwise is null.

public abstract Video getVideo ()

Can be used to display a streaming video in the app and view its state. Is an instance of Video when Visitor video is started, otherwise is null.