Send finalUserId to openvidu-browser on RPC joinRoom

pull/623/head
pabloFuente 2021-04-29 14:02:39 +02:00
parent e08057c6d2
commit 7c494b0476
5 changed files with 10 additions and 2 deletions

View File

@ -32,7 +32,7 @@ import { PlatformUtils } from '../OpenViduInternal/Utils/Platform';
import * as screenSharingAuto from '../OpenViduInternal/ScreenSharing/Screen-Capturing-Auto';
import * as screenSharing from '../OpenViduInternal/ScreenSharing/Screen-Capturing';
import {OpenViduLoggerConfiguration} from "../OpenViduInternal/Logger/OpenViduLoggerConfiguration";
import { OpenViduLoggerConfiguration } from "../OpenViduInternal/Logger/OpenViduLoggerConfiguration";
/**
* @hidden
*/
@ -100,6 +100,10 @@ export class OpenVidu {
* @hidden
*/
role: string;
/**
* @hidden
*/
finalUserId: string;
/**
* @hidden
*/

View File

@ -1464,7 +1464,7 @@ export class Session extends EventDispatcher {
if (!!webrtcStatsInterval) {
this.openvidu.webrtcStatsInterval = +webrtcStatsInterval;
}
if(!!sendBrowserLogs) {
if (!!sendBrowserLogs) {
this.openvidu.sendBrowserLogs = sendBrowserLogs;
}
@ -1486,6 +1486,7 @@ export class Session extends EventDispatcher {
logger.log('TURN temp credentials [' + opts.turnUsername + ':' + opts.turnCredential + ']');
}
this.openvidu.role = opts.role;
this.openvidu.finalUserId = opts.finalUserId;
this.capabilities = {
subscribe: true,
publish: this.openvidu.role !== 'SUBSCRIBER',

View File

@ -19,6 +19,7 @@ import { RemoteConnectionOptions } from './RemoteConnectionOptions';
export interface LocalConnectionOptions {
id: string;
finalUserId: string;
createdAt: number;
metadata: string;
value: RemoteConnectionOptions[];

View File

@ -144,6 +144,7 @@ public class ProtocolElements {
public static final String PARTICIPANTJOINED_METHOD = "participantJoined";
public static final String PARTICIPANTJOINED_USER_PARAM = "id";
public static final String PARTICIPANTJOINED_FINALUSERID_PARAM = "finalUserId";
public static final String PARTICIPANTJOINED_CREATEDAT_PARAM = "createdAt";
public static final String PARTICIPANTJOINED_METADATA_PARAM = "metadata";
public static final String PARTICIPANTJOINED_VALUE_PARAM = "value";

View File

@ -153,6 +153,7 @@ public class SessionEventsHandler {
}
}
result.addProperty(ProtocolElements.PARTICIPANTJOINED_USER_PARAM, participant.getParticipantPublicId());
result.addProperty(ProtocolElements.PARTICIPANTJOINED_FINALUSERID_PARAM, participant.getFinalUserId());
result.addProperty(ProtocolElements.PARTICIPANTJOINED_CREATEDAT_PARAM, participant.getActiveAt());
result.addProperty(ProtocolElements.PARTICIPANTJOINED_METADATA_PARAM, participant.getFullMetadata());
result.add(ProtocolElements.PARTICIPANTJOINED_VALUE_PARAM, resultArray);