API reference
API reference
Select your platform
No SDKs available
No versions available

Cowatching Class

The Cowatching API provides a set of methods for managing cowatching sessions in a shared virtual home environment. It allows users to request to present, resign from presenting, join or leave a session, check if they are in a session CowatchingState::InSession, set and get presenter data, set and get viewer data, and launch an invite dialog.

Static Member Functions

Retrieve the presenter data that drives an active cowatching session. This method can be called when there is an ongoing cowatching session, allowing developers to access and utilize the presenter data to enhance the user experience.
Retrieve the viewer data of everyone who is in a cowatching session whose data was set by Cowatching.SetViewerData() viewer_data. This can be called when there is an active cowatching session.
Check whether the current user is participating in the ongoing cowatching session. It returns a boolean value CowatchingState::InSession indicating the user's presence in the session.
Join the ongoing cowatching session as a viewer, updating data only possible for users already in the session.
Launch a dialog for inviting users to cowatch in Copresent Home.
Leave the current cowatching session, rendering viewer data obsolete and no longer relevant to the ongoing experience.
Request to initiate a cowatching session as the presenter while being copresent in a shared virtual home environment.
Stop being the presenter and terminate the ongoing cowatching session. This action will effectively end the shared media experience.
Set the data that drives a cowatching session. This method is only callable by the presenter. The video title cannot exceed 100 characters, and the data size is limited to 500 characters. The data will be eventually consistent across all users.
Parameters
video_title
A string representing the title of the video being played in the cowatching session. This parameter must not exceed 100 characters in length.
presenter_data
A string containing data that drives the cowatching session, such as video metadata or playback information. This parameter is limited to 500 characters in length and will be eventually consistent across all users participating in the session.
Set the current user's viewer data to be shared with copresent users. This can be called when there is an active cowatching session. The data size is limited to 500 characters, and it will eventually become consistent across all users.
Parameters
viewer_data
A string containing data about the current user's viewer state, such as their preferences or settings. This data is shared with copresent users during an active cowatching session and is limited to 500 characters in size. The data will eventually become consistent across all users participating in the session.
Sets a callback function that will be triggered when the user is no longer in a copresent state and cowatching actions should not be performed.
Sets a callback function that will be triggered when the user is in a copresent state and cowatching is ready to begin.
Sets a callback function that will be triggered when the current user joins/leaves the cowatching session.
Sets a callback function that will be triggered when the cowatching API has been initialized. At this stage, the API is not yet ready for use.
Sets a callback function that will be triggered when the presenter updates the presenter data.
Sets a callback function that will be triggered when a user has started a cowatching session, and the ID of the session is reflected in the payload.
Sets a callback function that will be triggered when a cowatching session has ended.
Sets a callback function that will be triggered when a user joins or updates their viewer data.
static Request< Models.CowatchViewerList > GetNextCowatchViewerListPage
Did you find this page helpful?
Thumbs up icon
Thumbs down icon