Some tweaks
This commit is contained in:
parent
34f8895469
commit
9f4fbab03f
@ -308,6 +308,19 @@ export default class GroupCallConnectionInstance extends CallConnectionInstanceB
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.options.type === 'presentation') {
|
||||||
|
promise.then(() => {
|
||||||
|
this.connection.getTransceivers().find(transceiver => {
|
||||||
|
if(transceiver.sender?.track?.kind === 'video') {
|
||||||
|
transceiver.sender.setParameters({
|
||||||
|
...transceiver.sender.getParameters(),
|
||||||
|
degradationPreference: 'maintain-resolution'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
export default async function getScreenStream(constraints: DisplayMediaStreamConstraints) {
|
export default async function getScreenStream(constraints: DisplayMediaStreamConstraints) {
|
||||||
const screenStream = await navigator.mediaDevices.getDisplayMedia(constraints);
|
const screenStream = await navigator.mediaDevices.getDisplayMedia(constraints);
|
||||||
|
const track = screenStream.getVideoTracks()[0];
|
||||||
|
track.contentHint = 'text';
|
||||||
return screenStream;
|
return screenStream;
|
||||||
}
|
}
|
||||||
|
@ -266,9 +266,18 @@ export default class StreamManager {
|
|||||||
// const direction: RTCRtpTransceiverInit['direction'] = 'sendrecv';
|
// const direction: RTCRtpTransceiverInit['direction'] = 'sendrecv';
|
||||||
// const direction: RTCRtpTransceiverInit['direction'] = 'sendonly';
|
// const direction: RTCRtpTransceiverInit['direction'] = 'sendonly';
|
||||||
const transceiverInit: RTCRtpTransceiverInit = {direction, streams: [inputStream]};
|
const transceiverInit: RTCRtpTransceiverInit = {direction, streams: [inputStream]};
|
||||||
|
const transceiverAudioInit: RTCRtpTransceiverInit = {...transceiverInit};
|
||||||
|
const transceiverVideoInit: RTCRtpTransceiverInit = {...transceiverInit};
|
||||||
|
|
||||||
|
// if(this.isScreenSharingManager) {
|
||||||
|
// transceiverVideoInit.sendEncodings = [{}];
|
||||||
|
// } else {
|
||||||
|
// transceiverVideoInit.sendEncodings = [{maxBitrate: 2500000}];
|
||||||
|
// }
|
||||||
|
|
||||||
const types: ['audio' | 'video', RTCRtpTransceiverInit][] = [
|
const types: ['audio' | 'video', RTCRtpTransceiverInit][] = [
|
||||||
['audio' as const, transceiverInit],
|
['audio' as const, transceiverAudioInit],
|
||||||
['video' as const, transceiverInit/* {sendEncodings: [{maxBitrate: 2500000}], ...transceiverInit} */]
|
['video' as const, transceiverVideoInit]
|
||||||
];
|
];
|
||||||
|
|
||||||
const tracks = inputStream.getTracks();
|
const tracks = inputStream.getTracks();
|
||||||
@ -290,6 +299,13 @@ export default class StreamManager {
|
|||||||
let {transceiver} = entry;
|
let {transceiver} = entry;
|
||||||
if(!transceiver) {
|
if(!transceiver) {
|
||||||
transceiver = entry.createTransceiver(conference.connection, transceiverInit);
|
transceiver = entry.createTransceiver(conference.connection, transceiverInit);
|
||||||
|
|
||||||
|
/* if(this.isScreenSharingManager) {
|
||||||
|
transceiver.sender.setParameters({
|
||||||
|
...transceiver.sender.getParameters(),
|
||||||
|
degradationPreference: 'maintain-resolution'
|
||||||
|
});
|
||||||
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
if(entry.direction !== transceiver.direction) {
|
if(entry.direction !== transceiver.direction) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user