Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

IMixerInteractivityModule

Gersh Payzer edited this page Jun 7, 2018 · 6 revisions

Description

Interface for Mixer Interactivity features. Exposes user authentication, state control, and remote events for consumption by C++ game code.

Methods

Get

Description

A singleton-like access to this module's interface. This is purely for convenience. Be aware of calling this during the shutdown phase. Your module might have been unloaded already.

Returns
IMixerInteractivityModule

Returns singleton instance, loading the module on demand if needed


IsAvailable

Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.

Returns

bool

True if the module is loaded and ready to use.


LoginSilently

Description

Sign a local user into the Mixer service without displaying UI. The operation will fail if user interaction. would be required to complete sign-in. The operation takes place asynchronously, with changes reported via the OnLoginStateChanged event.

Parameters
UserId (TSharedPtr<const FUniqueNetId>)

Network id for the local user whose identity will be used for Mixer login.

Returns
bool

True if a login attempt was started; results will be reported via OnLoginStateChanged.


LoginWithUI

Description

Sign a local user into the Mixer service displaying OAuth login UI if necessary. UI will be hosted in a default-styled popup window. The operation takes place asynchronously, with changes reported via the OnLoginStateChanged event. Not supported on all platforms.

Parameters
UserId (TSharedPtr<const FUniqueNetId>)

Network id for the local user whose identity will be used for Mixer login.

Returns
bool

True if a login attempt was started; results will be reported via OnLoginStateChanged.


LoginWithAuthCode

Description

Sign a local user into the Mixer service using an authorization code obtained by the title through an external mechanism (e.g. Mixer shortcode authentication flow). The operation takes place asynchronously, with changes reported via the OnLoginStateChanged event.

Parameters
AuthCode (const FString&)

The game-obtained OAuth authorization code.

Parameters
AuthCode (TSharedPtr<const FUniqueNetId>)

Network id for the local user whose identity will be used for Mixer login.

Returns
bool

True if a login attempt was started; results will be reported via OnLoginStateChanged.


Logout

Description

Reports whether a user is currently logged in to Mixer, or if a login/logout operation is in progress.

Returns
EMixerLoginState

The login state of the user.


GetLoginState

Description

Reports whether a user is currently logged in to Mixer, or if a login/logout operation is in progress.

Returns
EMixerLoginState

The login state of the user.


StartInteractivity

Description

Notify the Mixer service that the game is ready for interactive input. The operation takes place asynchronously, with changes reported via the OnInteractivityStateChanged event.

Returns
void

StopInteractivity

Description

Notify the Mixer service that the game is no longer accepting interactive input. The operation takes place asynchronously, with changes reported via the OnInteractivityStateChanged event.


GetInteractivityState

Description

Reports the current interactivity state.

Returns
EMixerLoginState

The login state of the user.


SetCurrentScene

Description

Request a change in the interactive scene displayed to remote users.

Parameters
Scene (FName)

Name of the new interactive scene to display.

Parameters
GroupName (FName)

Name of the group to whom the new scene should be shown. Default group if empty.

Returns
bool

True if a login attempt was started; results will be reported via OnLoginStateChanged.


GetCurrentScene

Description

Name of the group whose scene should be returned. Default group if empty.

Parameters
GroupName (FName)

Name of the group whose scene should be returned. Default group if empty.

Returns
FName

Name if the interactive scene currently displayed.


TriggerButtonCooldown

Description

Request that the named button enter a cooldown state for the specified period. While cooling down the button will be non-interactive.

Parameters
Button (FName)

Name of the button that should be on cooldown.

CooldownTime (FTimespan)

Duration for which the button should be non-interactive.

Returns
void

GetButtonDescription

Description

Retrieve information about a named button that is independent of its current state. Information includes the display text and spark cost.

Parameters
Button (FName)

Name of the button for which information should be returned.

OutDesc (FMixerButtonDescription&)

Out parameter filled in with information about the button upon success.

Returns
bool

True if button was found and OutDesc is valid.


GetButtonState

Description

Retrieve information about a named button that is dependent on remote user and title interactions.

Parameters
Button (FName)

Name of the button for which information should be returned.

OutState (FMixerButtonState&)

Out parameter filled in with information about the button upon success.

Returns
bool

True if joystick was found and OutDesc is valid.


GetStickDescription

Description

Retrieve information about a named joystick that is independent of its current state.

Parameters
Stick (FName)

Name of the joystick for which information should be returned.

OutDesc (FMixerStickDescription&)

Out parameter filled in with information about the joystick upon success.

Returns
bool

True if button was found and OutState is valid.


GetStickState

Description

Retrieve information about a named joystick that is dependent on remote user and title interactions. This includes x and y axis information.

Parameters
Stick (FName)

Name of the joystick for which information should be returned.

OutState (FMixerStickState&)

Out parameter filled in with information about the joystick upon success.

Returns
bool

True if joystick was found and OutState is valid.


GetCurrentUser

Description

Retrieve a structure describing the local user currently signed in to the Mixer service.

Returns
TSharedPtr<const FMixerLocalUser>

Returns the Mixer user. Invalid shared pointer when no user is signed in.


GetParticipant

Description

Retrieve a structure describing a remote user currently interacting with the title on the Mixer service.

Parameters
ParticipantId (uint32)

Mixer id of the remote user.

Returns
TSharedPtr<const FMixerRemoteUser>

Returns the Mixer user object with the given ID. Invalid shared pointer when no user could be found.


CreateGroup

Description

Create a user group with the given name. Groups may be used to show different scenes to different segments of the participating audience. No-op if the group already exists.

Parameters
GroupName (FName)

Name for the new group.

InitialScene (FName)

Interactive scene that this new group should see.

Returns
bool

True if group is newly created. False if it already existed (interactive scene will not be changed).


GetParticipantsInGroup

Description

Retrieve the collection of participants that belong to the named group.

Parameters
GroupName (FName)

Name of the group for which to retrieve participants.

OutParticipants (TArray<TSharedPtr<const FMixerRemoteUser>>&)

Out parameter filled with the members of the named group.

Returns
bool

True if the group exists (even if it is empty). False otherwise.


MoveParticipantToGroup

Description

Move a single participant to the named group.

Parameters
GroupName (FName)

Name of the group for which to retrieve participants.

ParticipantId (uint32)

Name of the group for which to retrieve participants.

Returns
bool

True if the destination group exists. False otherwise.


CaptureSparkTransaction

Description

Captures a given interactive event transaction, charging the sparks to the appropriate remote participant.

Parameters
TransactionId (FName)

Id of the transaction for which sparks should be charged (obtained from event).

Returns
void

Events

OnLoginStateChanged

Description

Occurs when the state of the logged in user has changed.


OnInteractivityStateChanged

Description

Occurs when the interactivity state of the Mixer service has changed. For instance, the state would change to EMixerInteractivityState::Interactive if there was a call to StartInteractivity and the channel's interactive controls are enabled.


OnParticipantStateChanged

Description

Occurs when the state of a participant has changed. For instance, if a participant has joined or left a session.


OnButtonEvent

Description

Occurs when a viewer has pressed a button on the website.


OnStickEvent

Description

Occurs when a viewer moves a joystick control on the website.

Clone this wiki locally