Add muted url option
parent
51f23c4396
commit
4c7a9d67b4
|
|
@ -106,7 +106,7 @@ export default class RoomClient
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
{ peerId, accessCode, device, useSimulcast, produce, forceTcp, displayName } = {})
|
{ peerId, accessCode, device, useSimulcast, produce, forceTcp, displayName, muted } = {})
|
||||||
{
|
{
|
||||||
if (!peerId)
|
if (!peerId)
|
||||||
throw new Error('Missing peerId');
|
throw new Error('Missing peerId');
|
||||||
|
|
@ -138,6 +138,8 @@ export default class RoomClient
|
||||||
// Whether simulcast should be used.
|
// Whether simulcast should be used.
|
||||||
this._useSimulcast = useSimulcast;
|
this._useSimulcast = useSimulcast;
|
||||||
|
|
||||||
|
this._muted = muted;
|
||||||
|
|
||||||
// This device
|
// This device
|
||||||
this._device = device;
|
this._device = device;
|
||||||
|
|
||||||
|
|
@ -2112,6 +2114,7 @@ export default class RoomClient
|
||||||
if (this._produce)
|
if (this._produce)
|
||||||
{
|
{
|
||||||
if (this._mediasoupDevice.canProduce('audio'))
|
if (this._mediasoupDevice.canProduce('audio'))
|
||||||
|
if (!this._muted)
|
||||||
this.enableMic();
|
this.enableMic();
|
||||||
|
|
||||||
if (joinVideo && this._mediasoupDevice.canProduce('video'))
|
if (joinVideo && this._mediasoupDevice.canProduce('video'))
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,7 @@ function run()
|
||||||
const useSimulcast = parameters.get('simulcast') === 'true';
|
const useSimulcast = parameters.get('simulcast') === 'true';
|
||||||
const forceTcp = parameters.get('forceTcp') === 'true';
|
const forceTcp = parameters.get('forceTcp') === 'true';
|
||||||
const displayName = parameters.get('displayName');
|
const displayName = parameters.get('displayName');
|
||||||
|
const muted = parameters.get('muted') === 'true';
|
||||||
|
|
||||||
// Get current device.
|
// Get current device.
|
||||||
const device = deviceInfo();
|
const device = deviceInfo();
|
||||||
|
|
@ -117,7 +118,7 @@ function run()
|
||||||
);
|
);
|
||||||
|
|
||||||
roomClient = new RoomClient(
|
roomClient = new RoomClient(
|
||||||
{ peerId, accessCode, device, useSimulcast, produce, forceTcp, displayName });
|
{ peerId, accessCode, device, useSimulcast, produce, forceTcp, displayName, muted });
|
||||||
|
|
||||||
global.CLIENT = roomClient;
|
global.CLIENT = roomClient;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue