Implement /sharescreen.
Also rename /stopshare to /unsharescreen.
This commit is contained in:
+10
-1
@@ -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');
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user