Implement /sharescreen.

Also rename /stopshare to /unsharescreen.
This commit is contained in:
Juliusz Chroboczek
2025-07-30 14:18:44 +02:00
parent e7162642a7
commit b88e2f4d93
2 changed files with 11 additions and 1 deletions
+10 -1
View File
@@ -1030,6 +1030,8 @@ async function setMediaChoices(done) {
* @param {string} [localId]
*/
function newUpStream(localId) {
if(!serverConnection)
throw new Error("Not connected");
let c = serverConnection.newUpStream(localId);
c.onstatus = function(status) {
setMediaStatus(c);
@@ -3796,7 +3798,14 @@ commands.replace = {
}
};
commands.stopshare = {
commands.sharescreen = {
description: 'start a screen share',
f: (c, r) => {
addShareMedia();
}
}
commands.unsharescreen = {
description: 'stop screen share',
f: (c, r) => {
closeUpMedia('screenshare');
+1
View File
@@ -1499,6 +1499,7 @@ Stream.prototype.updateStats = async function() {
if(report) {
for(let r of report.values()) {
if(stid && r.type === 'outbound-rtp') {
console.log(r);
let id = stid;
// Firefox doesn't implement rid, use ssrc
// to discriminate simulcast tracks.