Class ScreenProducerId

Service to manage screen producer ID and screen sharing status for participants.

ScreenProducerId

This service processes and updates the screen producer ID, manages screen sharing states, and defers screen updates as needed based on participant data.

screenProducerId

Options for handling screen producer ID:

  • producerId {string}: The ID of the screen producer.
  • screenId {string}: The current screen ID.
  • membersReceived {boolean}: Indicates if members data has been received.
  • shareScreenStarted {boolean}: Indicates if screen sharing has started.
  • deferScreenReceived {boolean}: Indicates if screen sharing should be deferred.
  • participants {Participant[]}: The list of current participants.
  • updateScreenId {Function}: Function to update the screen ID.
  • updateShareScreenStarted {Function}: Function to update the screen sharing status.
  • updateDeferScreenReceived {Function}: Function to update the deferred screen status.

Updates states directly through provided functions.

const options = {
producerId: 'abc123',
screenId: 'screen45',
membersReceived: true,
shareScreenStarted: false,
deferScreenReceived: false,
participants: [
{ id: 'p1', ScreenID: 'screen45', ScreenOn: true },
// Additional participants
],
updateScreenId: (id) => console.log(`Screen ID updated to: ${id}`),
updateShareScreenStarted: (started) => console.log(`Screen sharing started: ${started}`),
updateDeferScreenReceived: (received) => console.log(`Screen sharing deferred: ${received}`)
};

screenProducerIdService.screenProducerId(options);

Constructors

Methods

Constructors

Methods