[mirotalksfu] - signaling producer pause/resume
هذا الالتزام موجود في:
@@ -1676,7 +1676,7 @@ class RoomClient {
|
||||
return elem;
|
||||
}
|
||||
|
||||
pauseProducer(type) {
|
||||
async pauseProducer(type) {
|
||||
if (!this.producerLabel.has(type)) {
|
||||
return console.log('There is no producer for this type ' + type);
|
||||
}
|
||||
@@ -1684,6 +1684,13 @@ class RoomClient {
|
||||
const producer_id = this.producerLabel.get(type);
|
||||
this.producers.get(producer_id).pause();
|
||||
|
||||
try {
|
||||
const response = await this.socket.request('pauseProducer', { producer_id: producer_id });
|
||||
console.log('Producer paused', response);
|
||||
} catch (error) {
|
||||
console.error('Error pausing producer', error);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case mediaType.audio:
|
||||
this.event(_EVENTS.pauseAudio);
|
||||
@@ -1699,7 +1706,7 @@ class RoomClient {
|
||||
}
|
||||
}
|
||||
|
||||
resumeProducer(type) {
|
||||
async resumeProducer(type) {
|
||||
if (!this.producerLabel.has(type)) {
|
||||
return console.log('There is no producer for this type ' + type);
|
||||
}
|
||||
@@ -1707,6 +1714,13 @@ class RoomClient {
|
||||
const producer_id = this.producerLabel.get(type);
|
||||
this.producers.get(producer_id).resume();
|
||||
|
||||
try {
|
||||
const response = await this.socket.request('resumeProducer', { producer_id: producer_id });
|
||||
console.log('Producer resumed', response);
|
||||
} catch (error) {
|
||||
console.error('Error resuming producer', error);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case mediaType.audio:
|
||||
this.event(_EVENTS.resumeAudio);
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم