Function to display streams based on various parameters and conditions.
The options object.
List of streams to display.
Index of the current stream.
Flag to indicate if the function should run automatically.
Flag to indicate if chat should be skipped.
ID for chat reference.
Parameters object containing various settings and functions.
Break room number.
Flag to indicate if in break room.
A promise that resolves when the function completes.
const options = { lStreams: [...], // Your streams data here ind: 0, auto: true, ChatSkip: false, parameters: { consumerTransports: [], streamNames: [], audStreamNames: [], participants: [], ref_participants: [], recordingDisplayType: 'video', recordingVideoOptimized: false, meetingDisplayType: 'video', meetingVideoOptimized: false, currentUserPage: 1, hostLabel: 'Host', mainHeightWidth: 100, prevMainHeightWidth: 100, prevDoPaginate: false, doPaginate: false, firstAll: false, shared: false, shareScreenStarted: false, shareEnded: false, oldAllStreams: [], updateMainWindow: false, remoteProducerId: null, activeNames: [], dispActiveNames: [], p_dispActiveNames: [], nForReadjustRecord: 0, first_round: false, lock_screen: false, chatRefStreams: [], eventType: 'normal', islevel: '1', localStreamVideo: null, breakOutRoomStarted: false, breakOutRoomEnded: false, keepBackground: false, virtualStream: null, updateActiveNames: (names) => {}, updateDispActiveNames: (names) => {}, updateLStreams: (streams) => {}, updateChatRefStreams: (streams) => {}, updateNForReadjustRecord: (n) => {}, updateUpdateMainWindow: (value) => {}, updateShowMiniView: (value) => {}, prepopulateUserMedia: async () => {}, rePort: async () => {}, processConsumerTransports: async () => {}, resumePauseStreams: async () => {}, readjust: async () => {}, addVideosGrid: async () => {}, getEstimate: async () => {}, checkGrid: async () => {}, resumePauseAudioStreams: async () => {}, getUpdatedAllParams: () => options.parameters, }, breakRoom: -1, inBreakRoom: false,};dispStreamsService.dispStreams(options) .then(() => { console.log('Streams displayed successfully'); }) .catch((error) => { console.error('Error displaying streams:', error); }); Copy
const options = { lStreams: [...], // Your streams data here ind: 0, auto: true, ChatSkip: false, parameters: { consumerTransports: [], streamNames: [], audStreamNames: [], participants: [], ref_participants: [], recordingDisplayType: 'video', recordingVideoOptimized: false, meetingDisplayType: 'video', meetingVideoOptimized: false, currentUserPage: 1, hostLabel: 'Host', mainHeightWidth: 100, prevMainHeightWidth: 100, prevDoPaginate: false, doPaginate: false, firstAll: false, shared: false, shareScreenStarted: false, shareEnded: false, oldAllStreams: [], updateMainWindow: false, remoteProducerId: null, activeNames: [], dispActiveNames: [], p_dispActiveNames: [], nForReadjustRecord: 0, first_round: false, lock_screen: false, chatRefStreams: [], eventType: 'normal', islevel: '1', localStreamVideo: null, breakOutRoomStarted: false, breakOutRoomEnded: false, keepBackground: false, virtualStream: null, updateActiveNames: (names) => {}, updateDispActiveNames: (names) => {}, updateLStreams: (streams) => {}, updateChatRefStreams: (streams) => {}, updateNForReadjustRecord: (n) => {}, updateUpdateMainWindow: (value) => {}, updateShowMiniView: (value) => {}, prepopulateUserMedia: async () => {}, rePort: async () => {}, processConsumerTransports: async () => {}, resumePauseStreams: async () => {}, readjust: async () => {}, addVideosGrid: async () => {}, getEstimate: async () => {}, checkGrid: async () => {}, resumePauseAudioStreams: async () => {}, getUpdatedAllParams: () => options.parameters, }, breakRoom: -1, inBreakRoom: false,};dispStreamsService.dispStreams(options) .then(() => { console.log('Streams displayed successfully'); }) .catch((error) => { console.error('Error displaying streams:', error); });
Function to display streams based on various parameters and conditions.
Param: options
The options object.
Param: options.lStreams
List of streams to display.
Param: options.ind
Index of the current stream.
Param: options.auto
Flag to indicate if the function should run automatically.
Param: options.ChatSkip
Flag to indicate if chat should be skipped.
Param: options.forChatID
ID for chat reference.
Param: options.parameters
Parameters object containing various settings and functions.
Param: options.breakRoom
Break room number.
Param: options.inBreakRoom
Flag to indicate if in break room.
Returns
A promise that resolves when the function completes.
Async
Example