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]
|
* @param {string} [localId]
|
||||||
*/
|
*/
|
||||||
function newUpStream(localId) {
|
function newUpStream(localId) {
|
||||||
|
if(!serverConnection)
|
||||||
|
throw new Error("Not connected");
|
||||||
let c = serverConnection.newUpStream(localId);
|
let c = serverConnection.newUpStream(localId);
|
||||||
c.onstatus = function(status) {
|
c.onstatus = function(status) {
|
||||||
setMediaStatus(c);
|
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',
|
description: 'stop screen share',
|
||||||
f: (c, r) => {
|
f: (c, r) => {
|
||||||
closeUpMedia('screenshare');
|
closeUpMedia('screenshare');
|
||||||
|
|||||||
@@ -1499,6 +1499,7 @@ Stream.prototype.updateStats = async function() {
|
|||||||
if(report) {
|
if(report) {
|
||||||
for(let r of report.values()) {
|
for(let r of report.values()) {
|
||||||
if(stid && r.type === 'outbound-rtp') {
|
if(stid && r.type === 'outbound-rtp') {
|
||||||
|
console.log(r);
|
||||||
let id = stid;
|
let id = stid;
|
||||||
// Firefox doesn't implement rid, use ssrc
|
// Firefox doesn't implement rid, use ssrc
|
||||||
// to discriminate simulcast tracks.
|
// to discriminate simulcast tracks.
|
||||||
|
|||||||
Reference in New Issue
Block a user