Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to construct the constraints for screensharing #288

Closed
celevra opened this issue Feb 19, 2016 · 2 comments
Closed

how to construct the constraints for screensharing #288

celevra opened this issue Feb 19, 2016 · 2 comments

Comments

@celevra
Copy link

celevra commented Feb 19, 2016

Hi,

i want to send my screen through sip.js rather with direct webrtc between the clients.
Until now i use this to setup the stream:

        var constraints = {
            media: {
                constraints: {
                    audio: true,
                    video: {
                        mandatory: {
                            chromeMediaSource: 'desktop',
                            chromeMediaSourceId: event.data.sourceId,
                            maxWidth: window.screen.width > 1920 ? window.screen.width : 1920,
                            maxHeight: window.screen.height > 1080 ? window.screen.height : 1080
                        },
                        optional: []
                    },
                    render: {
                        remote: document.getElementById('video-remote'),
                        local: document.getElementById('video-local')
                    }
                }
            }
        }

but sip.js only supports true and false for video, how can i tell sip.js to use the chromemediasource?

regards

@wakamoleguy
Copy link
Contributor

Hi. What version of SIP.js are you using? We should be passing the constraints through directly to the RTCPeerConnection. If they are being coerced to true/false, that's a bug.

@celevra
Copy link
Author

celevra commented Mar 2, 2016

you are right, it was my fault. thank you for your time

@celevra celevra closed this as completed Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants