Skip to main content

Other Methods

Update media resolution at runtime

Camera

meeting.self.updateVideoConstraints(resolution)

Example

meeting.self.updateVideoConstraints({
width: { ideal: 1920 },
height: { ideal: 1080 },
});

Screenshare

meeting.self.updateScreenshareConstraints(resolution)

Example

meeting.self.updateScreenshareConstraints({
width: { ideal: 1920 },
height: { ideal: 1080 },
});

Using Middlewares

Middlewares are add-ons that you can use to add effects and filters to your audio and video streams with ease. The meeting.self namespace exposes methods to add and remove these middlewares. Read more about how to work with middlewares here.

Create a middleware

function RetroTheme() {
return (canvas, ctx) => {
ctx.filter = 'grayscale(1)';
ctx.shadowColor = '#000';
ctx.shadowBlur = 20;
ctx.lineWidth = 50;
ctx.strokeStyle = '#000';
ctx.strokeRect(0, 0, canvas.width, canvas.height);
};
}

Working with video middlewares

// Add the video middleware
meeting.self.addVideoMiddleware(RetroTheme);

// Remove the video middleware
meeting.self.removeVideoMiddleware(RetroTheme);

Working with audio middlewares

// Add the audio middleware
meeting.self.addAudioMiddleware(YourAudioMiddleware);

// Remove the audio middleware
meeting.self.removeAudioMiddleware(YourAudioMiddleware);

Pinning & unpinning

You can pin or unpin yourself given you have the appropriate permissions. You can check the pinned status of the local user using meeting.isPinned.

meeting.self.pin();
meeting.self.unpin();