Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 348ab41

Browse files
authored
Fix video HA issue 791 (#832)
* Fix video HA issue 791 * Fix sip connection issue 757
1 parent 739c3c1 commit 348ab41

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

source/agent/conference/conference.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ var Conference = function (rpcClient, selfRpcId) {
312312
};
313313

314314
var initRoom = function(roomId, origin) {
315+
if (origin === undefined) {
316+
origin = {isp:"isp", region:"region"};
317+
}
315318
if (is_initializing) {
316319
return new Promise(function(resolve, reject) {
317320
var interval = setInterval(function() {

source/agent/conference/roomController.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,7 @@ module.exports.create = function (spec, on_init_ok, on_init_failed) {
14631463
rpcClient,
14641464
terminals[t_id].locality.node,
14651465
'linkup',
1466-
[sub_id, undefined, streamId],
1466+
[sub_id, undefined, streamId, undefined],
14671467
function () {
14681468
log.debug('resumed sub_id:', sub_id, 'for streamId:', streamId);
14691469
streams[streamId].video.subscribers = streams[streamId].video.subscribers || [];
@@ -2104,7 +2104,7 @@ module.exports.create = function (spec, on_init_ok, on_init_failed) {
21042104
rpcClient,
21052105
terminals[t_id].locality.node,
21062106
'linkup',
2107-
[sub_id, undefined, stream_id],
2107+
[sub_id, undefined, stream_id, undefined],
21082108
function () {
21092109
streams[stream_id].video.subscribers = streams[stream_id].video.subscribers || [];
21102110
streams[stream_id].video.subscribers.push(t_id);
@@ -2193,7 +2193,7 @@ module.exports.create = function (spec, on_init_ok, on_init_failed) {
21932193
rpcClient,
21942194
terminals[t_id].locality.node,
21952195
'linkup',
2196-
[sub_id, undefined, stream_id],
2196+
[sub_id, undefined, stream_id, undefined],
21972197
function () {
21982198
streams[stream_id].video.subscribers = streams[stream_id].video.subscribers || [];
21992199
streams[stream_id].video.subscribers.push(t_id);
@@ -2324,7 +2324,7 @@ module.exports.create = function (spec, on_init_ok, on_init_failed) {
23242324
rpcClient,
23252325
terminals[t_id].locality.node,
23262326
'linkup',
2327-
[sub_id, stream_id, undefined],
2327+
[sub_id, stream_id, undefined, undefined],
23282328
function () {
23292329
streams[stream_id].audio.subscribers = streams[stream_id].audio.subscribers || [];
23302330
streams[stream_id].audio.subscribers.push(t_id);
@@ -2411,7 +2411,7 @@ module.exports.create = function (spec, on_init_ok, on_init_failed) {
24112411
rpcClient,
24122412
terminals[t_id].locality.node,
24132413
'linkup',
2414-
[sub_id, stream_id, undefined],
2414+
[sub_id, stream_id, undefined, undefined],
24152415
function () {
24162416
streams[stream_id].audio.subscribers = streams[stream_id].audio.subscribers || [];
24172417
streams[stream_id].audio.subscribers.push(t_id);

source/agent/sip/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ module.exports = function (rpcC, selfRpcId, parentRpcId, clusterWorkerIP) {
355355
//check resolution
356356
var fmtp = info.videoResolution,
357357
preferred_resolution,
358-
optional_resolutions = calls[client_id].videoSource.media.video.optional.parameters.resolution;
358+
optional_resolutions = calls[client_id].videoSource.media.tracks.find(t => t.type === "video").optional.parameters.resolution;
359359

360360
const isResolutionEqual = (r1, r2) => {return r1.width === r2.width && r1.height === r2.height;};
361361
//TODO: currently we only check CIF/QCIF, there might be other options in fmtp from other devices.

0 commit comments

Comments
 (0)