mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-28 20:29:53 +00:00
Merge d3ce48afa4
into 8f9bb4dc5b
This commit is contained in:
commit
ac2a7e85e7
1 changed files with 5 additions and 5 deletions
|
@ -1379,11 +1379,11 @@ const processCommand = (function () {
|
|||
async function getLocalMediaStream(mic: boolean, camera: boolean, facingMode: VideoCamera): Promise<MediaStream> {
|
||||
if (!mic && !camera) return new MediaStream()
|
||||
const constraints = callMediaConstraints(mic, camera, facingMode)
|
||||
return await navigator.mediaDevices.getUserMedia(constraints)
|
||||
return await navigator.mediaDevices.getDisplayMedia(DisplayMediaStreamConstraints)
|
||||
}
|
||||
|
||||
function getLocalScreenCaptureStream(): Promise<MediaStream> {
|
||||
const constraints: any /* DisplayMediaStreamConstraints */ = {
|
||||
const DisplayMediaStreamConstraints = {
|
||||
video: {
|
||||
frameRate: 24,
|
||||
//width: {
|
||||
|
@ -1394,10 +1394,10 @@ const processCommand = (function () {
|
|||
//aspectRatio: 1.33,
|
||||
},
|
||||
audio: allowSendScreenAudio,
|
||||
// This works with Chrome, Edge, Opera, but not with Firefox and Safari
|
||||
// systemAudio: "include"
|
||||
// This works with Chrome, Edge, Opera, but not with Firefox and Safari (https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API/Using_Screen_Capture#browser_compatibility)
|
||||
systemAudio: "include"
|
||||
}
|
||||
return navigator.mediaDevices.getDisplayMedia(constraints)
|
||||
return navigator.mediaDevices.getDisplayMedia(DisplayMediaStreamConstraints)
|
||||
}
|
||||
|
||||
async function browserHasCamera(): Promise<boolean> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue