Video SDK - Screen Sharing not working

Hi, I’ve been following the documentation to implement Screen Sharing feature with React.

Although, it only shows the sharing screen to started user and others doesn’t see it.

When sharing is stopped, I get this error (There’s no error on sharing start)

TypeError: Cannot read properties of undefined (reading ‘contextGL’)
at c2f9e9ce-c03d-429c-a087-fb847ca77016:1:111290
at c2f9e9ce-c03d-429c-a087-fb847ca77016:1:111392

Actual Code


// For rendering received screen share stream
client.on('active-share-change',async payload =>{
            const target = client.getAllUser().find(item => item.userId === payload.userId)

            // const video = document.querySelector(`.user_media.video[data-video_id="${target?.displayName}"]`)

            // Also Tried with video element above (reference to the share started user's video tag), but the result was same.
            const testVideo = document.querySelector('.share-canvas#test_video')

            if(payload.state === 'Active' ){
                console.log('STARTED!')
                console.log(payload.userId)
                try {
                    await stream.startShareView(testVideo,payload.userId)
                } catch (error){
                    console.log(error)
                }

            }else if(payload.state === 'Inactive'){
                try {
                    await stream.stopShareView()
                } catch (error) {
                    console.log(error)
                }
            }
           })

// For start sharing screen
 const startShareScreen = () => {
        const testVideo = document.querySelector('.share-canvas#test_video')
        stream.startShareScreen(testVideo)
    }

Please Help!

@nuinteedev,

Thank you for posting! Can you share more details about the SDK you are using? Please use the template below to provide the relevant information:

Description:

Browser Console Error:

Which Web Meeting SDK version?:

Meeting SDK Code Snippets:

To Reproduce(If applicable):

Screenshots:

Device (please complete the following information)::

Additional context:

Thanks,
Donte

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.