AddonSession

@PublicApi
public interface AddonSession



Une session complémentaire.

Contient des méthodes communes à toutes les sessions de modules complémentaires. Pour accéder au visionnage à plusieurs et au co-faire, appelez respectivement getCoWatching et getCoDoing.

Résumé

Types imbriqués

Compilateur pour AddonSession.

Raisons pour lesquelles le client du module complémentaire met fin à la session du module complémentaire.

Méthodes publiques

abstract ListenableFuture<Void>

Met fin à la session du module complémentaire et se déconnecte de l'application Meet.

abstract ListenableFuture<Void>

Met fin à la session complémentaire, se déconnecte de l'application Meet et informe Meet du motif.

abstract void

Quitter l'état "Suspendu"

abstract CoDoingClient

Renvoie l'instance CoDoingClient.

abstract CoWatchingClient

Renvoie l'instance CoWatchingClient.

abstract AddonMeetingInfo

Renvoie des informations sur la réunion connectée, telles que son URL.

abstract boolean

Renvoie true si la session est terminée.

abstract boolean

Indique si la session est suspendue.

abstract void

Réinitialise l'état de départ du module complémentaire.

abstract void

Suspend la session du module complémentaire.

abstract void

Met à jour l'état de départ du module complémentaire.

abstract void
updateParticipantMetadata(byte[] metadata)

Met à jour les métadonnées de ce participant.

Méthodes publiques

endSession

abstract ListenableFuture<VoidendSession()

Met fin à la session du module complémentaire et se déconnecte de l'application Meet. Cela ne force pas Meet à mettre fin à la réunion et n'oblige pas l'utilisateur à la quitter.

Si la session est déjà terminée, il s'agit d'une opération no-op ; aucune exception ne sera générée.

Renvoie
ListenableFuture<Void>

une ListenableFuture qui renvoie la réussite ou une AddonException en cas d'erreur inattendue.

endSession

abstract ListenableFuture<VoidendSession(AddonSession.EndReason endReason)

Met fin à la session complémentaire, se déconnecte de l'application Meet et informe Meet du motif. Cela ne force pas Meet à mettre fin à la réunion et n'oblige pas l'utilisateur à la quitter.

Meet peut effectuer les actions correspondantes convenues avec le client du module complémentaire en fonction du motif.

Si la session est déjà terminée, il s'agit d'une opération no-op ; aucune exception ne sera générée.

Uniquement visible par les clients du module complémentaire autorisés à mettre fin à la session avec un motif.

Cette méthode renverrait le même résultat que endSession if the EndReason is UNKNOWN or not valid.

Parameters
AddonSession.EndReason endReason

The reason for the add-onclient to end the add-on session.

Returns
ListenableFuture<Void>

a ListenableFuture which evaluates to success or an AddonException

endSuspension

abstract void endSuspension()

Exits the state of suspended. The add-on app is once again able to send and receive updates.

If the this is not in a state of suspended, this is a no-op.

Throws
java.lang.IllegalStateException

if the session has ended. This could either be an explicit call to endSession or it could be due to an external reason which would be surfaced via onSessionEnded.

getCoDoing

abstract CoDoingClient getCoDoing()

Returns the CoDoingClient instance.

Throws
java.lang.IllegalStateException

if the session was built without calling withCoDoing or if the session has ended

getCoWatching

abstract CoWatchingClient getCoWatching()

Returns the CoWatchingClient instance.

Throws
java.lang.IllegalStateException

if the session was built without calling withCoWatching or if the session has ended

getMeetingInfo

abstract AddonMeetingInfo getMeetingInfo()

Returns information about the connected meeting, such as the meeting URL.

Throws
java.lang.IllegalStateException

if the session has ended. This could either be an explicit call to endSession or it could be due to an external reason which would be surfaced via onSessionEnded.

isSessionEnded

abstract boolean isSessionEnded()

Returns true if the session has ended. This could either be from an explicit call to endSession or it could be due to an external reason which would be surfaced via onSessionEnded.

Throws
java.lang.IllegalStateException

if the session has ended. This could either be an explicit call to endSession or it could be due to an external reason which would be surfaced via onSessionEnded

isSuspended

abstract boolean isSuspended()

Indicates whether the session is suspended. See suspend and endSuspension.

Throws
java.lang.IllegalStateException

if the session has ended. This could either be an explicit call to endSession or it could be due to an external reason which would be surfaced via onSessionEnded.

resetCollaborationStartingState

abstract void resetCollaborationStartingState()

Resets the starting state of the add-on. This will clear the starting state previously received by other participants. The starting state can only be reset by the initiator.

suspend

abstract void suspend()

Suspends the add-on session. This does NOT disconnect from the Meet app. This causes the SDK to avoid sending updates to your CoDoingHandler and CoWatchingHandler, and causes the SDK to ignore calls to notify calls and to ignore calls to update the global state.

If the session is already suspended, this is a no-op.

For example, you may choose to call suspend when a user, but not every user, has playback interrupted to view an ad, when a user backgrounds the application, etc.

Throws
java.lang.IllegalStateException

if the session has ended. This could either be an explicit call to endSession or it could be due to an external reason which would be surfaced via onSessionEnded.

updateCollaborationStartingState

abstract void updateCollaborationStartingState(
    CollaborationStartingState startingState
)

Updates the starting state of the add-on. This is received by other participants when they accept the invitation to collaborate. The starting state can only be updated by the initiator.

Parameters
CollaborationStartingState startingState

the starting state of add-on

updateParticipantMetadata

abstract void updateParticipantMetadata(byte[] metadata)

Updates the metadata for this participant.

To receive metadata from other participants, a handler must be registered by calling withParticipantMetadata while building the AddonSession.

The encoded metadata is capped at MAX_INDIVIDUAL_PARTICIPANT_METADATA_SIZE_BYTES bytes per participant.

Parameters
byte[] metadata

an encoded blob of metadata that describes relevant metadata for the local participant

Throws
java.lang.IllegalArgumentException

if the provided metadata exceeds MAX_INDIVIDUAL_PARTICIPANT_METADATA_SIZE_BYTES bytes

java.lang.IllegalStateException

if the session has ended. This could either be an explicit call to endSession or it could be due to an external reason which would be surfaced via onSessionEnded.