Function getVideos

  • Asynchronously processes and updates video streams by filtering out the admin's video stream.

    Parameters

    Returns Promise<void>

    A promise that resolves when the video streams have been processed and updated.

    Throws an error if an issue occurs while processing the streams.

    const options = {
    participants: participantList,
    allVideoStreams: allStreams,
    oldAllStreams: oldStreams,
    adminVidID: 'admin-video-id',
    updateAllVideoStreams: (streams) => {
    console.log('All video streams updated:', streams);
    },
    updateOldAllStreams: (streams) => {
    console.log('Old video streams updated:', streams);
    },
    };

    getVideos(options)
    .then(() => {
    console.log('Video streams processed successfully');
    })
    .catch((error) => {
    console.error('Error processing video streams:', error);
    });