Package live.hms.video.interactivity
Class HmsInteractivityCenter
-
- All Implemented Interfaces:
public final class HmsInteractivityCenter
-
-
Field Summary
Fields Modifier and Type Field Description private HmsPollUpdateListenerpollUpdateListenerprivate final List<HmsPoll>pollsprivate StatecurrentWhiteBoardState
-
Method Summary
Modifier and Type Method Description final HmsPollUpdateListenergetPollUpdateListener()Called when a poll is started/stopped/updated. final UnitsetPollUpdateListener(HmsPollUpdateListener pollUpdateListener)Called when a poll is started/stopped/updated. final List<HmsPoll>getPolls()The array of polls managed by the interactivity center. final StategetCurrentWhiteBoardState()final UnitsetCurrentWhiteBoardState(State currentWhiteBoardState)final UnitquickStartPoll(HMSPollBuilder poll, HMSActionResultListener completion)Start a poll. final Unitstop(HmsPoll poll, HMSActionResultListener completion)End a poll. final Unitadd(HMSPollResponseBuilder response, HmsTypedActionResultListener<PollAnswerResponse> completion)Adds a response (vote) to a poll. final UnitgetResponses(HmsPoll poll, Integer offset, @IntRange(from = 1, to = 50) Integer count, Boolean ownResponsesOnly, HmsTypedActionResultListener<List<HMSPollQuestionResponse>> completion)Retrieve full responses. final UnitgetPollResults(HmsPoll poll, HmsTypedActionResultListener<HmsPoll> completion)final UnitfetchLeaderboard(String pollId, Long count, Long startIndex, Boolean includeCurrentPeer, HmsTypedActionResultListener<PollLeaderboardResponse> completion)final UnitfetchPollQuestions(HmsPoll poll, HmsTypedActionResultListener<List<HMSPollQuestion>> completion)final UnitfetchPollList(HmsPollState pollState, HmsTypedActionResultListener<List<HmsPoll>> completion)final UnitsetWhiteboardUpdateListener(HMSWhiteboardUpdateListener whiteBoardUpdateListener)This function update state of current whitebaard session HMSWhiteboardUpdate.Start and HMSWhiteboardUpdate.Stop final UnitremoveWhiteboardUpdateListener(HMSWhiteboardUpdateListener whiteBoardUpdateListener)final UnitstartWhiteboard(String title, HMSActionResultListener completion)This function starts a new whiteboard session, make sure you have the admin permission in [] final UnitstopWhiteboard(HMSActionResultListener completion)This function stops the current whiteboard session. -
-
Method Detail
-
getPollUpdateListener
final HmsPollUpdateListener getPollUpdateListener()
Called when a poll is started/stopped/updated.
-
setPollUpdateListener
final Unit setPollUpdateListener(HmsPollUpdateListener pollUpdateListener)
Called when a poll is started/stopped/updated.
-
getCurrentWhiteBoardState
final State getCurrentWhiteBoardState()
-
setCurrentWhiteBoardState
final Unit setCurrentWhiteBoardState(State currentWhiteBoardState)
-
quickStartPoll
final Unit quickStartPoll(HMSPollBuilder poll, HMSActionResultListener completion)
Start a poll.
- Parameters:
poll- the information with which to start a poll.completion- the listener to be called on success or error with the result.
-
stop
final Unit stop(HmsPoll poll, HMSActionResultListener completion)
End a poll.
- Parameters:
poll- the poll to end.completion- the listener to be called on success or error with the result.
-
add
final Unit add(HMSPollResponseBuilder response, HmsTypedActionResultListener<PollAnswerResponse> completion)
Adds a response (vote) to a poll.
- Parameters:
response- the responses to add to the poll.completion- the listener to be called on success or error with the result.
-
getResponses
final Unit getResponses(HmsPoll poll, Integer offset, @IntRange(from = 1, to = 50) Integer count, Boolean ownResponsesOnly, HmsTypedActionResultListener<List<HMSPollQuestionResponse>> completion)
Retrieve full responses.
- Parameters:
poll- the poll that responses are sought for.offset- the offset for paginated responses.count- number of responses to fetchownResponsesOnly- whether only the requesters own responses should be returned.completion- the listener to be called on success with the results or onError with the error.
-
getPollResults
final Unit getPollResults(HmsPoll poll, HmsTypedActionResultListener<HmsPoll> completion)
-
fetchLeaderboard
final Unit fetchLeaderboard(String pollId, Long count, Long startIndex, Boolean includeCurrentPeer, HmsTypedActionResultListener<PollLeaderboardResponse> completion)
-
fetchPollQuestions
final Unit fetchPollQuestions(HmsPoll poll, HmsTypedActionResultListener<List<HMSPollQuestion>> completion)
-
fetchPollList
final Unit fetchPollList(HmsPollState pollState, HmsTypedActionResultListener<List<HmsPoll>> completion)
-
setWhiteboardUpdateListener
final Unit setWhiteboardUpdateListener(HMSWhiteboardUpdateListener whiteBoardUpdateListener)
This function update state of current whitebaard session HMSWhiteboardUpdate.Start and HMSWhiteboardUpdate.Stop
- Parameters:
whiteBoardUpdateListener- An interface for receiving updates related to (HMS) whiteboard.
-
removeWhiteboardUpdateListener
final Unit removeWhiteboardUpdateListener(HMSWhiteboardUpdateListener whiteBoardUpdateListener)
-
startWhiteboard
final Unit startWhiteboard(String title, HMSActionResultListener completion)
This function starts a new whiteboard session, make sure you have the admin permission in []
- Parameters:
title- The title of the whiteboard.completion- A listener for the result of the operation (success or error).
-
stopWhiteboard
final Unit stopWhiteboard(HMSActionResultListener completion)
This function stops the current whiteboard session.
- Parameters:
completion- A listener for the result of the operation (success or error).
-
-
-
-