Skip to content

dyte-in/streams-middleware-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Dyte stream middlewares

This repo contains the middlewares which can be applied on Dyte's media streams.

Please refer to audio and video folders to find few sample middlewares.

Usage

For the video middleware, residing in ./video/retro-theme of this repo, integration will look like the following.

//Somewhere in your codebase
const meeting = await DyteClient.init(...);

function RetroTheme() {
		console.log('Initialising 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);
    };
}

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published