提交 2c0b4268 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Cosmetic

上级 cc4ee124
...@@ -177,7 +177,6 @@ class Consumer extends EnhancedEventEmitter ...@@ -177,7 +177,6 @@ class Consumer extends EnhancedEventEmitter
if (notifyChannel) if (notifyChannel)
{ {
// Send Channel request.
this._channel.request('consumer.close', this._internal) this._channel.request('consumer.close', this._internal)
.then(() => .then(() =>
{ {
...@@ -317,7 +316,6 @@ class Consumer extends EnhancedEventEmitter ...@@ -317,7 +316,6 @@ class Consumer extends EnhancedEventEmitter
this.emit('@notify', 'consumerPaused', data); this.emit('@notify', 'consumerPaused', data);
} }
// Send Channel request.
this._channel.request('consumer.pause', this._internal) this._channel.request('consumer.pause', this._internal)
.then(() => .then(() =>
{ {
...@@ -351,7 +349,6 @@ class Consumer extends EnhancedEventEmitter ...@@ -351,7 +349,6 @@ class Consumer extends EnhancedEventEmitter
this._remotelyPaused = true; this._remotelyPaused = true;
// Send Channel request.
this._channel.request('consumer.pause', this._internal) this._channel.request('consumer.pause', this._internal)
.then(() => .then(() =>
{ {
...@@ -403,7 +400,6 @@ class Consumer extends EnhancedEventEmitter ...@@ -403,7 +400,6 @@ class Consumer extends EnhancedEventEmitter
if (!this._remotelyPaused) if (!this._remotelyPaused)
{ {
// Send Channel request.
this._channel.request('consumer.resume', this._internal) this._channel.request('consumer.resume', this._internal)
.then(() => .then(() =>
{ {
...@@ -440,7 +436,6 @@ class Consumer extends EnhancedEventEmitter ...@@ -440,7 +436,6 @@ class Consumer extends EnhancedEventEmitter
if (!this._locallyPaused) if (!this._locallyPaused)
{ {
// Send Channel request.
this._channel.request('consumer.resume', this._internal) this._channel.request('consumer.resume', this._internal)
.then(() => .then(() =>
{ {
......
...@@ -192,7 +192,6 @@ class Producer extends EnhancedEventEmitter ...@@ -192,7 +192,6 @@ class Producer extends EnhancedEventEmitter
if (notifyChannel) if (notifyChannel)
{ {
// Send Channel request.
this._channel.request('producer.close', this._internal) this._channel.request('producer.close', this._internal)
.then(() => .then(() =>
{ {
...@@ -253,7 +252,6 @@ class Producer extends EnhancedEventEmitter ...@@ -253,7 +252,6 @@ class Producer extends EnhancedEventEmitter
rtpMapping rtpMapping
}; };
// Send Channel request.
return this._channel.request('producer.receive', this._internal, data) return this._channel.request('producer.receive', this._internal, data)
.then(() => .then(() =>
{ {
...@@ -304,7 +302,6 @@ class Producer extends EnhancedEventEmitter ...@@ -304,7 +302,6 @@ class Producer extends EnhancedEventEmitter
this.emit('@notify', 'producerPaused', data); this.emit('@notify', 'producerPaused', data);
// Send Channel request.
this._channel.request('producer.pause', this._internal) this._channel.request('producer.pause', this._internal)
.then(() => .then(() =>
{ {
...@@ -338,7 +335,6 @@ class Producer extends EnhancedEventEmitter ...@@ -338,7 +335,6 @@ class Producer extends EnhancedEventEmitter
this._remotelyPaused = true; this._remotelyPaused = true;
// Send Channel request.
this._channel.request('producer.pause', this._internal) this._channel.request('producer.pause', this._internal)
.then(() => .then(() =>
{ {
...@@ -387,7 +383,6 @@ class Producer extends EnhancedEventEmitter ...@@ -387,7 +383,6 @@ class Producer extends EnhancedEventEmitter
if (!this._remotelyPaused) if (!this._remotelyPaused)
{ {
// Send Channel request.
this._channel.request('producer.resume', this._internal) this._channel.request('producer.resume', this._internal)
.then(() => .then(() =>
{ {
...@@ -424,7 +419,6 @@ class Producer extends EnhancedEventEmitter ...@@ -424,7 +419,6 @@ class Producer extends EnhancedEventEmitter
if (!this._locallyPaused) if (!this._locallyPaused)
{ {
// Send Channel request.
this._channel.request('producer.resume', this._internal) this._channel.request('producer.resume', this._internal)
.then(() => .then(() =>
{ {
...@@ -493,7 +487,6 @@ class Producer extends EnhancedEventEmitter ...@@ -493,7 +487,6 @@ class Producer extends EnhancedEventEmitter
{ {
case 'rtpraw': case 'rtpraw':
{ {
// Send Channel request.
this._channel.request( this._channel.request(
'producer.setRtpRawEvent', this._internal, { enabled: true }) 'producer.setRtpRawEvent', this._internal, { enabled: true })
.then(() => .then(() =>
...@@ -511,7 +504,6 @@ class Producer extends EnhancedEventEmitter ...@@ -511,7 +504,6 @@ class Producer extends EnhancedEventEmitter
case 'rtpobject': case 'rtpobject':
{ {
// Send Channel request.
this._channel.request( this._channel.request(
'producer.setRtpObjectEvent', this._internal, { enabled: true }) 'producer.setRtpObjectEvent', this._internal, { enabled: true })
.then(() => .then(() =>
...@@ -540,7 +532,6 @@ class Producer extends EnhancedEventEmitter ...@@ -540,7 +532,6 @@ class Producer extends EnhancedEventEmitter
if (this.listenerCount('rtpraw')) if (this.listenerCount('rtpraw'))
return; return;
// Send Channel request.
this._channel.request( this._channel.request(
'producer.setRtpRawEvent', this._internal, { enabled: false }) 'producer.setRtpRawEvent', this._internal, { enabled: false })
.then(() => .then(() =>
...@@ -562,7 +553,6 @@ class Producer extends EnhancedEventEmitter ...@@ -562,7 +553,6 @@ class Producer extends EnhancedEventEmitter
if (this.listenerCount('rtpobject')) if (this.listenerCount('rtpobject'))
return; return;
// Send Channel request.
this._channel.request( this._channel.request(
'producer.setRtpObjectEvent', this._internal, { enabled: false }) 'producer.setRtpObjectEvent', this._internal, { enabled: false })
.then(() => .then(() =>
......
...@@ -94,7 +94,6 @@ class Room extends EnhancedEventEmitter ...@@ -94,7 +94,6 @@ class Room extends EnhancedEventEmitter
if (notifyChannel) if (notifyChannel)
{ {
// Send Channel request.
this._channel.request('router.close', this._internal) this._channel.request('router.close', this._internal)
.then(() => .then(() =>
{ {
...@@ -379,7 +378,6 @@ class Room extends EnhancedEventEmitter ...@@ -379,7 +378,6 @@ class Room extends EnhancedEventEmitter
if (this.listenerCount('audiolevels')) if (this.listenerCount('audiolevels'))
return; return;
// Send Channel request.
this._channel.request( this._channel.request(
'router.setAudioLevelsEvent', this._internal, { enabled: true }) 'router.setAudioLevelsEvent', this._internal, { enabled: true })
.then(() => .then(() =>
...@@ -408,7 +406,6 @@ class Room extends EnhancedEventEmitter ...@@ -408,7 +406,6 @@ class Room extends EnhancedEventEmitter
if (this.listenerCount('audiolevels')) if (this.listenerCount('audiolevels'))
return; return;
// Send Channel request.
this._channel.request( this._channel.request(
'router.setAudioLevelsEvent', this._internal, { enabled: false }) 'router.setAudioLevelsEvent', this._internal, { enabled: false })
.then(() => .then(() =>
......
...@@ -193,7 +193,6 @@ class Transport extends EnhancedEventEmitter ...@@ -193,7 +193,6 @@ class Transport extends EnhancedEventEmitter
if (notifyChannel) if (notifyChannel)
{ {
// Send Channel request.
this._channel.request('transport.close', this._internal) this._channel.request('transport.close', this._internal)
.then(() => .then(() =>
{ {
...@@ -247,7 +246,6 @@ class Transport extends EnhancedEventEmitter ...@@ -247,7 +246,6 @@ class Transport extends EnhancedEventEmitter
if (this._closed) if (this._closed)
return Promise.reject(new errors.InvalidStateError('Transport closed')); return Promise.reject(new errors.InvalidStateError('Transport closed'));
// Send Channel request.
return this._channel.request( return this._channel.request(
'transport.setRemoteDtlsParameters', this._internal, parameters) 'transport.setRemoteDtlsParameters', this._internal, parameters)
.then((data) => .then((data) =>
...@@ -280,11 +278,13 @@ class Transport extends EnhancedEventEmitter ...@@ -280,11 +278,13 @@ class Transport extends EnhancedEventEmitter
if (this._closed) if (this._closed)
return Promise.reject(new errors.InvalidStateError('Transport closed')); return Promise.reject(new errors.InvalidStateError('Transport closed'));
else if (this.direction !== 'send')
return Promise.reject(new Error('invalid Transport direction'));
const options = { bitrate }; return this._channel.request('transport.setMaxBitrate', this._internal,
{
// Send Channel request. bitrate
return this._channel.request('transport.setMaxBitrate', this._internal, options) })
.then(() => .then(() =>
{ {
logger.debug('"transport.setMaxBitrate" request succeeded'); logger.debug('"transport.setMaxBitrate" request succeeded');
...@@ -311,7 +311,6 @@ class Transport extends EnhancedEventEmitter ...@@ -311,7 +311,6 @@ class Transport extends EnhancedEventEmitter
if (this._closed) if (this._closed)
return Promise.reject(new errors.InvalidStateError('Transport closed')); return Promise.reject(new errors.InvalidStateError('Transport closed'));
// Send Channel request.
return this._channel.request('transport.changeUfragPwd', this._internal) return this._channel.request('transport.changeUfragPwd', this._internal)
.then((data) => .then((data) =>
{ {
......
...@@ -781,12 +781,15 @@ namespace RTC ...@@ -781,12 +781,15 @@ namespace RTC
break; break;
} }
// TODO: Handle tons of RTCP types.
default: default:
{ {
MS_WARN_TAG( // TODO: Uncomment when RTCP handling above is completed.
rtcp, // MS_WARN_TAG(
"unhandled RTCP type received [type:%" PRIu8 "]", // rtcp,
static_cast<uint8_t>(packet->GetType())); // "unhandled RTCP type received [type:%" PRIu8 "]",
// static_cast<uint8_t>(packet->GetType()));
} }
} }
} }
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论