var videoSupport = isVideoSendEnabled(media);
if(videoSupport === true && media != undefined && media != null) {
if(media.video === 'lowres') {
// Add a video constraint (320x240)
if(!navigator.mozGetUserMedia) {
videoSupport = {"mandatory": {"maxHeight": "240", "maxWidth": "320"}, "optional": []};
Janus.log("Adding media constraint (low-res video)");
Janus.log(videoSupport);
} else {
Janus.log("Firefox doesn't support media constraints at the moment, ignoring low-res video");
}
} else if(media.video === 'hires') {
// Add a video constraint (1280x720)
if(!navigator.mozGetUserMedia) {
videoSupport = {"mandatory": {"minHeight": "720", "minWidth": "1280"}, "optional": []};
Janus.log("Adding media constraint (hi-res video)");
Janus.log(videoSupport);
} else {
Janus.log("Firefox doesn't support media constraints at the moment, ignoring hi-res video");
}
} else if(media.video === 'screen') {
// Not a webcam, but screen capture
if(window.location.protocol !== 'https:') {
// Screen sharing mandates HTTPS
Janus.log("Screen sharing only works on HTTPS, try the https:// version of this page");
pluginHandle.consentDialog(false);
callbacks.error("Screen sharing only works on HTTPS, try the https:// version of this page");
return;
}