Service for updating co-host information, responsibilities, and the user's co-host status.
UpdatedCoHost
Manages co-host updates for different event types, assigning responsibilities and notifying the user if their co-host status changes.
updatedCoHost
The options for co-host updates:
coHost
coHostResponsibility
showAlert
eventType
islevel
member
youAreCoHost
updateCoHost
updateCoHostResponsibility
updateYouAreCoHost
Resolves after co-host information is updated.
const options = { coHost: 'Alice', coHostResponsibility: ['moderate', 'manageParticipants'], showAlert: ({ message, type, duration }) => console.log(message), eventType: 'conference', islevel: '1', member: 'Alice', youAreCoHost: false, updateCoHost: (newCoHost) => console.log(`Updated co-host: ${newCoHost}`), updateCoHostResponsibility: (responsibilities) => console.log(responsibilities), updateYouAreCoHost: (status) => console.log(`You are co-host: ${status}`)};await updatedCoHostService.updatedCoHost(options); Copy
const options = { coHost: 'Alice', coHostResponsibility: ['moderate', 'manageParticipants'], showAlert: ({ message, type, duration }) => console.log(message), eventType: 'conference', islevel: '1', member: 'Alice', youAreCoHost: false, updateCoHost: (newCoHost) => console.log(`Updated co-host: ${newCoHost}`), updateCoHostResponsibility: (responsibilities) => console.log(responsibilities), updateYouAreCoHost: (status) => console.log(`You are co-host: ${status}`)};await updatedCoHostService.updatedCoHost(options);
Updates the co-host information, responsibility, and user's co-host status based on the provided options.
The options for updating the co-host.
A promise that resolves when the co-host information has been updated.
Service for updating co-host information, responsibilities, and the user's co-host status.
Name
UpdatedCoHost
Description
Manages co-host updates for different event types, assigning responsibilities and notifying the user if their co-host status changes.
Method
updatedCoHost
Async
Param: options
The options for co-host updates:
coHost
{string}: The name of the co-host.coHostResponsibility
{CoHostResponsibility[]}: List of responsibilities assigned to the co-host.showAlert
{ShowAlert}: Optional function to display an alert message.eventType
{EventType}: Type of the event, determining if co-host can be updated.islevel
{string}: Current level of the event.member
{string}: The current user's identifier.youAreCoHost
{boolean}: Current user's co-host status.updateCoHost
{Function}: Function to set the new co-host.updateCoHostResponsibility
{Function}: Function to assign responsibilities to the co-host.updateYouAreCoHost
{Function}: Function to update the user's co-host status.Returns
Resolves after co-host information is updated.
Example