tate === WebSocket.OPEN) {
                            ws.send(createImageContent(frameData));
                        }

                    }, 1000);

                    stream.getVideoTracks()[0].onended = () => {
                        console.log('Screen sharing stopped');
                        clearInterval(shareScreenTimer);
                        if (processor) {
                            processor.disconnect();
                        }
                    };

                } catch (err) {